Monday, May 9, 2011

Merge and dissolve polygons using gvSIG

Sometimes I need to combine polygons of two different feature types into a single polygon. The free and open source GIS application gvSIG provides the spatial tools to perform that task Essentially all I needed to do was to perform a spatial merge operation followed by a spatial dissolve operation. The following illustrates the procedure.
  1. Start up gvSIG OADE 2010. Open a Map View and load the polygon layers to combine, e.g. aoi.shp and buffer.shp.


  2. Select View | Geoprocessing Tools.

    The Geoprocessing tools dialog box appears.

  3. Expand the tree nodes and select Geoprocessing tools | Data conversion | Merge. Click Open tool.

    The Analysis tools dialog box appears.

  4. In the Input layer list, press CTRL and left mouse click on the layers to merge, e.g. aoi and buffer.
  5. In the Use layer attribute fields, choose the layer to use to define the fields for the output merged layer, e.g. aoi.


  6. Click OK.

    The merged layer is generated.

  7. If the Geoprocessing tools dialog box is closed, select View | Geoprocessing tools.


  8. Expand the tree node and select Geoprocessing | Analysis | Aggregation | Dissolve.

    The Analysis tools dialog box appears.

  9. In the Input layer field, choose the merged layer, e.g. merge.shp.
  10. In the Field to dissolve on, choose an appropriate field, e.g. Field1.

    Note: only polygons with the same field value can be dissolved. Prior to this step, you must ensure the attribute field values have the same values.
  11. Toggle on Dissolve adjacent features only.
  12. In the Output layer field, click Choose.

    The Save dialog box appears.
  13. Browse and type in the output File Name, e.g. dissolve.shp. Click Save.
  14. Click OK.

    The polygons are dissolved.

No comments: