Bad calculations with Colombian projection (EPSG:3116)

المشرف العام

Administrator
طاقم الإدارة
Solved, reading mail-archive I can understand that there is a conflict between:

  • gt-epsg-wkt-9.2.jar
  • gt-epsg-hsql-9.2.jar
I tested removing each one, with 'hsql' I get the same wrong result, but with 'wkt' the result is apparently correct:

POLYGON ((1008607.2669034603 934072.2524703469, 1119664.4273319552 934150.3439472048, 1119791.4166697538 823552.3609040213, 1008616.3988750693 823493.7092892379, 1008607.2669034603 934072.2524703469))

I slightly understand that there is a problem with the coordinate axis, as sugested a comment below, but I tried with both libraries:

System.setProperty("org.geotools.referencing.forceXY", "true");The result is still wrong, I suppose that must exist a solution without exclude a library gt-epsg-hsql-9.2.jar.

Thanks for your replies

I tried to project a square with KML coordinates:

POLYGON ((-74 4.00000000013149, -73 4.00000000013149, -73 3.0000000000987583, -74 3.0000000000987583, -74 4.00000000013149))



Into the EPSG:3116, Magna-Sirgas-Bogota coordinates, so the result is:

POLYGON ((-9130927.896477975 2771311.8407411724, -9105351.47332166 2884393.3410715847, -9072295.496257499 2876530.4903936666, -9099848.751098553 2763923.9776131, -9130927.896477975 2771311.8407411724))

So, the result is between Cuba and Miami:


The code that i use is:

CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3116");MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS, true);OutGeometry = JTS.transform(myGeometry, transform);Is possible that the code below is wrong? or the library has a bug?, i've see the reported bug:Swiss Issue

And i think that is something like that, what do you think about this issue?, I'm using the Geotools Api 9.2.

Thanks.



أكثر...
 
أعلى