Patrick Jackson ha scritto:
> I need to check/set the precision on geometries written to shapefile, 
> and am having trouble locating information about this in the code or 
> documentation.
> 
>  
> 
> What prompts this is that I’m writing MultiPolygon geometries 
> (geographic crs) that are physically fairly small, so I need to get 
> precision on coordinates out to several decimal places.  While the 
> geometries in the features are showing double precision (out to many 
> decimal places) before being written to shapefile, when I open the 
> output shapefile in ArcMap, they seem to have only 2-decimal precision.

There is no way that I know of to control the precision of the
coordinates written out.
As far as I know they are just written with all the decimals that
we have available, there is no rounding that I'm aware of in the
writer.

The class actually reading and writing polygons is here:
http://svn.osgeo.org/geotools/trunk/modules/plugin/shapefile/src/main/java/org/geotools/data/shapefile/shp/PolygonHandler.java

If you have a self contained example showing a precision reduction
I can investigate.

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to