How to do a coordinate transformation with CTS?

المشرف العام

Administrator
طاقم الإدارة
Let's say I want to convert the following WGS84 (EPSG:4326) coordinate to UTM32N (EPSG:25832):

54.321, 9.876

Is there any tool to reproject x,y coordinates, apart from Proj4? links to the CTS wiki.The CTS wiki has a rough outline at https://github.com/orbisgis/cts/wiki

So, according to the wiki it would be something like this:

double[] coord = new double[2];coord[0] = 54.321;coord[1] = 9.876;CRSFactory cRSFactory = new CRSFactory();CoordinateReferenceSystem crs1 = cRSFactory.getCRS("EPSG:4326");CoordinateReferenceSystem crs2 = cRSFactory.getCRS("EPSG:25832");List coordOps = CoordinateTransformationFactory.createCoordinateOperations(crs1,crs2);if (coordOps.size() != 0) { for (CoordinateOperation op : coordOps) { double[] dd = op.transform(coord); }}But, there is no CoordinateTransformationFactory class to be found anywhere in CTS: https://github.com/orbisgis/cts/search?utf8=✓&q=CoordinateTransformationFactory

What am I missing?



أكثر...
 
أعلى