[geos-devel] Aggregate on attribute

Sandro Santilli strk at keybit.net
Mon Mar 3 02:31:30 PST 2014


On Mon, Mar 03, 2014 at 11:15:52AM +0100, Paul Meems wrote:
> Hi List,
> 
> We use with MapWinGIS (C++ ActiveX control) GDAL with GEOS.
> 
> We currently have a custom AggregateShapefile method which is not using
> GEOS.
> In this method we aggregate (union) all shapes based on an attribute. This
> method is not working 100% and I'm wondering if GEOS has something similar.

GEOS has no support for "attributes".
It'll need to be built outside.

> For example I have the counties shapefile of the USA. I want to aggregate
> all counties that are in the same state.
> I know of the Union method in GEOS, but that doesn't takes into account the
> attribute and in this example will result in a shapefile with 1 shape
> instead of a shape for each state.
> 
> Any advice will be much appreciated.

PostGIS would sound like an appropriate tool for what you're trying to do.

--strk;


More information about the geos-devel mailing list