[OSGeo-Discuss] Command line tool for dissolving polygon boundaries

Dan Putler dan.putler at sauder.ubc.ca
Wed Mar 2 08:28:50 PST 2011


Hi Brent,

I can compile C++, and I'm interested. Is it possible to access the code?

Dan

On 03/02/2011 07:04 AM, Brent Fraser wrote:
> Dan,
>
>     I've got some C++ code that uses GDAL (with a GEOS Union call) to
> dissolve polygons based on an attribute.  If you can compile C++ code on
> Linux, you're welcome to it.
>
> Best Regards,
> Brent Fraser
>
>
> On 3/2/2011 12:31 AM, Dan Putler wrote:
>> Hi Paolo,
>>
>> Your point is well taken. What seem to be the best solutions involve
>> reading in a shapefile and then writing out a new one. I was starting
>> to lean toward either PostGIS or Spatialite by using a SQL script
>> sourced within the relevant cli shell since my guess was that they
>> would scale much better than any Python code I was likely to write. I
>> think I could automate things more with GRASS shell scripts than with
>> SQL scripts (there are over 3000 counties in the US). The geometry
>> cleaning GRASS does is a two edged sword, having all the benefits you
>> indicate, but at the cost of increased processing time. However, my
>> guess is that the benefits of the cleaning are worth the cost.
>>
>> Thanks for your advise.
>>
>> Dan
>>
>> On 03/01/2011 10:57 PM, Paolo Cavallini wrote:
>>> Il giorno mar, 01/03/2011 alle 23.25 +0100, Paolo Corti ha scritto:
>>>> Your only option here could be to use GRASS, but as far as I know you
>>>> need to import your shapefile to the GRASS database, use a GRASS
>>>> command (v.reclass [0]) and export back to shapefile the result, so it
>>>> is not very direct.
>>> Not very direct, but it's only one more command (v.in.ogr), with the
>>> additional bonus that importing into GRASS you can clean up invalid
>>> topologies, close empty gaps, remove unwanted overlaps, etc.
>>> All the best.
>> _______________________________________________
>> Discuss mailing list
>> Discuss at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/discuss
>>




More information about the Discuss mailing list