From 2a82afc1ac2327966f56bdf35a6d88aaadb81330 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Mon, 16 May 2022 09:42:32 -0700 Subject: [PATCH] Move C API doc functions --- capi/geos_c.h.in | 62 +++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in index 27c618a371..5036157f00 100644 --- a/capi/geos_c.h.in +++ b/capi/geos_c.h.in @@ -2648,7 +2648,8 @@ extern int GEOS_DLL GEOSNormalize(GEOSGeometry* g); /* ========== Validity checking ============================================================ */ /** @name Validation -* Functions to check and enforce topological validity and simplicity. +* Functions to check and create topological validity, simplicity +and geometric quality. */ ///@{ @@ -2761,6 +2762,36 @@ extern int GEOS_DLL GEOSMakeValidParams_setKeepCollapsed( GEOSMakeValidParams* p, int keepCollapsed); +/** +* Computes the minimum clearance of a geometry. The minimum clearance is the smallest amount by which +* a vertex could be move to produce an invalid polygon, a non-simple linestring, or a multipoint with +* repeated points. If a geometry has a minimum clearance of 'eps', it can be said that: +* +* - No two distinct vertices in the geometry are separated by less than 'eps' +* - No vertex is closer than 'eps' to a line segment of which it is not an endpoint. +* +* If the minimum clearance cannot be defined for a geometry (such as with a single point, or a multipoint +* whose points are identical, a value of Infinity will be calculated. +* +* \param g the input geometry +* \param d a double to which the result can be stored +* \return 0 if no exception occurred. +* 2 if an exception occurred. +* \see geos::precision::MinimumClearance +*/ +extern int GEOS_DLL GEOSMinimumClearance(const GEOSGeometry* g, double* d); + +/** +* Returns a LineString whose endpoints define the minimum clearance of a geometry. +* If the geometry has no minimum clearance, an empty LineString will be returned. +* +* \param g the input geometry +* \return a linestring geometry, or NULL if an exception occurred. +* Caller is responsible for freeing with GEOSGeom_destroy(). +* \see geos::precision::MinimumClearance +*/ +extern GEOSGeometry GEOS_DLL *GEOSMinimumClearanceLine(const GEOSGeometry* g); + /** * Works from start of each coordinate sequence in the * geometry, retaining points that are further away from the @@ -3504,35 +3535,6 @@ extern GEOSGeometry GEOS_DLL *GEOSLargestEmptyCircle( */ extern GEOSGeometry GEOS_DLL *GEOSMinimumWidth(const GEOSGeometry* g); -/** -* Computes the minimum clearance of a geometry. The minimum clearance is the smallest amount by which -* a vertex could be move to produce an invalid polygon, a non-simple linestring, or a multipoint with -* repeated points. If a geometry has a minimum clearance of 'eps', it can be said that: -* -* - No two distinct vertices in the geometry are separated by less than 'eps' -* - No vertex is closer than 'eps' to a line segment of which it is not an endpoint. -* -* If the minimum clearance cannot be defined for a geometry (such as with a single point, or a multipoint -* whose points are identical, a value of Infinity will be calculated. -* -* \param g the input geometry -* \param d a double to which the result can be stored -* \return 0 if no exception occurred. -* 2 if an exception occurred. -* \see geos::precision::MinimumClearance -*/ -extern int GEOS_DLL GEOSMinimumClearance(const GEOSGeometry* g, double* d); - -/** -* Returns a LineString whose endpoints define the minimum clearance of a geometry. -* If the geometry has no minimum clearance, an empty LineString will be returned. -* -* \param g the input geometry -* \return a linestring geometry, or NULL if an exception occurred. -* Caller is responsible for freeing with GEOSGeom_destroy(). -* \see geos::precision::MinimumClearance -*/ -extern GEOSGeometry GEOS_DLL *GEOSMinimumClearanceLine(const GEOSGeometry* g); /** * Returns a point that is inside the boundary of a polygonal geometry.