Janusz Dalecki ha scritto:
> Hi Everybody,
> 
> Straight to the topic:
> 
> If I create a feature which is Polygon and save it to the shape file 
> (using ShapefileDataStore), then when I read it back it comes as a 
> MultiPolygon. If I create a feature as a LineString and save it to the 
> shape file , then when I read it back it comes as a MultiLineString.
> 
> Could anyone explain that to me please, I am not getting it?

Shapefiles do not have the concept of plain linestrings or plain
polygons, the have just one type that can contain both multiple
and simple geometries, but there is no way to tell what is actually
stored (unless, of course, one does not try to read the entire
shapefile just to determine that information, which would be
prohibitively expensive).

So the only safe approach is to always use multi geometries no
matter what.

Cheers
Andrea

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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to