-
Notifications
You must be signed in to change notification settings - Fork 0
/
05-chkRepGeom.Rmd
36 lines (31 loc) · 3.83 KB
/
05-chkRepGeom.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Check and/or Repair Geometries {#chkGeom}
## Overview
The Check and/or Repair Geometries tool allows users to search an entire geodatabase's Feature Classes for geometry problems. This tool loops through each Feature Dataset's Feature Class features and searches for geometry problems, including null geometry, self intersections, duplicate vertexes, and more.
If geometry problems exists, an output table is created containing the following fields: CLASS, FEATURE_ID, and PROBLEM. The feature classes which contain geometry problems are then repaired.
After the repair is conducted, the subset of feature classes with repaired geometry problems are checked again for geometry problems to confirm their repair. Another output table is generated for the subset of feature classes. An empty output table confirms the geometry problems were correctly repaired.
## Parameters
The tool has 2 parameters:
1. **Input_Geodatabase (data type: Workspace)** - This parameter must be the path of the input geodatabase to search Feature Datasets' Feature Class features for duplicate features.
2. **Output_Geodatabase (data type: Workspace)** - This parameter should be the path of the Installation Review Geodatabase to compile all CIP processing outputs in a single location.
3. **Repair Geometries? (data type: Boolean)** - Do you want to automatically repair geometries, where possible?
4. **Delete Null Geometries? (data type: Boolean)** - Do you want to automatically delete features that have null/empty geometries?
## How to Use
### Begin by opening the toolbox
Navigate to the location of the script toolbox, then right-click the 'Check and/or Repair Geometry' script tool to open (Fig. \@ref(fig:chkGopen)).
```{r chkGopen, cache=FALSE,echo=FALSE,message=FALSE,error=FALSE,warning=FALSE,fig.cap="Opening the Check and/or Repair Geometries tool",fig.align='center'}
knitr::include_graphics("figures/chkG-open.jpg",auto_pdf = TRUE)
```
### Fill out the parameters
Next, fill out the parameters for the tool. Here, we want to search all Feature Classes within Feature Datasets in the Example.gdb for duplicate features (Fig. \@ref(fig:chkGparams)). Lastly, we specify where we want to output the resulting tables, prefereably in an Installation Review geodatabase specifically for holding CIP processing results.
```{r chkGparams, cache=FALSE,echo=FALSE,message=FALSE,error=FALSE,warning=FALSE,fig.cap="Check and/or Repair Geometries tool parameters",fig.align='center'}
knitr::include_graphics("figures/chkG-params.jpg",auto_pdf = TRUE)
```
### Run the Tool and View Results
While the tool runs (with Background Processing disabled), we can see the messages from the tool, which displays the following: how many feature classes are being checked for geometry problems, how many geometry problems that were found, where the output results are found, how many and which feature classes will be processed to repair geometry problems, how many feature classes are being re-checked for geometry errors, and how many geometry problems were found after the re-check (Fig. \@ref(fig:chkGmessages)).
```{r chkGmessages, cache=FALSE,echo=FALSE,message=FALSE,error=FALSE,warning=FALSE,fig.cap="Output messages from the Check and/or Repair Geometries tool",fig.align='center'}
knitr::include_graphics("figures/chkG-messages.jpg",auto_pdf = TRUE)
```
Here, we see that 16 geometry problems were found in the Yaeger CIP geodatabase across 10 different feature classes, with each listed. A re-check was conducted on the 10 feature classes and then 0 geometry problems were found (Fig. \@ref(fig:chkGafter)).
```{r chkGafter, cache=FALSE,echo=FALSE,message=FALSE,error=FALSE,warning=FALSE,fig.cap="Output table of duplicate geometries found for each Feature Class, with the re-run showing that all geometries have been fixed.",fig.align='center'}
knitr::include_graphics("figures/chkG-after.jpg",auto_pdf = TRUE)
```