To Kevin Lee,

Here is what is needed to figure out why the geotools transformation is not 
working as you expect.

1) a set of test data with the source UTM-K points and ArcGIS output WGS84 
points.

2) the geotools output generated by converting the same UTM-K source points to 
WGS84. From your code below it looks like you are doing the opposite and 
running geotools on the WGS84 points and trying to convert back to UTM-K. But 
we want to compare to the ArcGIS transformation.

Possible issues that might cause problems.

1) Axis order. Check what the source and target CRS axis orders are (print out 
the WKT). Is the WGS84 CRS expecting (longitude, latitude) or (latitude, 
longitude)? 

2) The transverse mercator equations are only accurate within a few degrees of 
the central meridian (UTM zones are typically only 6 degrees wide, and points 
are no more than 3 degrees from the central meridian). From your test below, it 
looks like your test point (118.0 deg. longitude) is almost 10 degrees from the 
central meridian (127.5 deg. longitude). I think the error in the equations is 
documented in the Transverse Mercator java docs.

Rueben



> -----Original Message-----
> From: LeeHyung Joo - Kevin [mailto:[email protected]]
> Sent: Monday, May 16, 2011 1:47 AM
> To: geotools mailing list
> Subject: [Geotools-gt2-users] the problem about transformaing
> coordinatesystem.
> 
> 
> 
> 
> Hi all.
>  
> I want to ask something about transformation.
>  
> First, the thing I want is the building's name of the output 
> including its coordinates, when I input some coordinates.
>  
> There are two projection : UTM-K and WGS84.
>  
> I tried the transformation in ArcGIS.
>  
> After transfomation UTM-K -> WGS84, I got the Long/Lat.
>  
> And I did in Geotools below:
>  
> String utmk = "PROJCS[\"UTM-K\",
>                  GEOGCS[\"GCS_Korean_Datum_1985\",
>                     DATUM[\"D_Korean_Datum_1985\",
>                        
> SPHEROID[\"Bessel_1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\
> ",\"7004\"]],
>                        
> TOWGS84[595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408],
>                        AUTHORITY[\"EPSG\",\"1024\"]],
>                     PRIMEM[\"Greenwich\",0.0],
>                     UNIT[\"Degree\",0.0174532925199433]],
>                  PROJECTION[\"Transverse_Mercator\"],
>                  PARAMETER[\"False_Easting\",1000000.0],
>                  PARAMETER[\"False_Northing\",2000000.0],
>                  PARAMETER[\"Central_Meridian\",127.50289027777],
>                  PARAMETER[\"Scale_Factor\",0.9996],
>                  PARAMETER[\"Latitude_Of_Origin\",38.0],
>                  UNIT[\"Meter\",1.0]]";
>   CoordinateReferenceSystem targetCRS = CRS.parseWKT(utmk);
>   System.out.println(targetCRS.toWKT());
>   CoordinateReferenceSystem sourceCRS = 
> factory.createCoordinateReferenceSystem("EPSG:4326");
>   MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
>   GeometryFactory geometryFactory = 
> JTSFactoryFinder.getGeometryFactory( null );
>   Coordinate coord = new Coordinate( 117.98962262140743, 
> 19.698503226154997 );
>   Point point = geometryFactory.createPoint( coord );
>   Geometry geometry2 = JTS.transform(point, transform);
>   System.out.println(geometry2);
>  
>  
> The above code, the value of the meter values ​​converted into 
> Long/Lat values.
>  
> If I converted the Long/Lat values in arcgis and enter the above 
> code, would come up with a value of meter?
>  
> And then the output(meter) and the meter values(UTM-K) before 
> converting in ArcGIS are different.
>  
> The coordinates of the building on Google map coordinates is 
> different checked results.
>  
> So how can I do?
>  
> Thanks in advanced.
>  
>  
>  
> Best Regards.
> Kevin Lee.
>  
>                                         
> ------------------------------------------------------------------
> ------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 



------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to