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

Noli Sicad nsicad at gmail.com
Tue Mar 1 18:55:02 PST 2011


Hi Simon,

> That sounds great.
>
> I thought I remembered having read somewhere that Spatialite could
> accept commands in this way but could not find a link to the webpage
> when putting together my reply.
>
> Can you provide a step by step outline of the code necessary to do this?

It is in Spatialite Google Groups, here are the links.

http://groups.google.com/group/spatialite-users/browse_thread/thread/7ecd6ccae76d3495/8683876813398de5?lnk=gst&q=Shapefile+#8683876813398de5

ST_Union
http://groups.google.com/group/spatialite-users/browse_thread/thread/2c8cc54d4b253979/78bc0b7eae6b1c38?lnk=gst&q=GUnion#78bc0b7eae6b1c38

> Why is it necessary to create a CSV? Can't Spatialite manipulate
> shapefiles directly in a virtual table?

It is needed for matching e.g.

~~~~~~
CREATE TABLE workplan AS SELECT * FROM property_mp JOIN planning
       ON (property_mp.PR_PROPNUM = planning.PR_PROP_No);
~~~~~~
where planning.PR_PROP_No is from CSV table.

You can manipulate Shapefile as Virtual Shapefile. However,  you need
a table for the criteria to be join and dissolve.

It is easier to get the attribute table you need from the shapefile,
if you like. Using MMQGIS plugin in QGIS you can export the attribute
table into CSV file with ease.

Noli



More information about the Discuss mailing list