Hi, Being a complete newbie to geotools I would like to use geotools to transform a Point supplied in Gauss-Krueger (EPSG:31257) coordinate system to lambert (used by the database):
CoordinateReferenceSystem gkCRS = CRS.decode("EPSG:31257"); CoordinateReferenceSystem dbCRS = dataBaseFeatureType.getCoordinateReferenceSystem(); GeometryBuilder geometryBuilder = new GeometryBuilder(gkCRS); org.opengis.geometry.primitive.Point point = geometryBuilder.createPoint(-46001.68, 5251934.86); org.opengis.geometry.primitive.Point transformedPoint = (org.opengis.geometry.primitive.Point) point.transform(dbCRS); Point trJTSPoint = JTS.toGeometry(transformedPoint.getDirectPosition()); According to the test-data I got, the transformed point should be ( 127778.84 395783.40 ) - however instead I get Point(400000.0 6251760.423548385). Any idea whats going wrong here? Thank you advance and best regards, Clemens gkCRS is: PROJCS["MGI / Austria GK M28", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian", 10.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 150000.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31257"]] while dbCRS is: PROJCS["MGI / Austria Lambert", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 47.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", 400000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 46.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31287"]] _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users