[Geotools-gt2-users] Std methodology for coordinate transformation From: Joel Mirkin - 2006-03-01 19:54:14 Attachments: Message as HTML ```Hi, I've been struggling with geotools for the past couple of days. I would lik= e to know if there is a standard methodology for converting coordinates of geometry into latitude and longitude. Thanks for the help. Joel ```
 Re: [Geotools-gt2-users] Std methodology for coordinate transformation From: Rueben Schulz - 2006-03-02 07:25:28 ```Hi, Please see the (unfinished) coordinate transformation tutorial at: http://www.geotools.org/display/GEOTOOLS/Coordinate+Transformation +Services+for+Geotools+2.1 The general procedure is: 1) Create a Coordinate Reference System (CRS) for you source geometries (ex. UTM Zone 10N WGS 84 Datum Projected CRS, Lambert Conic Projected CRS). I am assuming your source is a projected CRS, which is composed of a map projection, and a geographic CRS. The easiest way to create a CRS is use an authority factory (if you know the EPSG code for your crs) or a wkt string. 2) Create a CRS for your output geometries. This will be a geographic CRS (lat/long or long/lat) in your case. Geographic CRS have a datum. Watch out for the axis order! Watch out for the axis order of your source CRS too. 3) Use a CoordinateOperationFactory to create a math transform between the source and target CRS's. 4) Use the math transform to transform your points. Alternatively you could create a math transform by hand. This is not recommended, but is not too difficult for simple transforms. For example, if you are just going from some projected coordinates (ex. Mercator) to geographic coordinates with the same datum, the transform just needs to specify the map projection and its parameters. Anything more complex and you need to concat transforms together. Good luck, Rueben On Wed, 2006-01-03 at 14:54 -0500, Joel Mirkin wrote: > Hi, > I've been struggling with geotools for the past couple of days. I > would like to know if there is a standard methodology for converting > coordinates of geometry into latitude and longitude. Thanks for the > help. > > Joel ```