[Gdal-dev] Building multipolygons from single polygons with OGR?
Ethan Alpert
ealpert at digitalglobe.com
Wed Dec 14 09:25:30 EST 2005
Thanks Frank! That did the trick!
-e
________________________________
From: fwarmerdam at gmail.com on behalf of Frank Warmerdam
Sent: Tue 12/13/2005 8:52 PM
To: Ethan Alpert
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] Building multipolygons from single polygons with OGR?
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051214/a927e570/attachment.html
More information about the Gdal-dev
mailing list