To Nathan,

After looking at the definitions of the CRSs your are dealing with, I am
pretty sure your problems are caused by the axis order of the EPSG:4957
CRS. 4957 (NAD 83 (HARN)) is defined as using a (lat, long, height)
coordinate system. So, most likely the issue that you are having is
you're giving the NADCONTransform coordinates in the form (y,x) when it
expects (x,y). Print out the results of mt.transform(...some points...)
to see if this is the case.

I have not have a chance to make any tests with the sample points below,
since I do not have any development environment setup to do geotools
work right now. Probably the easiest way to get things working is to
just swap the y,x coordinates before you send them to the
NADCONTransform. You could also use a different CRS definition of NAD 83
that defines the coordinates as (long,lat). EPSG:4269 would work for
this, but is only 2D.

Once the NADCONTransform works (hopefully soon) you just need to make
another math transform to convert between NAD 27 and a projected CRS of
State Plane California (with a NAD 27 geographic CRS). I don't know the
EPSG codes for these, but hopefully you will be able to find them. If
you can not find the EPSG codes, you can create the CRSs from WKT
definitions.

Ideally you could just give CRS.findMathTransform the source NAD 83
State Plane CRS and the target NAD 27 State Plane CRS. However I don't
think the factory knows how to use the NADCONTransform. The set of math
transforms for the conversion might be defined in the EPSG database, but
I don't know if geotools is able to access those yet (it could not the
last time I worked with it, but that was 4 years ago).

Good luck,
Rueben


On Mon, 2008-21-07 at 01:58 -0500, Nathan Hartman wrote:
>  To Rueben Schulz, here are some points I'm trying to convert with the
> NadconTransform class. They're in NAD83, State Plane California V....
> US Feet. I'm trying to convert them into State Plane California V,
> NAD27. Here's generally what I'm doing....
> 
>             sourceCRS = CRS.decode("EPSG:2229");
>             targetCRS = CRS.decode("EPSG:4957");
>             mt = CRS.findMathTransform(sourceCRS, targetCRS);
>             nadcon = new NADCONTransform("conus.las", "conus.los")
>             nadcon.inverseTransform(mt.transform(...some points...))
> 
> Some Points (x,y,z)           
> 
> 6259205.000 1871825.000 806.650
> 6259215.000 1871825.000 807.180
> 6259225.000 1871825.000 807.920
> 6259235.000 1871825.000 808.560
> 6259245.000 1871825.000 809.700
> 6259255.000 1871825.000 810.870
> 6259265.000 1871825.000 812.380
> 6259275.000 1871825.000 815.200
> 6259285.000 1871825.000 816.820
> 6259295.000 1871825.000 818.210
> 6259305.000 1871825.000 819.770
> 6259315.000 1871825.000 821.460
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Geotools-gt2-users mailing 
> list [email protected] 
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to