[gdal-dev] Calculate footprints of shapefiles

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Mar 17 09:13:18 EDT 2011


Armin,

I don't know if it works on geometry collection but it certainly works on a
MultiPolygon. In return, you will get either a Polygon or a MultiPolygon
depending on the union being connected or not.

On Thu, Mar 17, 2011 at 5:51 PM, Armin Burger <armin.burger at gmx.net> wrote:

> Chaitanya
>
> I can understand how the UnionCascade works in PostDIS since it's an
> aggregate function. I just don't understand how I should use it in OGR. The
> documentation has a single line
>    UnionCascaded(self) -> Geometry
>
> So it returns a geometry from another geometry, but I would need a returned
> geometry from a *list* of input geometries, not from a single one. So I
> don't have a clue if this is possible in OGR.
>
> Another option could be the "Collect" function, but this seems to be only
> implemented in the C libraries, not in the Python bindings. Looks like
> geometry collections are not available in OGR for Python at all.
>
> Armin
>
>
> -------- Original-Nachricht --------
> > Datum: Thu, 17 Mar 2011 10:16:06 +0530
> > Von: Chaitanya kumar CH <chaitanya.ch at gmail.com>
> > An: Armin Burger <armin.burger at gmx.net>
> > CC: gdal-dev at lists.osgeo.org, mariusjigmond at hotmail.com
> > Betreff: Re: [gdal-dev] Calculate footprints of shapefiles
>
> > Armin,
> >
> > Cascaded Union works pretty much like Union except that it is optimized
> to
> > work on more than two geometries.
> > Both OGR and PostGIS uses the GEOS library to perform this.
> >
> > Read this blog entry by Paul Ramsey:
> >
> http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html
> >
> > On Wed, Mar 16, 2011 at 3:41 PM, Armin Burger <armin.burger at gmx.net>
> > wrote:
> >
> > > Chaitanya
> > >
> > > thanks for the hints. So a sort of Union operation seems to be
> > necessary. I
> > > need to check how fast that is with OGR on larger shapefiles (I want to
> > > store in PostGIS just the footprint, not the full geometry collection).
> > The
> > > ConvexHull could be a good alternative to a simplified boundary.
> > >
> > > I understand how the normal Union() works, it merges 2 geometries into
> a
> > > new one. But I don't get it what UnionCascade() is doing. It applies a
> > Union
> > > on a single geometry and returns the new geometry, what is it actually
> > > unioning/merging then?
> > >
> > > Regards,
> > > Armin
>
> --
> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110317/0ac54562/attachment.html


More information about the gdal-dev mailing list