Hallo all, At the moment, I'm trying to project points, lines and polygons on "Google Earth". To achieve this aim, I'm using GEOTOOLS.
Now to the problem: As Martin Desruisseaux wrote in his answer ( http://sourceforge.net/mailarchive/message.php?msg_id=15645183 ) you can't set Hints.LENIENT_DATUM_SHIFT to Boolean.TRUE, if you want an accurate transformation. For example, the projection from GK2 (Gauß-Krüger 2) to WGS84 (as far as I know this is the basis CRS of Google Earth) results in a deviation of about 200 metres, always. (btw: You can take a look at the screenshot in the attachment!) Here are some informations about the transformation: sourcecrs: PROJCS["DHDN / Gauss-Kruger zone 2", GEOGCS["DHDN", DATUM["Deutsches_Hauptdreiecksnetz", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6314"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat", NORTH], AUTHORITY["EPSG","4314"]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian", 6.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 2500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","31466"]] targetcrs: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat", NORTH], AUTHORITY["EPSG","4326"]] Result of System.out.println(transform): CONCAT_MT[INVERSE_MT[PARAM_MT["Transverse_Mercator", PARAMETER["semi_major", 6377397.155], PARAMETER["semi_minor", 6356078.962818189], PARAMETER["central_meridian", 6.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 2500000.0], PARAMETER["false_northing", 0.0]]], PARAM_MT["Molodenski", PARAMETER["dim", 2], PARAMETER["dx", 0.0], PARAMETER["dy", 0.0], PARAMETER["dz", 0.0], PARAMETER["src_semi_major", 6377397.155], PARAMETER["src_semi_minor", 6356078.962818189], PARAMETER["tgt_semi_major", 6378137.0], PARAMETER["tgt_semi_minor", 6356752.314245179]]] As you can see, the translation parameters "dx", "dy", "dz" are equal to "0.0". The coordinates of the given point (highlighted in the screenshot) in GK2 are: X: 2662992.3037465196 Y: 5543456.129133454 The results of GEOTOOLS for WGS84 are: X: 8.274064947588457 Y: 50.00686449018631 Though, the result has to be: X: 8.27317386543231; Y: 50.0050926651181; I calculated this with "Postgres" and checked it visually and these are nearly the correct coordinates ( < 2 metres)! I need the general way for every kind of transformation from one chosen coordinate system into WGS84...if it's possible. What should I set for the "BursaWolfParameter", which is required if I won't set Hints.LENIENT_DATUM_SHIFT to Boolean.TRUE and how does it work? I would be grateful for every response.... Best regards Sebastian http://www.nabble.com/file/4554/projection.JPG -- View this message in context: http://www.nabble.com/Google-Earth---Projection-tf2807194.html#a7832106 Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
