pyinterp.geometry.geographic.algorithms.correct

Contents

pyinterp.geometry.geographic.algorithms.correct#

pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.Point) None#
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.Segment) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.Box) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.LineString) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.Ring) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.Polygon) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.MultiPoint) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.MultiLineString) None
pyinterp.geometry.geographic.algorithms.correct(geometry: pyinterp.core.geometry.geographic.MultiPolygon) None

Corrects a geometry to make it valid according to OGC rules.

This function applies several corrections:

  • Ensures rings are closed (first point equals last point)

  • Ensures correct orientation (exterior rings counter-clockwise, holes clockwise)

  • Orders multi-geometries consistently

This operation modifies the geometry in-place.

Parameters:

geometry – Geometric object to correct.