Skip to content

Commit

Permalink
Move C API doc functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed May 16, 2022
1 parent fcdba59 commit 2a82afc
Showing 1 changed file with 32 additions and 30 deletions.
62 changes: 32 additions & 30 deletions capi/geos_c.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
///@{

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2a82afc

Please sign in to comment.