[Gdal-dev] Building multipolygons from single polygons with OGR?
Frank Warmerdam
warmerdam at pobox.com
Tue Dec 13 22:52:49 EST 2005
On 12/13/05, Ethan Alpert <ealpert at digitalglobe.com> wrote:
> I have a query that returns single polygon geometries and I'd like to loop
> through the features and create a single multipolygon from the result set.
> How is this done with the OGR API?
Ethan,
You could need to create a multipolygon object, and then
call addGeometry() for each polygon. You can pass in
the original polygons, as the method will clone them internally.
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