Corey Puffalt a écrit :
> I need to convert groups of coordinates to the UTM projection.  What I'm 
> looking for is some way to determine the appropriate UTM zone to convert 
> each group of coordinates to.  Does Geotools provide any way of doing 
> this or do I have to figure out the appropriate zone myself?  The 
> coordinates are initially in NAD27 (EPSG:4267)...


There is no convenience method doing that right now, but this is relatively 
easy 
to to that by yourself:

   * Pickup some representative longitude of the coordinates to convert.

   * Computes the zone using the following formulas:
     zone = Math.floor((longitude + 180) / 6) + 1
     (from memory; you will have to check)

   * Get a CRS for that UTM zone. An easy trick for that is to use EPSG code.
     You need to look in the EPSG database (I don't remember it from memory).
     I believe that there is a CRS for UTM zone 1 with some EPSG code like
     27010 (just a guess), zone 2 for EPSG:27020, zone 3 for EPSG:26030, etc.
     So some code like CRS.decode("EPSG:270" + (zone*10)) should do the trick.

        Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to