Hey again,

You need to be a bit more specific. There are many things that could
cause a FactoryException. It would also be helpful to know which
FactoryException you are dealing with.

It would be helpful to know how the CRS's were created (from parsing WKT
in a shapefile .prj file or from an AuthorityFactory (EPSG or WKT))? 

Just looking at the WKT of the source and destination CRS's, I would
guess that geotools is not able to determine the correct datum transform
between NAD 83 and WGS 84. If this is the case then you could:

1) tell the CoordinateOperationFactory that you don't care about the
datum shift and to ignore it (search the mailing list for hints or see
the hintExample() method in
http://svn.geotools.org/geotools/trunk/gt/demo/referencing/src/org/geotools/demo/referencing/CTSTutorial.java

Ignoring the datum shift might create some large errors, but that may
not matter for your application. Any errors would not be noticed on a
world scale map.

2) create a source CRS that uses the WGS 84 datum (then no datum shift
is needed). This may or may not be valid for your application. This may
also create lots of errors if WGS 84 is not the datum used for your
coordinates (but I suspect NAD83 may be wrong).

3) create source and target CRS's with the EPSG authority factory. This
requires that you know the authority codes for the CRS's (watch out for
the axis order, I think EPSG:4326 is (lat,long) in the EPSG database).
The epsg database records datum shifting parameters, so the authority
factory will add toWGS84 information to the CRS's it creates, and
geotools will use the toWGS84 info to preform a datum transformation.

4) figure out what the ToWGS84 transform information is for your source
CRS and add it. How you go about adding ToWGS84 info depends on how your
CRS was created in the first place.


If the above options prove to be unhelpful, please send some more
detailed information about what you are trying to do (where the CRS
information is coming from and how they were created) and I will try to
get back to you tomorrow night.

Rueben

P.S. A NAD 83 datum probably should not be used in UTM zone 37, since it
is outside north america.



On Mon, 2006-17-04 at 15:31 -0400, Adrian Custer wrote:
> Hey all,
> 
> the line:
>       
> is giving me a FactoryException.
> 
> I have as srcCRS:
> 
> PROJCS["NAD83 / UTM zone 37N", 
>   GEOGCS["NAD83", 
>     DATUM["North_American_Datum_1983", 
>       SPHEROID["GRS 1980", 6378137.0, 298.257222101,
> AUTHORITY["EPSG","7019"]], 
>       AUTHORITY["EPSG","6269"]], 
>     PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
>     UNIT["degree", 0.017453292519943295], 
>     AXIS["Lon", EAST], 
>     AXIS["Lat", NORTH], 
>     AUTHORITY["EPSG","4269"]], 
>   PROJECTION["Transverse_Mercator"], 
>   PARAMETER["central_meridian", 39.0], 
>   PARAMETER["latitude_of_origin", 0.0], 
>   PARAMETER["scale_factor", 0.9996], 
>   PARAMETER["false_easting", 500000.0], 
>   PARAMETER["false_northing", 0.0], 
>   UNIT["m", 1.0], 
>   AXIS["x", EAST], 
>   AXIS["y", NORTH], 
>   AUTHORITY["EPSG","26910"]]
> 
> and as destCRS:
> 
> GEOGCS["WGS 84", 
>   DATUM["WGS_1984", 
>     SPHEROID["WGS 84", 6378137.0, 298.257223563,
> AUTHORITY["EPSG","7030"]], 
>     AUTHORITY["EPSG","6326"]], 
>   PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
>   UNIT["degree", 0.017453292519943295], 
>   AXIS["Lon", EAST], 
>   AXIS["Lat", NORTH], 
>   AUTHORITY["EPSG","4326"]]
> 
> what can I look for to resolve this?
> 
> thanks,
> adrian
> 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to