Hi,
I am a newbie into GIS. I plan to use GeoTools 2.5 to re-project / transform shapefiles that I have downloaded from NOAA in one CRS to another CRS. The requirement that I have is to perform spatial analysis on data and the visualize them on Google Maps. Thus my target CRS is that of Google Maps. Please find below the WKTs of my source and target CRS. Source CRS (NOAA): GEOGCS["NCEP_SPHERE",DATUM["NCEP_SPHERE",SPHEROID["NCEP_SPHERE",6371200. 0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199432955]] Target CRS (Google): GEOGCS["WGS 84",DATUM["World Geodetic System 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["Geodetic latitude", NORTH],AXIS["Geodetic longitude", EAST],AUTHORITY["EPSG","4326"]] I have modified the Shp2Shp.java that was there in the Wiki documentation (http://docs.codehaus.org/display/GEOTDOC/05+SHP2SHP+Lab) to create the Java class to perform this transformation. I was able to get my program to run and it to create the output. But the output shapefile does not seem to be correct for some reason. Please find below the screenshots of how the shapefile looks when I open them in a shapefile viewer (CADE) Source shapefile: Reprojected output shapefile: The axis seems to have been switched. I am not able to import the output shapefile into a DB2 Spatial Database with the CRS as the one specified above. The database throws out the error that the shapefile does not conform to the CRS selected. Please find attached the source code (ShapeFileTransformer.java). Please guide me on what I need to correct to achieve the results that I am expecting. Thanks and Regards, Shyam This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
<<image003.jpg>>
<<image004.jpg>>
ShapeFileTransformer.java
Description: ShapeFileTransformer.java
------------------------------------------------------------------------- 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
