Decompose the Polygon into Lines
- Start up gvSIG OADE 2010. Add a polygon with holes layer e.g. polygonholes.shp to the view.
- Select View | Geoprocessing Tools.
The Geoprocessing tools dialog box appears. - Expand the Geoprocessing tools node and select Topology | Reduce to lines.
- Click Open Tool.
The Analysis tools dialog box appears. - In the Input layer field, choose the polygon with holes layer e.g. polygonholes.shp.
- Click Choose and type in the name of the Output layer e.g. lines.shp.
- Click OK.
The polygon and holes are reduced to lines in the output layer lines.shp.
Find and remove short lines
- In the legend (or table of contents in gvSIG terminology) pane, click the decomposed lines layer, e.g. lines.shp.
The selected layer becomes the active layer. - Select Layer | Start Editing.
The layer name changes to bold red in the legend, and the console pane appears. - Select Layer | Add Geometry Info.
The Add geometry info dialog box appears. - In the Select geometry information group box, select Length. Click the > button. Click OK.
The length attribute field is created for the lines.shp layer. - Select Layer | Show attribute table.
The Table: Attribute table for lines.shp dialog box appears. - Click the Length column header.
- Select Table | Sort descending.
The table is sorted with the longest length in the first row. - Select the second row. Scroll to the last row. Press SHIFT and click the last row.
All the rows between the second row to the last row are selected. - Press Delete on the keyboard.
All the selected records are deleted. - Close the table. Select Layer | Stop editing.
The Save prompt message appears. - Click Yes.
The changes are saved.
Simplify the line work
- Select View | Geoprocessing tools.
The Geoprocessing tools dialog box appears. - Expand the Geoprocessing tools node. Select Computational Data conversion | Generalize.
- Click Open tool.
The Analysis tools dialog box appears. - In the Input layer field, select lines.shp.
- Toggle on Douglas-Peucker method.
- In the Distance tolerance field, type in a value e.g. 20.
- In the Output layer field, type in the path and name of the output file, e.g. c:\temp\generalize.shp.
- Click OK.
The generalized line layer is created.
Convert the line work to a polygon
- Select View | Geoprocessing tools.
The Geoprocessing tools dialog box appears. - Expand the Geoprocessing tools node. Select Topology | Build polygons.
- Click Open tool.
The Analysis tools dialog box appears. - In the Input layer field, choose generalize.shp.
- In the Output layer field, choose or type in the path and name of the output layer e.g. C:\Temp\polygons.shp.
- Click OK.
The polygon layer without holes is created.
No comments:
Post a Comment