Hi Paulo, there is a method on ShapefileDatastore to let you do that ... -<http://javadoc.geotools.fr/snapshot/org/geotools/data/shapefile/ShapefileDataStore.html#forceSchemaCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)>
Enjoy! Note you also could of taken any old CoordinateReferneceSystem object and produced a filename.prj file from it (prj files just use "well known text" representation of CRS). For the complete list of care and feeding of shp and friends try this list: - http://udig.refractions.net/confluence/display/EN/Shapefile Cheers, Jody > Hi group, last week I sent a message about how to create a new shapefile, I > do this with this code: > > This code generated 3 files : test_apr.dbf, test_apr.shp and test_apr.shx. > but, when I open this shapefile in a GIS program, like ArcGis, it throws the > following error: "One or more layers is missing spatial reference > information. Data from those layers cannot be projected." > > How can I set the spatial reference on this test code? > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
