Documentation & Knowledge Base

Documentation & Help

Find instructions, guides, and answers to your questions regarding the use of the Gismatrix platform.

Geometry Validation and Auto Fix

After drawing a new cartographic object or changing an existing one, validation of the geometry of the object is automatically performed. If the geometry does not comply with OGC SFS standards, an automatic repair is attempted. For example, if you draw a polygon that intersects itself, it will be converted to a multi polygon after successful repair. Input geometries are always processed, so even valid inputs may have some minor alterations.

please note that geometry validation and automatic repair is not performed when data is imported into Gismatrix, but only when you change the geometry of the object with drawing tools or spatial functions.

Gismatrix fixes a geometry to be a valid geometry, while preserving as much as possible of the shape and location of the input:

  • Attempting to repair malformed geometry. Malformed in this case means the ring has too few points (min 4), or is not closed.
  • Vertices with non-finite X or Y ordinates are removed.
  • Repeated points are reduced to a single point.
  • Empty atomic geometries are valid and are returned unchanged.
  • Empty elements are removed from collections.
  • point: keep valid coordinate, or EMpTY.
  • LineString: coordinates are fixed.
  • LinearRing: coordinates are fixed, keep valid ring or else convert into LineString.
  • polygon: transform into a valid polygon, preserving as much of the extent and vertices as possible.
  • Rings are fixed to ensure they are valid.
  • Holes intersection the shell are subtracted from the shell.
  • Holes outside the shell are converted into polygons.
  • Multipolygon: each polygon is fixed, then result made non–overlapping (using union)
  • GeometryCollection: each element is fixed.