Monday, February 28, 2011

Doing a simple spatial selection with gvSIG

If you are used to running spatial selection queries in commercial GIS applications, then you would be a little confused to do the same thing in gvSIG. It took me a little while to figure out that gvSIG requires me to do pre-selection sets of the geometries for analysis first to reduce the amount of data before performing the actual spatial selection. To illustrate how to do a spatial selection query using the open source software gvSIG, I will do a simple point over polygon spatial overlay selection query.


  1. Start up gvSIG. Add the point and polygon layers for analysis into the View, e.g. Cities.shp and States.shp.

    The layers are displayed.

  2. In the legend, click the polygon layer e.g. States.shp to make it the active layer.

    The legend name is displayed in bold and enclosed in a box.
  3. On the toolbar, click the Select by Point icon. Click on a state polygon e.g. Arizona.

    The polygon is highlighted in yellow.

  4. In the legend, click the point layer e.g. Cities.shp to make it the active layer.

    The legend name is displayed in bold and enclosed in a box.
  5. On the toolbar, click the Select By Rectangle icon. Click and drag out a box covering the cities over Arizona and beyond.

    The points are highlighted in yellow.

  6. On the toolbar, click the Spatial Selection icon.



    The Spatial selection dialog box appears.

  7. In the Select features from active layers that field, choose are contained in.
  8. In the selected features in layer field, choose the polygon layer e.g. States.shp.


  9. Click New selection.

    Only the points that are contained in the Arizona state polygon are highlighted.
  10. Click Cancel.
  11. In the legend, toggle off the polygon layer e.g. States.shp to see the spatially selected points.

No comments:

Related Posts with Thumbnails