GEOS-6092: splitted patch to do most of the work in Geotools (GEOT-4603)