Hi,
I noticed a listing on the forum CRS factory question:
http://n2.nabble.com/CRS-factory-question-td1937609.html#a1937611
I want to set my CoordinateReferenceSystem to UTM ft instead of WGS84
It has to be flexible for UTM ft though being from U-R and 10-19 of UTM Zones
Question #1:
Is the below the way that I have to make it more flexible???
When I plug the code in for the FactoryFinder I'm getting
getCRSFactoryFinder("ESPG",null)
is not found for type FactorFinder (compilation error).
I'm willing to post a class with constant variables for the UTM setting if the
below is the way to go.
Question #2:
If the below is the way to go does anyone know the EPSG tables to look at???
Which I downloaded from
http://www.epsg.org/CurrentDB.html
Oliver
>Is there a way with the current set of APIs (looks like some are in flux
> with opengis) to instantiate a CoordinateReferenceSystem for a
> particular UTM zone.
There is no explict API for doing this task. However, if you are using the EPSG
database, you can
use the following trick. A look in the EPSG database show that there is a logic
between EPSG code
and UTM zone. For example
32601 WGS 84 / UTM zone 1N
32602 WGS 84 / UTM zone 2N
32603 WGS 84 / UTM zone 3N
32604 WGS 84 / UTM zone 4N
32605 WGS 84 / UTM zone 5N
32606 WGS 84 / UTM zone 6N
...
32701 WGS 84 / UTM zone 1S
32702 WGS 84 / UTM zone 2S
32703 WGS 84 / UTM zone 3S
32704 WGS 84 / UTM zone 4S
32705 WGS 84 / UTM zone 5S
32706 WGS 84 / UTM zone 6S
...
There is also similar code ranges for UTM using WGS72, NAD27, ED50, etc. datum.
So you can use for example:
int utm_zone = 10;
CRSAuthorityFactory f = FactoryFinder.getCRSAuthorityFactory("EPSG", null);
crs = f.createCoordinateReferenceSystem("EPSG:" + (32600 + utm_zone));
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users