@Test public void testTransformPointCRSs() throws Exception { double lat = 61.49802149449156; double lon = 23.7603118; CoordinateReferenceSystem CRS4326 = CRS.decode(EPSG_4326); CoordinateReferenceSystem CRS3035 = CRS.decode(EPSG_3035); CoordinateReferenceSystem CRS3067 = CRS.decode(EPSG_3067); CoordinateReferenceSystem CRS3857 = CRS.decode(EPSG_3857); Point p3 = ProjectionHelper.transformPoint(lon, lat, CRS4326, CRS3035); Point p4 = ProjectionHelper.transformPoint(p3.getLon(), p3.getLat(), CRS3035, CRS4326); assertEquals("lon 3035to4326", lon, p4.getLon(), 0.000001); assertEquals("lat 3035to4326", lat, p4.getLat(), 0.000001); Point p5 = ProjectionHelper.transformPoint(p4.getLon(), p4.getLat(), CRS4326, CRS3067); Point p6 = ProjectionHelper.transformPoint(p5.getLon(), p5.getLat(), CRS3067, CRS4326); assertEquals("lon 3067to4326", lon, p6.getLon(), 0.000001); assertEquals("lat 3067to4326", lat, p6.getLat(), 0.000001); Point p7 = ProjectionHelper.transformPoint(p5.getLon(), p5.getLat(), CRS3067, CRS3857); Point p8 = ProjectionHelper.transformPoint(p7.getLon(), p7.getLat(), CRS3857, CRS3067); assertEquals("lon 3857to3067", p5.getLon(), p8.getLon(), 0.01); assertEquals("lat 3857to3067", p5.getLat(), p8.getLat(), 0.01); }
public static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS) { return transformPoint(new Point(lon, lat), sourceSRS, targetSRS); }
ProjectionHelper implements PointTransformer { public static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS) { return transformPoint(new Point(lon, lat), sourceSRS, targetSRS); } }
ProjectionHelper implements PointTransformer { public static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS) { return transformPoint(new Point(lon, lat), sourceSRS, targetSRS); }  }
ProjectionHelper implements PointTransformer { public static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS) { return transformPoint(new Point(lon, lat), sourceSRS, targetSRS); }  static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS); Point reproject(final Point point, final String sourceSRS, final String targetSRS); static Point transformPoint(final Point point, final String sourceSRS, final String targetSRS); static Point transformPoint(final String lon, final String lat, final String sourceSRS, final String targetSRS); static Point transformPoint(final double lon, final double lat, final CoordinateReferenceSystem sourceCrs, final String targetSRS); static Point transformPoint(final double lon, final double lat, final CoordinateReferenceSystem sourceCrs, final CoordinateReferenceSystem targetCrs); static Point transformPoint(final Point point, final CoordinateReferenceSystem sourceCrs, final CoordinateReferenceSystem targetCrs); static boolean isFirstAxisNorth(CoordinateReferenceSystem crs); static String shortSyntaxEpsg(String crs); static String longSyntaxEpsg(String crs); static CoordinateReferenceSystem longSyntaxCrs(String crs); static JSONObject transformGeometry(JSONObject geometry, final String sourceSRS, final String targetSRS, boolean sourceLon1st, boolean targetLon1st); static void flipFeatureYX(Geometry fnG); static void swapGeometryXY(FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection); }
ProjectionHelper implements PointTransformer { public static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS) { return transformPoint(new Point(lon, lat), sourceSRS, targetSRS); }  static Point transformPoint(final double lon, final double lat, final String sourceSRS, final String targetSRS); Point reproject(final Point point, final String sourceSRS, final String targetSRS); static Point transformPoint(final Point point, final String sourceSRS, final String targetSRS); static Point transformPoint(final String lon, final String lat, final String sourceSRS, final String targetSRS); static Point transformPoint(final double lon, final double lat, final CoordinateReferenceSystem sourceCrs, final String targetSRS); static Point transformPoint(final double lon, final double lat, final CoordinateReferenceSystem sourceCrs, final CoordinateReferenceSystem targetCrs); static Point transformPoint(final Point point, final CoordinateReferenceSystem sourceCrs, final CoordinateReferenceSystem targetCrs); static boolean isFirstAxisNorth(CoordinateReferenceSystem crs); static String shortSyntaxEpsg(String crs); static String longSyntaxEpsg(String crs); static CoordinateReferenceSystem longSyntaxCrs(String crs); static JSONObject transformGeometry(JSONObject geometry, final String sourceSRS, final String targetSRS, boolean sourceLon1st, boolean targetLon1st); static void flipFeatureYX(Geometry fnG); static void swapGeometryXY(FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection);  }