Hi, I created a Maven project to transform shapefiles and used the example from the geotools web site as basis.
When I load a shapefile and transform it to a shapefile with the same CRS everything is fine. But as soon as try to transform the shapefile with a different datum, the result is misplaced, or, if I turn of 'lenient', Geotools tells me that the Bursa Wolf parameters are missing. But how can I solve this problem? Currently I use the following lines to transform: CoordinateReferenceSystem dataCRS = schema.getCoordinateReferenceSystem(); CoordinateReferenceSystem worldCRS = map.getCoordinateReferenceSystem(); MathTransform transform = CRS.findMathTransform(dataCRS, worldCRS, false); ... Geometry geometry2 = JTS.transform(geometry, transform); Is there a working example? Can Geotools identify the required Bursa Wolf parameters? I'm using Geotools 9.1 and have the dependencies gt-shapefile, gt-referencing, gt-swing and gt-epsg-hsql Thanks Andreas -- View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-transform-shapes-with-different-datum-tp5060839.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
