[gdal-dev] Re: Multipart to singlepart
Frank Warmerdam
warmerdam at pobox.com
Tue Dec 7 15:35:50 EST 2010
On 10-12-07 02:48 PM, iomeneandrei wrote:
> I have downloaded GDAL 1.7.3 from here http://vbkto.dyndns.org/sdk/, and I
> have made a test. The output file now does not contain ever MultiPolygon,
> but it has only Polygon. And I have made this test using two output formats:
> SQLite and GML. This is a GML output:
> https://gist.github.com/732281
Andrea,
Good.
> But I have a question for you: is it a real multpart to singlepart
> transformation? The output file is without any MultiPolygon, but the two
> polygons that constitute the former MultiPolygon remain in some way
> geometrically related. I was thinking of getting two separate polygons, but
> if I will select one of them in a desktop GIS, also the other one is
> selected.
> Probably it's correct, but it's not what I want.
>
> It's really a pleasure to "talk" with you.
I'm afraid it is just pushing all the rings into one polygon feature which
is in truth not a valid simple feature polygon geometry. If you want
multipolygons split into multiple features - a reasonable wish - you will
need another mechanism. You could do this in your own script or program
but I am not aware of mechanism to do this with ogr2ogr or other existing
OGR utilities. It might be nice to have a -explode-collections option
for ogr2ogr what would produce one feature for each geometry in any kind
of geometry collection in the source file.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list