---
name: "pprepair"
section: "1"
platform: "linux"
package: "pprepair"
version: "0.0~20170614-dd91a21-3+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/pprepair"
---

# pprepair(1)

planar partition repair tool

## NAME

pprepair - planar partition repair tool

## SYNOPSIS

**pprepair**  \[ \[**-i** *filename* \[*schemaindex*\]\] \[**-o** *filename*\] \[**-fix**\] \[**-d**\] \| **-p** \[**-i** *filename* \[ *schemaindex*\]\] \[**-t**\] \[**-otnt** *filename*\] \[**-vh**\] \[**-sr** *ratio*\] \[**-v**\] \[**-au**\] \[**-rtnn**\] \[**-rtam**\] \[**-rtlb**\] \[**-rrlb**\] \[**-rrrn**\] \[**-rpl** *filename*\] \[**-rem** *filename*\] \[**-ot** *filename*\] \[**-otwp** *filename*\] \[**-bd**\] \[**-rp**\] \[**-owp**\] \[**-o** *filename*\] \[**-pi**\] \]

## DESCRIPTION

**pprepair** (planar partition repair) takes a set of polygons and ensures that they form a valid planar partition, made of valid polygons and having no gaps or overlaps. It can be used as a validator, telling of problems in individual polygons or in the planar partition, and also as an automatic repair tool, outputting a set of polygons that do form a valid planar partition.

## OPTIONS

Basic options

- FC**-i**F\[0\] *filename*

  Add this file to the triangulation using this schema index

- FC**-o**F\[0\] *filename*

  Output the reconstructed polygons in this file

- FC**-fix**F\[0\]

  Automagically repair (same as FC**-rrlb**F\[0\] FC**-rrrn**F\[0\])

- FC**-d**F\[0\]

  Dissolve the boundaries between regions with the same tag according to the schema index

Possible steps (in usual processing order)

- FC**-i**F\[0\] *filename*

  Add this file to the triangulation using this schema index

- FC**-t**F\[0\]

  Tag the triangulation

- FC**-otnt**F\[0\] *filename*

  Output the tagged triangulation with the number of tags to this file

- FC**-vh**F\[0\]

  Consider holes as valid

- FC**-sr**F\[0\] *ration*

  Split invalid regions at triangles with a higher aspect ratio than this

- FC**-v**F\[0\]

  Validate

- FC**-au**F\[0\]

  Allow removing invalid regions (where convenient)

- FC**-rtnn**F\[0\]

  Repair triangles by assigning them to the neighbour present on most sides

- FC**-rtam**F\[0\]

  Repair triangles by assigning them to a neighbour present on at least 2 sides

- FC**-rtlb**F\[0\]

  Repair triangles by assigning them to the neighbour present along the longest part of their boundary

- FC**-rrlb**F\[0\]

  Repair regions by assigning them to the neighbour present along the longest part of their boundary

- FC**-rrrn**F\[0\]

  Repair regions by assigning them to a random neighbour

- FC**-rpl**F\[0\] *filename*

  Repair by assigning according to the priority list in this file

- FC**-rem**F\[0\] *filename*

  Repair for edge matching according to the priority list in this file

- FC**-ot**F\[0\] *filename*

  Output the triangulation to this file

- FC**-otwp**F\[0\] *filename*

  Output the triangulation to this file, including the input file where each triangle came from

- FC**-bd**F\[0\]

  Removes unnecessary vertices before reconstruction to support larger data sets (try if you get a segmentation fault)

- FC**-rp**F\[0\]

  Reconstruct polygons

- FC**-o**F\[0\] *filename*

  Output the reconstructed polygons in this file

- FC**-owp**F\[0\] *filename*

  Output the reconstructed polygons in this file, including the input file where they came from

- FC**-pi**F\[0\]

  Print triangulation information

## EXAMPLE

```
FC
pprepair -i "myInput.shp" -o "myOutput.shp" -fix
      F[0]
```

## SEE ALSO

[**prepair**(1)](/prepair/1.md)
