[gdal-dev] Re: Multipart to singlepart

Frank Warmerdam warmerdam at pobox.com
Tue Dec 7 12:50:07 EST 2010

On 10-12-07 03:43 AM, iomeneandrei wrote:
> Hi Frank,
> Frank Warmerdam wrote:
>> Reviewing the ogr2ogr code I see this does trigger a call to
>> forceToPolygon()
>> though *mostly* it exists to set the type of the created layer.  So, yes,
>> -nlt polygon with ogr2ogr may well do what you want.
> I have used this GML file as input:
> https://gist.github.com/731590
> It contains a multipolygon.
> Then I run this command: ogr2ogr -f GML -nlt POLYGON  poly_output.gml
> poly_input.gml
> The output file contains the same multipolygon. Is it normal?
> I'm using FWTools 2.4.7 for Windows.


I tried it with a trunk build and the multipolygon is converted to a polygon.
I suspect the feature of the forcing support is new and if you want it you
would need a reasonably recent development build - more recent than FWTools.

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