epanet.de / DC Water Design Extension / Manual

Quality Control

Basic quality control steps. These should applied e.g. when ArcView reports problems like "Segmentation violation".

Find Duplicate Shapes

Duplicate shapes often cause problems because they disturb the line-node topology. The "Find Duplicate Shapes" Extension can be used to identify and eliminate duplicate shapes.

The "Find Duplicate Shapes" Extension is available from http://www.jennessent.com.

Example 3.4. Find duplicate pipes

  1. Load the "Find Duplicate Shapes" Extension

  2. Open a view

  3. Add the pipes theme to the view.

  4. Click the Identify Duplicate Features button.

  5. Select the pipes theme from the list.

  6. Select dc_id as the ID field.

  7. Click the OK button.

  8. Select "Shapes are identical"

  9. Click the OK button.

  10. The extension can add a new field (Set_ID) identifying sets of duplicate shapes. This can be used to delete duplicates. When asked if such a field should be added, click Yes.

  11. Review the generated report. If there are duplicates, activate the pipes theme.

  12. Select ThemeTable... from the table.

  13. Select TableStart Editing from the menu.

  14. Select the Set_ID field.

  15. Select FieldSort Descending from the menu.

  16. Review the duplicate records. Delete duplicates in such a way that each Set_ID only appears once.

  17. Select TableStop Editing from the menu.


NULL Values

NULL values often cause problems and should be avoided wherever possible.

Shape fields as well as other fields in the table can contain NULL values. The following example shows how to delete NULL shapes, however, identifying NULL values in other fields follows the same pattern.

Example 3.5. Delete NULL shapes

  1. Open the table of the shapefile to check.

  2. Select the TableQuery... from the menu.

  3. Enter the following formula:

    [Shape].isNull
  4. Click the New Set button.

  5. Close the query dialog

  6. If records have been selected, promote them by selecting TablePromote from the menu.

  7. Review diameter and length to see if important pipes have been lost. Delete those records with NULL shapes.


Corrupted Shapefiles

Corrupted shapefiles will cause errors upon opening or editing in ArcView. The Shapechk command can be used to fix those shapefiles.

Shapechk is available on the internet: http://www.geocities.com/SiliconValley/Haven/2295/shapechk.zip.

Example 3.6. Fix pipes.shp corruption

  1. Start Shapechk.

  2. Click on the Shapefile button.

  3. Select the shapefile you want to check.

  4. Click the Read header button.

  5. Click the Build shx button.

  6. If asked to delete the existing index files, answer Yes. Remember to rebuild the spatial index files using ArcView afterwards.

  7. Click the Check DBF button. Read the generated report and follow the instructions.

    The following message indicates that there are no problems:

    DBF tallied exactly with .dbf header and shapefile


epanet.de / Compiling / Manual

Imprint