SpatiaLite  5.0.0
Macros | Functions
gg_advanced.h File Reference

Geometry handling functions: advanced. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GAIA2GEOS_ALL   0
 Gaia-to-GEOS: all geometries.
 
#define GAIA2GEOS_ONLY_POINTS   1
 Gaia-to-GEOS: only geometries of the Point type.
 
#define GAIA2GEOS_ONLY_LINESTRINGS   2
 Gaia-to-GEOS: only geometries of the Linestring type.
 
#define GAIA2GEOS_ONLY_POLYGONS   3
 Gaia-to-GEOS: only geometries of the Polygon type.
 

Functions

GAIAGEO_DECLARE void gaiaResetGeosMsg (void)
 Resets the GEOS error and warning messages to an empty state. More...
 
GAIAGEO_DECLARE void gaiaResetGeosMsg_r (const void *p_cache)
 Resets the GEOS error and warning messages to an empty state. More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosErrorMsg (void)
 Return the latest GEOS error message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosErrorMsg_r (const void *p_cache)
 Return the latest GEOS error message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosWarningMsg (void)
 Return the latest GEOS warning message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosWarningMsg_r (const void *p_cache)
 Return the latest GEOS warning message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosAuxErrorMsg (void)
 Return the latest GEOS (auxiliary) error message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetGeosAuxErrorMsg_r (const void *p_cache)
 Return the latest GEOS (auxiliary) error message (if any) More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg (void)
 Attempts to (possibile) return a Point Geometry extracted from the latest GEOS error / warning message. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg_r (const void *p_cache)
 Attempts to (possibile) return a Point Geometry extracted from the latest GEOS error / warning message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosErrorMsg (const char *msg)
 Set the current GEOS error message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosErrorMsg_r (const void *p_cache, const char *msg)
 Set the current GEOS error message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (const char *msg)
 Set the current GEOS warning message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosWarningMsg_r (const void *p_cache, const char *msg)
 Set the current GEOS warning message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg (const char *msg)
 Set the current GEOS (auxiliary) error message. More...
 
GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg_r (const void *p_cache, const char *msg)
 Set the current GEOS (auxiliary) error message. More...
 
GAIAGEO_DECLARE void * gaiaToGeos (const gaiaGeomCollPtr gaia)
 Converts a Geometry object into a GEOS Geometry. More...
 
GAIAGEO_DECLARE void * gaiaToGeos_r (const void *p_cache, const gaiaGeomCollPtr gaia)
 Converts a Geometry object into a GEOS Geometry. More...
 
GAIAGEO_DECLARE void * gaiaToGeosSelective (const gaiaGeomCollPtr gaia, int mode)
 Converts a Geometry object into a GEOS Geometry. More...
 
GAIAGEO_DECLARE void * gaiaToGeosSelective_r (const void *p_cache, const gaiaGeomCollPtr gaia, int mode)
 Converts a Geometry object into a GEOS Geometry. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY (const void *geos)
 Converts a GEOS Geometry into a Geometry object [XY dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY_r (const void *p_cache, const void *geos)
 Converts a GEOS Geometry into a Geometry object [XY dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ (const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYZ dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ_r (const void *p_cache, const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYZ dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM (const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYM dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM_r (const void *p_cache, const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYM dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM (const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYZM dims]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM_r (const void *p_cache, const void *geos)
 Converts a GEOS Geometry into a Geometry object [XYZM dims]. More...
 
GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Simple Geometry. More...
 
GAIAGEO_DECLARE int gaiaIsSimple_r (const void *p_cache, gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Simple Geometry. More...
 
GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line)
 Checks if a Linestring object represents an OGC Closed Geometry. More...
 
GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Closed Linestring. More...
 
GAIAGEO_DECLARE int gaiaIsClosedGeom_r (const void *p_cache, gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Closed Linestring. More...
 
GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line)
 Checks if a Linestring object represents an OGC Ring Geometry. More...
 
GAIAGEO_DECLARE int gaiaIsRing_r (const void *p_cache, gaiaLinestringPtr line)
 Checks if a Linestring object represents an OGC Ring Geometry. More...
 
GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Valid Geometry. More...
 
GAIAGEO_DECLARE char * gaiaIsValidReason (gaiaGeomCollPtr geom)
 return a TEXT string stating if a Geometry is valid and if not valid, a reason why More...
 
GAIAGEO_DECLARE char * gaiaIsValidReason_r (const void *p_cache, gaiaGeomCollPtr geom)
 return a TEXT string stating if a Geometry is valid and if not valid, a reason why More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail (gaiaGeomCollPtr geom)
 return a Geometry detail causing a Geometry to be invalid More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx (gaiaGeomCollPtr geom, int esri_flag)
 return a Geometry detail causing a Geometry to be invalid More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail_r (const void *p_cache, gaiaGeomCollPtr geom)
 return a Geometry detail causing a Geometry to be invalid More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx_r (const void *p_cache, gaiaGeomCollPtr geom, int esri_flag)
 return a Geometry detail causing a Geometry to be invalid More...
 
GAIAGEO_DECLARE int gaiaIsValid_r (const void *p_cache, gaiaGeomCollPtr geom)
 Checks if a Geometry object represents an OGC Valid Geometry. More...
 
GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom, double *length)
 Measures the total Length for a Geometry object. More...
 
GAIAGEO_DECLARE int gaiaGeomCollLength_r (const void *p_cache, gaiaGeomCollPtr geom, double *length)
 Measures the total Length for a Geometry object. More...
 
GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom, int perimeter, double *length)
 Measures the total Length or Perimeter for a Geometry object. More...
 
GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter_r (const void *p_cache, gaiaGeomCollPtr geom, int perimeter, double *length)
 Measures the total Length or Perimeter for a Geometry object. More...
 
GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *area)
 Measures the total Area for a Geometry object. More...
 
GAIAGEO_DECLARE int gaiaGeomCollArea_r (const void *p_cache, gaiaGeomCollPtr geom, double *area)
 Measures the total Area for a Geometry object. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize (gaiaGeomCollPtr geom, int force_multi)
 Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize_r (const void *p_cache, gaiaGeomCollPtr geom, int force_multi)
 Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon. More...
 
GAIAGEO_DECLARE int gaiaGeomCollEquals (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Equals. More...
 
GAIAGEO_DECLARE int gaiaGeomCollEquals_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Equals. More...
 
GAIAGEO_DECLARE int gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Disjoint. More...
 
GAIAGEO_DECLARE int gaiaGeomCollDisjoint_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Disjoint. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedDisjoint (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Disjoint (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Intesects. More...
 
GAIAGEO_DECLARE int gaiaGeomCollIntersects_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Intersects. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedIntersects (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Intersects (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Overlaps. More...
 
GAIAGEO_DECLARE int gaiaGeomCollOverlaps_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Overlaps. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedOverlaps (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Overlaps (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Crosses. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCrosses_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Crosses. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedCrosses (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Crosses (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollContains (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Contains. More...
 
GAIAGEO_DECLARE int gaiaGeomCollContains_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Contains. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedContains (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Contains (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollWithin (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Within. More...
 
GAIAGEO_DECLARE int gaiaGeomCollWithin_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Within. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedWithin (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Within (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollTouches (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Touches. More...
 
GAIAGEO_DECLARE int gaiaGeomCollTouches_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial relationship evalution: Touches. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedTouches (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Spatial relationship evalution: Touches (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, const char *pattern)
 Spatial relationship evalution: Relate. More...
 
GAIAGEO_DECLARE int gaiaGeomCollRelate_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, const char *pattern)
 Spatial relationship evalution: Relate. More...
 
GAIAGEO_DECLARE char * gaiaGeomCollRelateBoundaryNodeRule (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, int mode)
 Spatial relationship evalution: Relate Boundary Node Rule. More...
 
GAIAGEO_DECLARE char * gaiaGeomCollRelateBoundaryNodeRule_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, int mode)
 Spatial relationship evalution: Relate Boundary Node Rule. More...
 
GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch (const char *matrix, const char *pattern)
 Spatial relationship evalution: comparing two intersection matrices. More...
 
GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch_r (const void *p_cache, const char *matrix, const char *pattern)
 Spatial relationship evalution: comparing two intersection matrices. More...
 
GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaGeomCollDistance_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Intersection. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Intersection. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Union. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Union. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded (gaiaGeomCollPtr geom)
 Spatial operator: Union Cascaded. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded_r (const void *p_cache, gaiaGeomCollPtr geom)
 Spatial operator: Union Cascaded. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Difference. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Difference. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: SymDifference. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: SymDifference. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary (gaiaGeomCollPtr geom)
 Spatial operator: Boundary. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary_r (const void *p_cache, gaiaGeomCollPtr geom)
 Spatial operator: Boundary. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double *x, double *y)
 Spatial operator: Centroid. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCentroid_r (const void *p_cache, gaiaGeomCollPtr geom, double *x, double *y)
 Spatial operator: Centroid. More...
 
GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, double *y)
 Spatial operator: PointOnSurface. More...
 
GAIAGEO_DECLARE int gaiaGetPointOnSurface_r (const void *p_cache, gaiaGeomCollPtr geom, double *x, double *y)
 Spatial operator: PointOnSurface. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr geom, double tolerance)
 Spatial operator: Simplify. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify_r (const void *p_cache, gaiaGeomCollPtr geom, double tolerance)
 Spatial operator: Simplify. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, double tolerance)
 Spatial operator: Simplify [preserving topology]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplifyPreserveTopology_r (const void *p_cache, gaiaGeomCollPtr geom, double tolerance)
 Spatial operator: Simplify [preserving topology]. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom)
 Spatial operator: ConvexHull. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull_r (const void *p_cache, gaiaGeomCollPtr geom)
 Spatial operator: ConvexHull. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geom, double radius, int points)
 Spatial operator: Buffer. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer_r (const void *p_cache, gaiaGeomCollPtr geom, double radius, int points)
 Spatial operator: Buffer. More...
 
GAIAGEO_DECLARE int gaiaHausdorffDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the Hausdorff distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaHausdorffDistance_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the Hausdorff distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaHausdorffDistanceDensify (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double densify_fract, double *dist)
 Calculates the Hausdorff distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaHausdorffDistanceDensify_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double densify_fract, double *dist)
 Calculates the Hausdorff distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaFrechetDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the Frechet distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaFrechetDistance_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the Frechet distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaFrechetDistanceDensify (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double densify_fract, double *dist)
 Calculates the Frechet distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaFrechetDistanceDensify_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double densify_fract, double *dist)
 Calculates the Frechet distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom, double radius, int points, int left_right)
 Spatial operator: Offset Curve. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve_r (const void *p_cache, gaiaGeomCollPtr geom, double radius, int points, int left_right)
 Spatial operator: Offset Curve. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr geom, double radius, int points, int left_right)
 Spatial operator: Single Sided Buffer. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer_r (const void *p_cache, gaiaGeomCollPtr geom, double radius, int points, int left_right)
 Spatial operator: Single Sided Buffer. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Shared Paths. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Shared Paths. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollPtr ln_geom, double fraction)
 Spatial operator: Line Interpolate Point. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint_r (const void *p_cache, gaiaGeomCollPtr ln_geom, double fraction)
 Spatial operator: Line Interpolate Point. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr ln_geom, double distance)
 Spatial operator: Line Interpolate Equidistant Points. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolateEquidistantPoints_r (const void *p_cache, gaiaGeomCollPtr ln_geom, double distance)
 Spatial operator: Line Interpolate Equidistant Points. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr ln_geom, double start_fraction, double end_fraction)
 Spatial operator: Line Substring. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring_r (const void *p_cache, gaiaGeomCollPtr ln_geom, double start_fraction, double end_fraction)
 Spatial operator: Line Substring. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Shortest Line. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Shortest Line. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance)
 Spatial operator: Snap. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance)
 Spatial operator: Snap. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom)
 Spatial operator: Line Merge. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge_r (const void *p_cache, gaiaGeomCollPtr geom)
 Spatial operator: Line Merge. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Spatial operator: Line Cut At Nodes. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom)
 Spatial operator: Unary Union. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion_r (const void *p_cache, gaiaGeomCollPtr geom)
 Spatial operator: Unary Union. More...
 
GAIAGEO_DECLARE double gaiaLineLocatePoint (gaiaGeomCollPtr ln_geom, gaiaGeomCollPtr pt_geom)
 Determines the location of the closest Point on Linestring to the given Point. More...
 
GAIAGEO_DECLARE double gaiaLineLocatePoint_r (const void *p_cache, gaiaGeomCollPtr ln_geom, gaiaGeomCollPtr pt_geom)
 Determines the location of the closest Point on Linestring to the given Point. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCovers (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Topology check: test if a Geometry covers another one. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCovers_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Topology check: test if a Geometry covers another one. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedCovers (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Topology check: test if a Geometry covers another one (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE int gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Topology check: test if a Geometry is covered by another one. More...
 
GAIAGEO_DECLARE int gaiaGeomCollCoveredBy_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
 Topology check: test if a Geometry is covered by another one. More...
 
GAIAGEO_DECLARE int gaiaGeomCollPreparedCoveredBy (const void *p_cache, gaiaGeomCollPtr geom1, unsigned char *blob1, int size1, gaiaGeomCollPtr geom2, unsigned char *blob2, int size2)
 Topology check: test if a Geometry is covered by another one (GEOSPreparedGeometry) More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: SquareGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: SquareGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: TriangularGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: TriangularGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: HexagonalGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int mode)
 Utility function: HexagonalGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomCollPtr geom, double tolerance, int only_edges)
 Delaunay Triangulation. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation_r (const void *p_cache, gaiaGeomCollPtr geom, double tolerance, int only_edges)
 Delaunay Triangulation. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geom, double extra_frame_size, double tolerance, int only_edges)
 Voronoj Diagram. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram_r (const void *p_cache, gaiaGeomCollPtr geom, double extra_frame_size, double tolerance, int only_edges)
 Voronoj Diagram. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull (gaiaGeomCollPtr geom, double factor, double tolerance, int allow_holes)
 Concave Hull. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull_r (const void *p_cache, gaiaGeomCollPtr geom, double factor, double tolerance, int allow_holes)
 Concave Hull. More...
 
GAIAGEO_DECLARE void gaiaResetRtTopoMsg (const void *p_cache)
 Resets the RTTOPO error and warning messages to an empty state. More...
 
GAIAGEO_DECLARE const char * gaiaGetRtTopoErrorMsg (const void *p_cache)
 Return the latest RTTOPO error message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetRtTopoWarningMsg (const void *p_cache)
 Return the latest RTTOPO warning message (if any) More...
 
GAIAGEO_DECLARE void gaiaSetRtTopoErrorMsg (const void *p_cache, const char *msg)
 Set the current RTTOPO error message. More...
 
GAIAGEO_DECLARE void gaiaSetRtTopoWarningMsg (const void *p_cache, const char *msg)
 Set the current RTTOPO warning message. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid (const void *p_cache, gaiaGeomCollPtr geom)
 Utility function: MakeValid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded (const void *p_cache, gaiaGeomCollPtr geom)
 Utility function: MakeValidDiscarded. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (const void *p_cache, gaiaGeomCollPtr geom, double dist)
 Utility function: Segmentize. More...
 
GAIAGEO_DECLARE int gaiaAzimuth (const void *p_cache, double xa, double ya, double xb, double yb, double *azimuth)
 Utility function: Azimuth. More...
 
GAIAGEO_DECLARE int gaiaEllipsoidAzimuth (const void *p_cache, double xa, double ya, double xb, double yb, double a, double b, double *azimuth)
 Utility function: EllipsoidAzimuth. More...
 
GAIAGEO_DECLARE int gaiaProjectedPoint (const void *p_cache, double x1, double y1, double a, double b, double distance, double azimuth, double *x2, double *y2)
 Utility function: ProjectedPoint. More...
 
GAIAGEO_DECLARE char * gaiaGeoHash (const void *p_cache, gaiaGeomCollPtr geom, int precision)
 Utility function: GeoHash. More...
 
GAIAGEO_DECLARE char * gaiaAsX3D (const void *p_cache, gaiaGeomCollPtr geom, const char *srs, int precision, int options, const char *refid)
 Utility function: AsX3D. More...
 
GAIAGEO_DECLARE int gaia3DDistance (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the minimum 3D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaMaxDistance (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum 2D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaia3DMaxDistance (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum 3D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaia3dLength (const void *p_cache, gaiaGeomCollPtr geom, double *length)
 Calculates the 2D or 3D Length for a Linestring or Multilinestring accordingly to the dimensions of Geometry. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit (const void *p_cache, gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: Split. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft (const void *p_cache, gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: SplitLeft. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (const void *p_cache, gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: SplitRight. More...
 
GAIAGEO_DECLARE int gaiaGeodesicArea (const void *p_cache, gaiaGeomCollPtr geom, double a, double b, int use_ellipsoid, double *area)
 Measures the total Area for a Geometry object (geodesic) More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines (const void *p_cache, gaiaGeomCollPtr input)
 Utility function: re-noding lines. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSubdivide (const void *p_cache, gaiaGeomCollPtr input, int max_vertices)
 Utility function: subdividing Geometry. More...
 
GAIAGEO_DECLARE int gaiaToTWKB (const void *p_cache, gaiaGeomCollPtr geom, unsigned char precision_xy, unsigned char precision_z, unsigned char precision_m, int with_size, int with_bbox, unsigned char **twkb, int *size_twkb)
 Converts a native binary Geometry into a compressed TWKB Geometry. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromTWKB (const void *p_cache, const unsigned char *twkb, int twkb_size, int srid)
 Converts a compressed TWKB Geometry into a native binary Geometry. More...
 
GAIAGEO_DECLARE int gaiaAsEncodedPolyLine (const void *p_cache, gaiaGeomCollPtr geom, unsigned char precision, char **encoded, int *len)
 Converts a native binary Geometry into a GoogleMaps encoded PolyLine. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineFromEncodedPolyline (const void *p_cache, const char *encoded, unsigned char precision)
 Converts a GoogleMaps encoded PolyLine into a native binary Geometry (Linestring) More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLine (sqlite3 *db_handle, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance)
 Utility function: DrapeLine. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLineExceptions (sqlite3 *db_handle, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance, int interpolated)
 Utility function: DrapeLineExceptions. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnapToGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double origin_z, double origin_m, double size_x, double size_y, double size_z, double size_m)
 Utility function: SnapToGrid. More...
 

Detailed Description

Geometry handling functions: advanced.

Function Documentation

◆ gaia3DDistance()

GAIAGEO_DECLARE int gaia3DDistance ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the minimum 3D distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
diston completion this variable will contain the calculated distance
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance, gaiaMaxDistance, gaia3DMaxDisance
Note
this function computes the 3D cartesian distance (if Z is supported)
Remarks
RTTOPO support required.

◆ gaia3dLength()

GAIAGEO_DECLARE int gaia3dLength ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double *  length 
)

Calculates the 2D or 3D Length for a Linestring or Multilinestring accordingly to the dimensions of Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry object
lengthon completion this variable will contain the calculated length
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance
Remarks
RTTOPO support required.

◆ gaia3DMaxDistance()

GAIAGEO_DECLARE int gaia3DMaxDistance ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum 3D distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
diston completion this variable will contain the calculated distance
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance, gaia3DDistance, gaiaMaxDistance
Note
this function computes the 3D maximum cartesian distance (if Z is supported)
Remarks
RTTOPO support required.

◆ gaiaAsEncodedPolyLine()

GAIAGEO_DECLARE int gaiaAsEncodedPolyLine ( const void *  p_cache,
gaiaGeomCollPtr  geom,
unsigned char  precision,
char **  encoded,
int *  len 
)

Converts a native binary Geometry into a GoogleMaps encoded PolyLine.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry to be converted
precisionhow much precision (decimal digits)
encodedon succesfull completion this pointer will reference the GoogleMaps encoded PolyLine
lenon succesfull completion this pointer will reference the length (in bytes) of the GoogleMaps encoded PolyLine
Returns
0 on failure: any other value on success.
See also
gaiaLineFromEncodedPolyline
Note
you are responsible to free (before or after) the TWKB geometry created by gaiaToTWKB().
Remarks
RTTOPO support required.

◆ gaiaAsX3D()

GAIAGEO_DECLARE char* gaiaAsX3D ( const void *  p_cache,
gaiaGeomCollPtr  geom,
const char *  srs,
int  precision,
int  options,
const char *  refid 
)

Utility function: AsX3D.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input geometry.
srsthe WKT SRS definition.
precisionthe expected precision (coord decimal digits).
options
refidthe X3D namespace
Returns
NULL on failure: a null-terminated text string on success
Note
you are responsible to free (before or after) any text string returned by gaiaAsX3D()
Remarks
RTTOPO support required.

◆ gaiaAzimuth()

GAIAGEO_DECLARE int gaiaAzimuth ( const void *  p_cache,
double  xa,
double  ya,
double  xb,
double  yb,
double *  azimuth 
)

Utility function: Azimuth.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
xathe X coordinate of PointA.
yathe Y coordinate of PointA.
xbthe X ccordinate of PointB.
ybthe Y coordinate of PointB.
azimuthon completion this variable will contain the angle in radians from the horizontal of the vector defined by pointA and pointB.
Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
Returns
0 on failure: any other value on success
See also
gaiaProjectedPoint
Remarks
RTTOPO support required.

◆ gaiaBoundary()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary ( gaiaGeomCollPtr  geom)

Spatial operator: Boundary.

Parameters
geomthe Geometry object to be evaluated
Returns
the pointer to newly created Geometry object representing the geometry Boundary of the input Geometry: NULL on failure.
See also
gaiaBoudary_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaBoundary()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaBoundary_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Spatial operator: Boundary.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry object to be evaluated
Returns
the pointer to newly created Geometry object representing the geometry Boundary of the input Geometry: NULL on failure.
See also
gaiaBoudary, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaBoundary_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaConcaveHull()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull ( gaiaGeomCollPtr  geom,
double  factor,
double  tolerance,
int  allow_holes 
)

Concave Hull.

Parameters
geompointer to input Geometry object.
factormultiplier used for filtering Delaunay triangles: please read the note.
toleranceoptional snapping tolerance.
allow_holesif FALSE any interior hole will be suppressed.
Returns
the pointer to newly created Geometry object (always of the Polygon type): NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaConcaveHull_r, gaiaFreeGeomColl, gaiaDelaunayTriangulation
Note
This function will first create the Delauany Triangulation corresponding to input Geometry, determining at the same time the standard deviation for all edge's lengths.
Then in a second pass all Delaunay's triangles will be filtered, and all triangles presenting at least one edge longer than standard deviation * factor will be discarded.
All filtered triangles will then be merged altogether so to create the Concave Hull.
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaConcaveHull()
not reentrant and thread unsafe.
Remarks
GEOS-TRUNK support required.

◆ gaiaConcaveHull_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  factor,
double  tolerance,
int  allow_holes 
)

Concave Hull.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to input Geometry object.
factormultiplier used for filtering Delaunay triangles: please read the note.
toleranceoptional snapping tolerance.
allow_holesif FALSE any interior hole will be suppressed.
Returns
the pointer to newly created Geometry object (always of the Polygon type): NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaConcaveHull, gaiaFreeGeomColl, gaiaDelaunayTriangulation
Note
This function will first create the Delauany Triangulation corresponding to input Geometry, determining at the same time the standard deviation for all edge's lengths.
Then in a second pass all Delaunay's triangles will be filtered, and all triangles presenting at least one edge longer than standard deviation * factor will be discarded.
All filtered triangles will then be merged altogether so to create the Concave Hull.
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaConcaveHull_r()
reentrant and thread-safe.
Remarks
GEOS-TRUNK support required.

◆ gaiaConvexHull()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull ( gaiaGeomCollPtr  geom)

Spatial operator: ConvexHull.

Parameters
geomthe input Geometry object
Returns
the pointer to newly created Geometry object representing the ConvexHull of input Geometry: NULL on failure.
See also
gaiaConvexHull_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaConvexHull()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaConvexHull_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Spatial operator: ConvexHull.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
Returns
the pointer to newly created Geometry object representing the ConvexHull of input Geometry: NULL on failure.
See also
gaiaConvexHull, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaConvexHull_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaCriticalPointFromGEOSmsg()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg ( void  )

Attempts to (possibile) return a Point Geometry extracted from the latest GEOS error / warning message.

Returns
a Point Geometry: NULL if no warning/error was previoysly found or if the current GEOS message doesn't contains a critical Point.
See also
gaiaCriticalPointFromGEOSmsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaCriticalPointFromGEOSmsg_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg_r ( const void *  p_cache)

Attempts to (possibile) return a Point Geometry extracted from the latest GEOS error / warning message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
Returns
a Point Geometry: NULL if no warning/error was previoysly found or if the current GEOS message doesn't contains a critical Point.
See also
gaiaCriticalPointFromGEOSmsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaDelaunayTriangulation()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation ( gaiaGeomCollPtr  geom,
double  tolerance,
int  only_edges 
)

Delaunay Triangulation.

Parameters
geompointer to input Geometry object.
toleranceoptional snapping tolerance.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing triangular POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaDelaunatTriangulation_r, gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaDelaunayTriangulation()
not reentrant and thread unsafe.
Remarks
GEOS-TRUNK support required.

◆ gaiaDelaunayTriangulation_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  tolerance,
int  only_edges 
)

Delaunay Triangulation.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to input Geometry object.
toleranceoptional snapping tolerance.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing triangular POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaDelaunatTriangulation, gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaDelaunayTriangulation_r()
reentrant and thread-safe.
Remarks
GEOS-TRUNK support required.

◆ gaiaDrapeLine()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLine ( sqlite3 *  db_handle,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  tolerance 
)

Utility function: DrapeLine.

Parameters
db_handlepointer to the current DB connection.
geom1the first Geometry object (expected to be a 2D Linestring).
geom2the second Geometry object (expected to be a 3D Linestring).
tolerancetolerance radius.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will return a Geometry of the Linestring type having all points defined by geom1 and dimensions as defined by geom2. Missing Z and/or M coords will by recovered by corresponding points found in geom2 within the given tolerance radius.
both geom1 and geom2 must share the same SRID.
See also
gaiaFreeGeomColl, gaiaDrapeLineExceptions
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaDrapeLine()

◆ gaiaDrapeLineExceptions()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLineExceptions ( sqlite3 *  db_handle,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  tolerance,
int  interpolated 
)

Utility function: DrapeLineExceptions.

Parameters
db_handlepointer to the current DB connection.
geom1the first Geometry object (expected to be a 2D Linestring).
geom2the second Geometry object (expected to be a 3D Linestring).
tolerancetolerance radius.
interpolatedboolean: if TRUE all Vertices for whom Z (and/or M) values had been succesfully interpolated will be considered as valid.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will return a Geometry of the MultiPoint type containing all Vertices from geom1 lacking a corresponding Vertex in geom2, thus leading to dubious Z and/or M coords.
both geom1 and geom2 must share the same SRID.
See also
gaiaFreeGeomColl, gaiaDrapeLine
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaDrapeLine()

◆ gaiaEllipsoidAzimuth()

GAIAGEO_DECLARE int gaiaEllipsoidAzimuth ( const void *  p_cache,
double  xa,
double  ya,
double  xb,
double  yb,
double  a,
double  b,
double *  azimuth 
)

Utility function: EllipsoidAzimuth.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
xathe X coordinate of PointA.
yathe Y coordinate of PointA.
xbthe X ccordinate of PointB.
ybthe Y coordinate of PointB.
amajor axis of the reference spheroid.
bminor axis of the reference spheroid.
azimuthon completion this variable will contain the angle in radians from the horizontal of the vector defined by pointA and pointB.
Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
Returns
0 on failure: any other value on success
See also
gaiaAzimuth
Remarks
RTTOPO support required.

◆ gaiaFrechetDistance()

GAIAGEO_DECLARE int gaiaFrechetDistance ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the Frechet distance intercurring between two Geometry objects.

Parameters
geom1pointer to first Geometry object
geom2pointer to second Geometry object
diston completion this variable will contain the calculated Frechet distance
Returns
0 on failure: any other value on success.
See also
gaiaFrechetDistance_r
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaFrechetDistance_r()

GAIAGEO_DECLARE int gaiaFrechetDistance_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the Frechet distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first Geometry object
geom2pointer to second Geometry object
diston completion this variable will contain the calculated Frechet distance
Returns
0 on failure: any other value on success.
See also
gaiaFrechetDistance
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaFrechetDistanceDensify()

GAIAGEO_DECLARE int gaiaFrechetDistanceDensify ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  densify_fract,
double *  dist 
)

Calculates the Frechet distance intercurring between two Geometry objects.

Parameters
geom1pointer to first Geometry object
geom2pointer to second Geometry object
densify_fractfraction (in the range 0.0 / 1.0) by which to densify each segment. Each segment will be split into a number of equal-lenght subsegments, whose fraction of the total length is closest to the given fraction
diston completion this variable will contain the calculated Frechet distance
Returns
0 on failure: any other value on success.
See also
gaiaFrechetDistance_r
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaFrechetDistanceDensify_r()

GAIAGEO_DECLARE int gaiaFrechetDistanceDensify_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  densify_fract,
double *  dist 
)

Calculates the Frechet distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first Geometry object
geom2pointer to second Geometry object
densify_fractfraction (in the range 0.0 / 1.0) by which to densify each segment. Each segment will be split into a number of equal-lenght subsegments, whose fraction of the total length is closest to the given fraction
diston completion this variable will contain the calculated Frechet distance
Returns
0 on failure: any other value on success.
See also
gaiaFrechetDistance
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaFromGeos_XY()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY ( const void *  geos)

Converts a GEOS Geometry into a Geometry object [XY dims].

Parameters
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XY_r, gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XY()
not reentrant and thread usafe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XY_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY_r ( const void *  p_cache,
const void *  geos 
)

Converts a GEOS Geometry into a Geometry object [XY dims].

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XY, gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XY_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYM()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM ( const void *  geos)

Converts a GEOS Geometry into a Geometry object [XYM dims].

Parameters
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYM_r, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYM()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYM_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM_r ( const void *  p_cache,
const void *  geos 
)

Converts a GEOS Geometry into a Geometry object [XYM dims].

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYM, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYM_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYZ()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ ( const void *  geos)

Converts a GEOS Geometry into a Geometry object [XYZ dims].

Parameters
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYZ_r, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYZ()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYZ_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ_r ( const void *  p_cache,
const void *  geos 
)

Converts a GEOS Geometry into a Geometry object [XYZ dims].

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYZ, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYZ_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYZM()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM ( const void *  geos)

Converts a GEOS Geometry into a Geometry object [XYZM dims].

Parameters
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYZM_r, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYZM()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaFromGeos_XYZM_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM_r ( const void *  p_cache,
const void *  geos 
)

Converts a GEOS Geometry into a Geometry object [XYZM dims].

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geoshandle to GEOS Geometry
Returns
the pointer to the newly created Geometry object
See also
gaiaFromGeos_XYZM, gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaFromGeos_XYZM_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaFromTWKB()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromTWKB ( const void *  p_cache,
const unsigned char *  twkb,
int  twkb_size,
int  srid 
)

Converts a compressed TWKB Geometry into a native binary Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
twkbpointer to TWKB geometry
twkb_sizesize (in bytes) of the TWKB geometry
sridthe SRID of the returned Geometry
Returns
the pointer to newly created Geometry object: NULL on failure.
See also
gaiaToTWKB
Note
you are responsible to destroy the native geometry returned by gaiaFromTWKB().
Remarks
RTTOPO support required.

◆ gaiaGeodesicArea()

GAIAGEO_DECLARE int gaiaGeodesicArea ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  a,
double  b,
int  use_ellipsoid,
double *  area 
)

Measures the total Area for a Geometry object (geodesic)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object
amajor axis of the reference spheroid.
bminor axis of the reference spheroid.
use_ellipsoidif TRUE will measure the Area on the Ellipsoid, otherwise on the Sphere
areaon completion this variable will contain the measured area
Returns
0 on failure: any other value on success
See also
gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea
Remarks
RTTOPO support required.

◆ gaiaGeoHash()

GAIAGEO_DECLARE char* gaiaGeoHash ( const void *  p_cache,
gaiaGeomCollPtr  geom,
int  precision 
)

Utility function: GeoHash.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input geometry.
precisionthe expected precision: if <= 0 will be automatically determined.
Returns
NULL on failure: a null-terminated text string on success
Note
you are responsible to free (before or after) any text string returned by gaiaGeoHash()
Remarks
RTTOPO support required.

◆ gaiaGeomCollArea()

GAIAGEO_DECLARE int gaiaGeomCollArea ( gaiaGeomCollPtr  geom,
double *  area 
)

Measures the total Area for a Geometry object.

Parameters
geompointer to Geometry object
areaon completion this variable will contain the measured area
Returns
0 on failure: any other value on success
See also
gaiaGeoCollArea_r, gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.
Examples
demo1.c.

◆ gaiaGeomCollArea_r()

GAIAGEO_DECLARE int gaiaGeomCollArea_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double *  area 
)

Measures the total Area for a Geometry object.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object
areaon completion this variable will contain the measured area
Returns
0 on failure: any other value on success
See also
gaiaGeoCollArea, gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollBuffer()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer ( gaiaGeomCollPtr  geom,
double  radius,
int  points 
)

Spatial operator: Buffer.

Parameters
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
Returns
the pointer to newly created Geometry object representing the Buffer of input Geometry: NULL on failure.
See also
gaiaGeomCollBuffer_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollBuffer()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollBuffer_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  radius,
int  points 
)

Spatial operator: Buffer.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
Returns
the pointer to newly created Geometry object representing the Buffer of input Geometry: NULL on failure.
See also
gaiaGeomCollBuffer, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollBuffer_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollCentroid()

GAIAGEO_DECLARE int gaiaGeomCollCentroid ( gaiaGeomCollPtr  geom,
double *  x,
double *  y 
)

Spatial operator: Centroid.

Parameters
geompointer to Geometry object.
xon completion this variable will contain the centroid X coordinate
yon completion this variable will contain the centroid Y coordinate
Returns
0 on failure: any other value on success
See also
gaiaGeomCollCentroid_r, gaiaRingCentroid
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollCentroid_r()

GAIAGEO_DECLARE int gaiaGeomCollCentroid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double *  x,
double *  y 
)

Spatial operator: Centroid.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object.
xon completion this variable will contain the centroid X coordinate
yon completion this variable will contain the centroid Y coordinate
Returns
0 on failure: any other value on success
See also
gaiaGeomCollCentroid, gaiaRingCentroid
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollContains()

GAIAGEO_DECLARE int gaiaGeomCollContains ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Contains.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollContains_r, gaiaGeomCollPreparedContains, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollContains_r()

GAIAGEO_DECLARE int gaiaGeomCollContains_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Contains.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollContains, gaiaGeomCollPreparedContains, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollCoveredBy()

GAIAGEO_DECLARE int gaiaGeomCollCoveredBy ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Topology check: test if a Geometry is covered by another one.

Parameters
geom1pointer to first input Geometry object.
geom2pointer to second input Geometry object.
Returns
0 if false; any other value if geom2 is spatially covered by geom1.
See also
gaiaGeomCollCoveredBy_r, gaiaGeomCollPreparedCoveredBy, gaiaGeomCollCovers
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollCoveredBy_r()

GAIAGEO_DECLARE int gaiaGeomCollCoveredBy_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Topology check: test if a Geometry is covered by another one.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first input Geometry object.
geom2pointer to second input Geometry object.
Returns
0 if false; any other value if geom2 is spatially covered by geom1.
See also
gaiaGeomCollCoveredBy, gaiaGeomCollPreparedCoveredBy, gaiaGeomCollCovers
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollCovers()

GAIAGEO_DECLARE int gaiaGeomCollCovers ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Topology check: test if a Geometry covers another one.

Parameters
geom1pointer to first input Geometry object.
geom2pointer to second input Geometry object.
Returns
0 if false; any other value if geom1 spatially covers geom2.
See also
gaiaGeomCollCovers_r, gaiaGeomCollPreparedCovers, gaiaGeomCollCoveredBy
Note
not reentrant and thead unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollCovers_r()

GAIAGEO_DECLARE int gaiaGeomCollCovers_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Topology check: test if a Geometry covers another one.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first input Geometry object.
geom2pointer to second input Geometry object.
Returns
0 if false; any other value if geom1 spatially covers geom2.
See also
gaiaGeomCollCovers, gaiaGeomCollPreparedCovers, gaiaGeomCollCoveredBy
Note
reentrant and thead-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollCrosses()

GAIAGEO_DECLARE int gaiaGeomCollCrosses ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Crosses.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollCrosses_r, gaiaGeomCollPreparedCrosses, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollCrosses_r()

GAIAGEO_DECLARE int gaiaGeomCollCrosses_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Crosses.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollCrosses, gaiaGeomCollPreparedCrosses, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollDisjoint()

GAIAGEO_DECLARE int gaiaGeomCollDisjoint ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Disjoint.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollDisjoint_r, gaiaGeomCollEquals, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
Obsolete: not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollDisjoint_r()

GAIAGEO_DECLARE int gaiaGeomCollDisjoint_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Disjoint.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollDisjoint_r, gaiaGeomCollEquals, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollDistance()

GAIAGEO_DECLARE int gaiaGeomCollDistance ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum distance intercurring between two Geometry objects.

Parameters
geom1the first Geometry object
geom2the second Geometry object
diston completion this variable will contain the calculated distance
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance_r, gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance
Note
this function always computes the 2D cartesian distance.
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollDistance_r()

GAIAGEO_DECLARE int gaiaGeomCollDistance_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
diston completion this variable will contain the calculated distance
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance, gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance
Note
this function always computes the 2D cartesian distance.
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollEquals()

GAIAGEO_DECLARE int gaiaGeomCollEquals ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Equals.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollEquals_r, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
Obsolete: not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollEquals_r()

GAIAGEO_DECLARE int gaiaGeomCollEquals_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Equals.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollIntersects()

GAIAGEO_DECLARE int gaiaGeomCollIntersects ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Intesects.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollIntersects_r, gaiaGeomCollPreparedIntersects, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollIntersects_r()

GAIAGEO_DECLARE int gaiaGeomCollIntersects_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Intersects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollIntersects, gaiaGeomCollPreparedIntersects, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollLength()

GAIAGEO_DECLARE int gaiaGeomCollLength ( gaiaGeomCollPtr  geom,
double *  length 
)

Measures the total Length for a Geometry object.

Parameters
geompointer to Geometry object
lengthon completion this variable will contain the measured length
Returns
0 on failure: any other value on success
See also
gaiaGeomCollLenght_r, gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollLength_r()

GAIAGEO_DECLARE int gaiaGeomCollLength_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double *  length 
)

Measures the total Length for a Geometry object.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object
lengthon completion this variable will contain the measured length
Returns
0 on failure: any other value on success
See also
gaiaGeomCollLenght, gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter
Note
reentrant and thread-safe.
Remarks
GEOS support required.
Examples
demo1.c.

◆ gaiaGeomCollLengthOrPerimeter()

GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter ( gaiaGeomCollPtr  geom,
int  perimeter,
double *  length 
)

Measures the total Length or Perimeter for a Geometry object.

Parameters
geompointer to Geometry object
perimeterif TRUE only Polygons will be considered, ignoring any Linesting
the opposite if FALSE (considering only Linestrings and ignoring any Polygon)
lengthon completion this variable will contain the measured length or perimeter
Returns
0 on failure: any other value on success
See also
gaiaGeomCollLengthOrPerimeter_r, gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollLengthOrPerimeter_r()

GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
int  perimeter,
double *  length 
)

Measures the total Length or Perimeter for a Geometry object.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object
perimeterif TRUE only Polygons will be considered, ignoring any Linesting
the opposite if FALSE (considering only Linestrings and ignoring any Polygon)
lengthon completion this variable will contain the measured length or perimeter
Returns
0 on failure: any other value on success
See also
gaiaGeomCollLengthOrPerimeter, gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollOverlaps()

GAIAGEO_DECLARE int gaiaGeomCollOverlaps ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Overlaps.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollOverlaps_r, gaiaGeomCollPreparedOverlaps, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollOverlaps_r()

GAIAGEO_DECLARE int gaiaGeomCollOverlaps_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Overlaps.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollOverlaps, gaiaGeomCollPreparedOverlaps, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedContains()

GAIAGEO_DECLARE int gaiaGeomCollPreparedContains ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Contains (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollContains, gaiaGeomCollContains_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedCoveredBy()

GAIAGEO_DECLARE int gaiaGeomCollPreparedCoveredBy ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Topology check: test if a Geometry is covered by another one (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first input Geometry object.
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2pointer to second input Geometry object.
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false; any other value if geom2 is spatially covered by geom1.
See also
gaiaGeomCollCoveredBy, gaiaGeomCollCoveredBy_r, gaiaGeomCollCovers
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollPreparedCovers()

GAIAGEO_DECLARE int gaiaGeomCollPreparedCovers ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Topology check: test if a Geometry covers another one (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first input Geometry object.
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2pointer to second input Geometry object.
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false; any other value if geom1 spatially covers geom2.
Note
reentrant and thread-safe.
See also
gaiaGeomCollCovers, gaiaGeomCollCovers_r
Remarks
GEOS-ADVANCED support required.

◆ gaiaGeomCollPreparedCrosses()

GAIAGEO_DECLARE int gaiaGeomCollPreparedCrosses ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Crosses (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
Note
reentrant and thread-safe.
See also
gaiaGeomCollCrosses, gaiaGeomCollCrosses_r
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedDisjoint()

GAIAGEO_DECLARE int gaiaGeomCollPreparedDisjoint ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Disjoint (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollDisjoint, gaiaGeomCollDisjoint_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedIntersects()

GAIAGEO_DECLARE int gaiaGeomCollPreparedIntersects ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Intersects (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollIntersects, gaiaGeomCollIntersects_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedOverlaps()

GAIAGEO_DECLARE int gaiaGeomCollPreparedOverlaps ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Overlaps (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollOverlaps, gaiaGeomCollOverlaps_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedTouches()

GAIAGEO_DECLARE int gaiaGeomCollPreparedTouches ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Touches (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollTouches, gaiaGeomCollTouches_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollPreparedWithin()

GAIAGEO_DECLARE int gaiaGeomCollPreparedWithin ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
unsigned char *  blob1,
int  size1,
gaiaGeomCollPtr  geom2,
unsigned char *  blob2,
int  size2 
)

Spatial relationship evalution: Within (GEOSPreparedGeometry)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
blob1the BLOB corresponding to the first Geometry
size1the size (in bytes) of the first BLOB
geom2the second Geometry object to be evaluated
blob2the BLOB corresponding to the second Geometry
size2the size (in bytes) of the second BLOB
Returns
0 if false: any other value if true
See also
gaiaGeomCollWithin, gaiaGeomCollWithin_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollRelate()

GAIAGEO_DECLARE int gaiaGeomCollRelate ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
const char *  pattern 
)

Spatial relationship evalution: Relate.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
patternintersection matrix pattern [DE-9IM]
Returns
0 if false: any other value if true
See also
gaiaGeomCollRelate_r, gaiaGeomCollRelateBoundaryNodeRule, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollRelate_r()

GAIAGEO_DECLARE int gaiaGeomCollRelate_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
const char *  pattern 
)

Spatial relationship evalution: Relate.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
patternintersection matrix pattern [DE-9IM]
Returns
0 if false: any other value if true
See also
gaiaGeomCollRelate, gaiaGeomCollRelateBoundaryNodeRule_r, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollRelateBoundaryNodeRule()

GAIAGEO_DECLARE char* gaiaGeomCollRelateBoundaryNodeRule ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
int  mode 
)

Spatial relationship evalution: Relate Boundary Node Rule.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
modecan be one of: 1=OGC/MOD2 (default); 2=Endpoint; 3=MultivalentEndpoint; 4=MonovalentEndpoint
Returns
a DE-9IM intersection matrix; or NULL on invalid geometries.
See also
gaiaGeomCollRelate, gaiaGeomCollRelateBoundaryNodeRule_r, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch
Note
you are responsible to destroy (before or after) the intesection matrix returned by gaiaGeomGeollRelateBoundaryNodeRule()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollRelateBoundaryNodeRule_r()

GAIAGEO_DECLARE char* gaiaGeomCollRelateBoundaryNodeRule_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
int  mode 
)

Spatial relationship evalution: Relate Boundary Node Rule.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
modecan be one of: 1=OGC/MOD2 (default); 2=Endpoint; 3=MultivalentEndpoint; 4=MonovalentEndpoint
Returns
a DE-9IM intersection matrix; or NULL on invalid geometries.
See also
gaiaGeomCollRelate_r, gaiaGeomCollRelateBoundaryNodeRule, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch
Note
you are responsible to destroy (before or after) the intesection matrix returned by gaiaGeomGeollRelateBoundaryNodeRule()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollSimplify()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify ( gaiaGeomCollPtr  geom,
double  tolerance 
)

Spatial operator: Simplify.

Parameters
geomthe input Geometry object
toleranceapproximation threshold
Returns
the pointer to newly created Geometry object representing the simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on failure.
See also
gaiaGeomCollSimplify_r, gaiaFreeGeomColl, gaiaGeomCollSimplifyPreserveTopology
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollSimplify()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollSimplify_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  tolerance 
)

Spatial operator: Simplify.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
toleranceapproximation threshold
Returns
the pointer to newly created Geometry object representing the simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on failure.
See also
gaiaGeomCollSimplify, gaiaFreeGeomColl, gaiaGeomCollSimplifyPreserveTopology
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollSimplify_r()
reentrant and thread safe.
Remarks
GEOS support required.

◆ gaiaGeomCollSimplifyPreserveTopology()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplifyPreserveTopology ( gaiaGeomCollPtr  geom,
double  tolerance 
)

Spatial operator: Simplify [preserving topology].

Parameters
geomthe input Geometry object
toleranceapproximation threshold
Returns
the pointer to newly created Geometry object representing the simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on failure.
See also
gaiaGeomCollSimplifyPreserveTopology_r, gaiaFreeGeomColl, gaiaGeomCollSimplify
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollSimplify()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollSimplifyPreserveTopology_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplifyPreserveTopology_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  tolerance 
)

Spatial operator: Simplify [preserving topology].

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
toleranceapproximation threshold
Returns
the pointer to newly created Geometry object representing the simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on failure.
See also
gaiaGeomCollSimplifyPreserveTopology, gaiaFreeGeomColl, gaiaGeomCollSimplify
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeomCollSimplify_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollTouches()

GAIAGEO_DECLARE int gaiaGeomCollTouches ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Touches.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollTouches_r, gaiaGeomCollPreparedTouches, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollTouches_r()

GAIAGEO_DECLARE int gaiaGeomCollTouches_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Touches.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollTouches, gaiaGeomCollPreparedTouches, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeomCollWithin()

GAIAGEO_DECLARE int gaiaGeomCollWithin ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Within.

Parameters
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollWithin_r, gaiaGeomCollPreparedWithin, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeomCollWithin_r()

GAIAGEO_DECLARE int gaiaGeomCollWithin_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial relationship evalution: Within.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object to be evaluated
geom2the second Geometry object to be evaluated
Returns
0 if false: any other value if true
See also
gaiaGeomCollWithin, gaiaGeomCollPreparedWithin, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollTouches, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeometryDifference()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Difference.

Parameters
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Difference of both input Geometries: NULL on failure.
See also
gaiaGeometryDifference_r, gaiaGeometrySymDifference, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryDifference()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeometryDifference_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Difference.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Difference of both input Geometries: NULL on failure.
See also
gaiaGeometryDifference, gaiaGeometrySymDifference, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryDifference_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeometryIntersection()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Intersection.

Parameters
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Intersection of both input Geometries: NULL on failure.
See also
gaiaGeometryIntersection_r, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaGeometryDifference, gaiaGeometrySymDifference, gaiaBoundary
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryIntersection()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeometryIntersection_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Intersection.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Intersection of both input Geometries: NULL on failure.
See also
gaiaGeometryIntersection, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaGeometryDifference, gaiaGeometrySymDifference, gaiaBoundary
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryIntersection_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeometrySymDifference()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: SymDifference.

Parameters
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry SymDifference of both input Geometries: NULL on failure.
See also
gaiaGeometrySymDifference_r, gaiaGeometryDifference, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometrySymDifference()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeometrySymDifference_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: SymDifference.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry SymDifference of both input Geometries: NULL on failure.
See also
gaiaGeometrySymDifference, gaiaGeometryDifference, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometrySymDifference_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGeometryUnion()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Union.

Parameters
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Union of both input Geometries: NULL on failure.
See also
gaiaGeometryUnion_r, gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryUnion()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGeometryUnion_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Union.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
Returns
the pointer to newly created Geometry object representing the geometry Union of both input Geometries: NULL on failure.
See also
gaiaGeometryUnion, gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaGeometryUnion_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGetGeosAuxErrorMsg()

GAIAGEO_DECLARE const char* gaiaGetGeosAuxErrorMsg ( void  )

Return the latest GEOS (auxiliary) error message (if any)

Returns
the latest GEOS (auxiliary) error message: an empty string if no error was previoysly found.
See also
gaiaGetGeosAuxErrorMsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGetGeosAuxErrorMsg_r()

GAIAGEO_DECLARE const char* gaiaGetGeosAuxErrorMsg_r ( const void *  p_cache)

Return the latest GEOS (auxiliary) error message (if any)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
Returns
the latest GEOS (auxiliary) error message: an empty string if no error was previoysly found.
See also
gaiaGetGeosAuxErrorMsg, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGetGeosErrorMsg()

GAIAGEO_DECLARE const char* gaiaGetGeosErrorMsg ( void  )

Return the latest GEOS error message (if any)

Returns
the latest GEOS error message: an empty string if no error was previoysly found.
See also
gaiaGetGeosErrorMsg_r, gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg, gaiaCriticalPointFromGEOSmsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGetGeosErrorMsg_r()

GAIAGEO_DECLARE const char* gaiaGetGeosErrorMsg_r ( const void *  p_cache)

Return the latest GEOS error message (if any)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
Returns
the latest GEOS error message: an empty string if no error was previoysly found.
See also
gaiaGetGeosErrorMsg, gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg, gaiaCriticalPointFromGEOSmsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGetGeosWarningMsg()

GAIAGEO_DECLARE const char* gaiaGetGeosWarningMsg ( void  )

Return the latest GEOS warning message (if any)

Returns
the latest GEOS warning message: an empty string if no warning was previoysly found.
See also
gaiaGetGeosWarningMsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg, gaiaCriticalPointFromGEOSmsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGetGeosWarningMsg_r()

GAIAGEO_DECLARE const char* gaiaGetGeosWarningMsg_r ( const void *  p_cache)

Return the latest GEOS warning message (if any)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
Returns
the latest GEOS warning message: an empty string if no warning was previoysly found.
See also
gaiaGetGeosWarningMsg, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg, gaiaCriticalPointFromGEOSmsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGetPointOnSurface()

GAIAGEO_DECLARE int gaiaGetPointOnSurface ( gaiaGeomCollPtr  geom,
double *  x,
double *  y 
)

Spatial operator: PointOnSurface.

Parameters
geompointer to Geometry object.
xon completion this variable will contain the Point X coordinate
yon completion this variable will contain the Point Y coordinate
Returns
0 on failure: any other value on success
See also
gaiaGetPointOnSurface_r
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaGetPointOnSurface_r()

GAIAGEO_DECLARE int gaiaGetPointOnSurface_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double *  x,
double *  y 
)

Spatial operator: PointOnSurface.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object.
xon completion this variable will contain the Point X coordinate
yon completion this variable will contain the Point Y coordinate
Returns
0 on failure: any other value on success
See also
gaiaGetPointOnSurface
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaGetRtTopoErrorMsg()

GAIAGEO_DECLARE const char* gaiaGetRtTopoErrorMsg ( const void *  p_cache)

Return the latest RTTOPO error message (if any)

Returns
the latest RTTOPO error message: an empty string if no error was previoysly found.
Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
See also
gaiaResetRtTopoMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoErrorMsg, gaiaSetRtTopoWarningMsg
Remarks
RTTOPO support required.

◆ gaiaGetRtTopoWarningMsg()

GAIAGEO_DECLARE const char* gaiaGetRtTopoWarningMsg ( const void *  p_cache)

Return the latest RTTOPO warning message (if any)

Returns
the latest RTTOPO warning message: an empty string if no warning was previoysly found.
Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
See also
gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaSetRtTopoErrorMsg, gaiaSetRtTopoWarningMsg
Note
not reentrant and thread unsafe.
Remarks
RTTOPO support required.

◆ gaiaHausdorffDistance()

GAIAGEO_DECLARE int gaiaHausdorffDistance ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the Hausdorff distance intercurring between two Geometry objects.

Parameters
geom1pointer to first Geometry object
geom2pointer to second Geometry object
diston completion this variable will contain the calculated Hausdorff distance
Returns
0 on failure: any other value on success.
See also
gaiaHausdorffDistance_r
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaHausdorffDistance_r()

GAIAGEO_DECLARE int gaiaHausdorffDistance_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the Hausdorff distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first Geometry object
geom2pointer to second Geometry object
diston completion this variable will contain the calculated Hausdorff distance
Returns
0 on failure: any other value on success.
See also
gaiaHausdorffDistance
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaHausdorffDistanceDensify()

GAIAGEO_DECLARE int gaiaHausdorffDistanceDensify ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  densify_fract,
double *  dist 
)

Calculates the Hausdorff distance intercurring between two Geometry objects.

Parameters
geom1pointer to first Geometry object
geom2pointer to second Geometry object
densify_fractfraction (in the range 0.0 / 1.0) by which to densify each segment. Each segment will be split into a number of equal-lenght subsegments, whose fraction of the total length is closest to the given fraction
diston completion this variable will contain the calculated Hausdorff distance
Returns
0 on failure: any other value on success.
See also
gaiaHausdorffDistance_r
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaHausdorffDistanceDensify_r()

GAIAGEO_DECLARE int gaiaHausdorffDistanceDensify_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  densify_fract,
double *  dist 
)

Calculates the Hausdorff distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first Geometry object
geom2pointer to second Geometry object
densify_fractfraction (in the range 0.0 / 1.0) by which to densify each segment. Each segment will be split into a number of equal-lenght subsegments, whose fraction of the total length is closest to the given fraction
diston completion this variable will contain the calculated Hausdorff distance
Returns
0 on failure: any other value on success.
See also
gaiaHausdorffDistance
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaHexagonalGrid()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: HexagonalGrid.

Parameters
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing hexagonal POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaGexagonalGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaHexagonalGrid()
not reentrant and thread unsafe.

◆ gaiaHexagonalGrid_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: HexagonalGrid.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing hexagonal POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaGexagonalGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaHexagonalGrid_r()
reentrant and thread-safe.

◆ gaiaIntersectionMatrixPatternMatch()

GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch ( const char *  matrix,
const char *  pattern 
)

Spatial relationship evalution: comparing two intersection matrices.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
matrixfirst intersection matrix [DE-9IM] to be compared
patternsecond intersection matrix [DE-9IM] to be compared
(reference pattern)
Returns
0 if false: any other value if true; -1 on invalid args
See also
gaiaGeomCollRelateBoundaryNodeRule, gaiaIntersectionMatrixPatternMatch_r
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIntersectionMatrixPatternMatch_r()

GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch_r ( const void *  p_cache,
const char *  matrix,
const char *  pattern 
)

Spatial relationship evalution: comparing two intersection matrices.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
matrixfirst intersection matrix [DE-9IM] to be compared
patternsecond intersection matrix [DE-9IM] to be compared
(reference pattern)
Returns
0 if false: any other value if true; -1 on invalid args
See also
gaiaGeomCollRelateBoundaryNodeRule, gaiaIntersectionMatrixPatternMatch
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsClosed()

GAIAGEO_DECLARE int gaiaIsClosed ( gaiaLinestringPtr  line)

Checks if a Linestring object represents an OGC Closed Geometry.

This function only works on a single linestring - if you pass in a multi-line linestring geometry, it will return 0 (false). See gaiaIsClosedGeom for an alternative.

Parameters
linepointer to Linestring object.
Returns
0 if false; any other value if true
See also
gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosedGeom
Remarks
GEOS support required.

◆ gaiaIsClosedGeom()

GAIAGEO_DECLARE int gaiaIsClosedGeom ( gaiaGeomCollPtr  geom)

Checks if a Geometry object represents an OGC Closed Linestring.

Parameters
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsClosedGeom_r, gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsClosedGeom_r()

GAIAGEO_DECLARE int gaiaIsClosedGeom_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Checks if a Geometry object represents an OGC Closed Linestring.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsClosedGeom, gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsRing()

GAIAGEO_DECLARE int gaiaIsRing ( gaiaLinestringPtr  line)

Checks if a Linestring object represents an OGC Ring Geometry.

Parameters
linepointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsRing_r, gaiaIsSimple, gaiaIsClosed, gaiaIsValid
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsRing_r()

GAIAGEO_DECLARE int gaiaIsRing_r ( const void *  p_cache,
gaiaLinestringPtr  line 
)

Checks if a Linestring object represents an OGC Ring Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
linepointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsRing, gaiaIsSimple, gaiaIsClosed, gaiaIsValid
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsSimple()

GAIAGEO_DECLARE int gaiaIsSimple ( gaiaGeomCollPtr  geom)

Checks if a Geometry object represents an OGC Simple Geometry.

Parameters
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsSimple_r, gaiaIsClosed, gaiaIsRing, gaiaIsValid
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsSimple_r()

GAIAGEO_DECLARE int gaiaIsSimple_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Checks if a Geometry object represents an OGC Simple Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsSimple, gaiaIsClosed, gaiaIsRing, gaiaIsValid
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsValid()

GAIAGEO_DECLARE int gaiaIsValid ( gaiaGeomCollPtr  geom)

Checks if a Geometry object represents an OGC Valid Geometry.

Parameters
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsValid_r, gaiaIsSimple, gaiaIsClosed, gaiaIsRing, gaiaIsValidReason
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsValid_r()

GAIAGEO_DECLARE int gaiaIsValid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Checks if a Geometry object represents an OGC Valid Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to Geometry object.
Returns
0 if false; any other value if true
See also
gaiaIsValid, gaiaIsSimple, gaiaIsClosed, gaiaIsRing, gaiaIsValidReason_r
Note
reentrant and thread-safe.
Remarks
GEOS support required.
Examples
demo2.c.

◆ gaiaIsValidDetail()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail ( gaiaGeomCollPtr  geom)

return a Geometry detail causing a Geometry to be invalid

Parameters
geompointer to the Geometry object to be validated.
Returns
pointer to a Geometry object causing invalidity, or NULL.
See also
gaiaIsValid, gaiaIsValidReason, gaiaIsValidDetail_r
Note
you are responsible to destroy the returned Geometry
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsValidDetail_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

return a Geometry detail causing a Geometry to be invalid

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to the Geometry object to be validated.
Returns
pointer to a Geometry object causing invalidity, or NULL.
See also
gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail
Note
you are responsible to destroy the returned Geometry
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsValidDetailEx()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx ( gaiaGeomCollPtr  geom,
int  esri_flag 
)

return a Geometry detail causing a Geometry to be invalid

Parameters
geompointer to the Geometry object to be validated.
esri_flagif set to TRUE if set to TRUE all ESRI-like holes (violating the basic OGC model) will be considered to be valid.
Returns
pointer to a Geometry object causing invalidity, or NULL.
See also
gaiaIsValid, gaiaIsValidReason, gaiaIsValidDetail_r
Note
you are responsible to destroy the returned Geometry
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsValidDetailEx_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
int  esri_flag 
)

return a Geometry detail causing a Geometry to be invalid

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to the Geometry object to be validated.
esri_flagif set to TRUE all ESRI-like holes (violating the basic OGC model) will be considered to be valid.
Returns
pointer to a Geometry object causing invalidity, or NULL.
See also
gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail
Note
you are responsible to destroy the returned Geometry
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaIsValidReason()

GAIAGEO_DECLARE char* gaiaIsValidReason ( gaiaGeomCollPtr  geom)

return a TEXT string stating if a Geometry is valid and if not valid, a reason why

Parameters
geompointer to the Geometry object to be validated.
Returns
a text string.
See also
gaiaIsValid, gaiaIsValidReason_r, gaiaIsValidDetail
Note
you are responsible to free() the returned text string
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaIsValidReason_r()

GAIAGEO_DECLARE char* gaiaIsValidReason_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

return a TEXT string stating if a Geometry is valid and if not valid, a reason why

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to the Geometry object to be validated.
Returns
a text string.
See also
gaiaIsValid_r, gaiaIsValidReason, gaiaIsValidDetail_r
Note
you are responsible to free() the returned text string
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaLineFromEncodedPolyline()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineFromEncodedPolyline ( const void *  p_cache,
const char *  encoded,
unsigned char  precision 
)

Converts a GoogleMaps encoded PolyLine into a native binary Geometry (Linestring)

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
encodedpointer to GoogleMaps encoded PolyLine
precisionhow much precision (decimal digits)
Returns
the pointer to newly created Geometry object: NULL on failure.
See also
gaiaAsEncodedPolyLine
Note
you are responsible to destroy the native geometry returned by gaiaFromTWKB().
Remarks
RTTOPO support required.

◆ gaiaLineInterpolateEquidistantPoints()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolateEquidistantPoints ( gaiaGeomCollPtr  ln_geom,
double  distance 
)

Spatial operator: Line Interpolate Equidistant Points.

Parameters
ln_geomthe input Geometry object [expected to be of lineal type]
distanceregular distance between interpolated points
Returns
the pointer to newly created Geometry object representing a MultiPoint; such MultiPoint always supports the M coordinate (the corresponding value representing the progressive distance for each interpolated Point). individual Points will be regularly spaced by the given distance: NULL on failure.
See also
gaiaLineInterpolateEquidistantPoints_r, gaiaLineInterpolatePoint, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineInterpolateEquidistantPoints()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineInterpolateEquidistantPoints_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolateEquidistantPoints_r ( const void *  p_cache,
gaiaGeomCollPtr  ln_geom,
double  distance 
)

Spatial operator: Line Interpolate Equidistant Points.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
ln_geomthe input Geometry object [expected to be of lineal type]
distanceregular distance between interpolated points
Returns
the pointer to newly created Geometry object representing a MultiPoint; such MultiPoint always supports the M coordinate (the corresponding value representing the progressive distance for each interpolated Point). individual Points will be regularly spaced by the given distance: NULL on failure.
See also
gaiaLineInterpolateEquidistantPoints, gaiaLineInterpolatePoint, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineInterpolateEquidistantPoints_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineInterpolatePoint()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint ( gaiaGeomCollPtr  ln_geom,
double  fraction 
)

Spatial operator: Line Interpolate Point.

Parameters
ln_geomthe input Geometry object [expected to be of lineal type]
fractiontotal length fraction [in the range 0.0 / 1.0]
Returns
the pointer to newly created Geometry object representing a Point laying on the input Geometry and positioned at the given length fraction: NULL on failure.
See also
gaiaLineInterpolatePoint_r, gaiaLineInterpolateEquidistantPoints, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineInterpolatePoint()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineInterpolatePoint_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint_r ( const void *  p_cache,
gaiaGeomCollPtr  ln_geom,
double  fraction 
)

Spatial operator: Line Interpolate Point.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
ln_geomthe input Geometry object [expected to be of lineal type]
fractiontotal length fraction [in the range 0.0 / 1.0]
Returns
the pointer to newly created Geometry object representing a Point laying on the input Geometry and positioned at the given length fraction: NULL on failure.
See also
gaiaLineInterpolatePoint, gaiaLineInterpolateEquidistantPoints, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineInterpolatePoint_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineLocatePoint()

GAIAGEO_DECLARE double gaiaLineLocatePoint ( gaiaGeomCollPtr  ln_geom,
gaiaGeomCollPtr  pt_geom 
)

Determines the location of the closest Point on Linestring to the given Point.

Parameters
ln_geompointer to first input Geometry object [expected to be of the lineal type].
pt_geompointer to second input Geometry object [expected to be a Point].
Returns
the fraction [in the range 0.0 / 1.0] of ln_geom total length where the closest Point to pt_geom lays.
See also
gaiaLineLocatePoint_r
Note
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineLocatePoint_r()

GAIAGEO_DECLARE double gaiaLineLocatePoint_r ( const void *  p_cache,
gaiaGeomCollPtr  ln_geom,
gaiaGeomCollPtr  pt_geom 
)

Determines the location of the closest Point on Linestring to the given Point.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
ln_geompointer to first input Geometry object [expected to be of the lineal type].
pt_geompointer to second input Geometry object [expected to be a Point].
Returns
the fraction [in the range 0.0 / 1.0] of ln_geom total length where the closest Point to pt_geom lays.
See also
gaiaLineLocatePoint
Note
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineMerge()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge ( gaiaGeomCollPtr  geom)

Spatial operator: Line Merge.

Parameters
geompointer to input Geometry object.
Returns
the pointer to newly created Geometry object; NULL on failure.
if possible, this representing a reassembled Linestring or MultiLinestring.
See also
gaiaLineMerge_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineMerge()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineMerge_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Spatial operator: Line Merge.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to input Geometry object.
Returns
the pointer to newly created Geometry object; NULL on failure.
if possible, this representing a reassembled Linestring or MultiLinestring.
See also
gaiaLineMerge, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineMerge_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLinesCutAtNodes()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Line Cut At Nodes.

Parameters
geom1pointer to input Geometry object [Linestring or MultiLinestring].
geom2pointer to input Geometry object [Point or MultiPoint].
Returns
the pointer to newly created Geometry object; NULL on failure.
if possible, any input Linestring will be split accordingly to given Node(s): no point will be interpolated, existing Linestring Vertices will be evaluated.
See also
gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLinesCutAtNodes()
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineSubstring()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring ( gaiaGeomCollPtr  ln_geom,
double  start_fraction,
double  end_fraction 
)

Spatial operator: Line Substring.

Parameters
ln_geomthe input Geometry object [expected to be of lineal type]
start_fractionsubstring start, expressed as total length fraction [in the range 0.0 / 1.0]
end_fractionsubstring end, expressed as total length fraction
Returns
the pointer to newly created Geometry object representing a Linestring laying on the input Geometry.
this Linestring will begin (and stop) at given total length fractions. NULL on failure.
See also
gaiaLineSubstring_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineSubstring()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaLineSubstring_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring_r ( const void *  p_cache,
gaiaGeomCollPtr  ln_geom,
double  start_fraction,
double  end_fraction 
)

Spatial operator: Line Substring.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
ln_geomthe input Geometry object [expected to be of lineal type]
start_fractionsubstring start, expressed as total length fraction [in the range 0.0 / 1.0]
end_fractionsubstring end, expressed as total length fraction
Returns
the pointer to newly created Geometry object representing a Linestring laying on the input Geometry.
this Linestring will begin (and stop) at given total length fractions. NULL on failure.
See also
gaiaLineSubstring, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaLineSubstring_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaMakeValid()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Utility function: MakeValid.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will attempt to create a valid representation of a given invalid geometry without loosing any of the input vertices.
Already-valid geometries are returned without further intervention.
NULL will be returned if the passed argument is invalid.
See also
gaiaFreeGeomColl, gaiaMakeValidDiscarded
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaMakeValid()
Remarks
RTTOPO support required.

◆ gaiaMakeValidDiscarded()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Utility function: MakeValidDiscarded.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will attempt to collect any invalid item (offending geometries) discarded by gaiaMakeValid while building a valid Geometry.
Saving any discarded item could be useful for a finer (manual) adjustment.
NULL will be returned if gaiaMakeValid hasn't identified any offending item to be discarded during the validation.
See also
gaiaFreeGeomColl, gaiaMakeValid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaMakeValidDiscarded()
Remarks
RTTOPO support required.

◆ gaiaMaxDistance()

GAIAGEO_DECLARE int gaiaMaxDistance ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum 2D distance intercurring between two Geometry objects.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1the first Geometry object
geom2the second Geometry object
diston completion this variable will contain the calculated distance
Returns
0 on failure: any other value on success.
See also
gaiaGeomCollDistance, gaia3DDistance, gaia3DMaxDistance
Note
this function computes the 2D maximum cartesian distance (Z is always ignored)
Remarks
RTTOPO support required.

◆ gaiaNodeLines()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines ( const void *  p_cache,
gaiaGeomCollPtr  input 
)

Utility function: re-noding lines.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
inputthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
The function fully nodes a set of linestrings, using the least nodes preserving all the input ones.
See also
gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaNodeLines()
Remarks
RTTOPO support required.

◆ gaiaOffsetCurve()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve ( gaiaGeomCollPtr  geom,
double  radius,
int  points,
int  left_right 
)

Spatial operator: Offset Curve.

Parameters
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
left_rightif set to 1 the left-sided OffsetCurve will be returned; otherwise the right-sided one.
Returns
the pointer to newly created Geometry object representing the OffsetCurve of input Geometry: NULL on failure.
See also
gaiaOffsetCurve_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaOffsetCurve()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaOffsetCurve_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  radius,
int  points,
int  left_right 
)

Spatial operator: Offset Curve.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
left_rightif set to 1 the left-sided OffsetCurve will be returned; otherwise the right-sided one.
Returns
the pointer to newly created Geometry object representing the OffsetCurve of input Geometry: NULL on failure.
See also
gaiaOffsetCurve, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaOffsetCurve_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaPolygonize()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize ( gaiaGeomCollPtr  geom,
int  force_multi 
)

Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon.

Parameters
geomthe input Geometry object
force_multiif not set to 0, then an eventual Polygon will be returned casted to MultiPolygon
Returns
the pointer to newly created Geometry object representing a Polygon or MultiPolygon Geometry: NULL on failure.
See also
gaiaPolygonize_r, gaiaMakePolygon, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaPolygonize()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaPolygonize_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
int  force_multi 
)

Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
force_multiif not set to 0, then an eventual Polygon will be returned casted to MultiPolygon
Returns
the pointer to newly created Geometry object representing a Polygon or MultiPolygon Geometry: NULL on failure.
See also
gaiaPolygonize, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaPolygonize_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaProjectedPoint()

GAIAGEO_DECLARE int gaiaProjectedPoint ( const void *  p_cache,
double  x1,
double  y1,
double  a,
double  b,
double  distance,
double  azimuth,
double *  x2,
double *  y2 
)

Utility function: ProjectedPoint.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
x1the X coordinate of the Start Point.
y1the Y coordinate of the Start Point.
amajor axis of the reference spheroid.
bminor axis of the reference spheroid.
distancea distance expressed in Meters
azimuth(aka bearing aka heading) expressed in radians; on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
x2on completion this variable will contain the the X coordinate of the Projected Point.
y2on completion this variable will contain the the Y coordinate of the Projected Point.
Returns
0 on failure: any other value on success
Remarks
RTTOPO support required.

◆ gaiaResetGeosMsg()

GAIAGEO_DECLARE void gaiaResetGeosMsg ( void  )

Resets the GEOS error and warning messages to an empty state.

See also
gaiaResetGeosMsg_r, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaResetGeosMsg_r()

GAIAGEO_DECLARE void gaiaResetGeosMsg_r ( const void *  p_cache)

Resets the GEOS error and warning messages to an empty state.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
See also
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaResetRtTopoMsg()

GAIAGEO_DECLARE void gaiaResetRtTopoMsg ( const void *  p_cache)

Resets the RTTOPO error and warning messages to an empty state.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
See also
gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoErrorMsg, gaiaSetRtTopoWarningMsg
Remarks
RTTOPO support required.

◆ gaiaSegmentize()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  dist 
)

Utility function: Segmentize.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object.
distthe meximum segment length.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will return a modified geometry having no segment longer than the given distance.
Distance computation is performed in 2d only.
all Points or segments shorter than 'dist' will be returned without further intervention.
NULL will be returned if the passed argument is invalid.
See also
gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSegmentize()
Remarks
RTTOPO support required.

◆ gaiaSetGeosAuxErrorMsg()

GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg ( const char *  msg)

Set the current GEOS (auxiliary) error message.

Parameters
msgthe error message to be set.
See also
gaiaSetAuxErrorMsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaSetGeosAuxErrorMsg_r()

GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg_r ( const void *  p_cache,
const char *  msg 
)

Set the current GEOS (auxiliary) error message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
msgthe error message to be set.
See also
gaiaSetAuxErrorMsg, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaSetGeosErrorMsg()

GAIAGEO_DECLARE void gaiaSetGeosErrorMsg ( const char *  msg)

Set the current GEOS error message.

Parameters
msgthe error message to be set.
See also
gaiaSetGeosErrorMsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaSetGeosErrorMsg_r()

GAIAGEO_DECLARE void gaiaSetGeosErrorMsg_r ( const void *  p_cache,
const char *  msg 
)

Set the current GEOS error message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
msgthe error message to be set.
See also
gaiaSetGeosErrorMsg, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaSetGeosWarningMsg()

GAIAGEO_DECLARE void gaiaSetGeosWarningMsg ( const char *  msg)

Set the current GEOS warning message.

Parameters
msgthe warning message to be set.
See also
gaiaSetGeosWarningMsg_r, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaSetGeosWarningMsg_r()

GAIAGEO_DECLARE void gaiaSetGeosWarningMsg_r ( const void *  p_cache,
const char *  msg 
)

Set the current GEOS warning message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
msgthe warning message to be set.
See also
gaiaSetGeosWarningMsg, gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg
Note
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaSetRtTopoErrorMsg()

GAIAGEO_DECLARE void gaiaSetRtTopoErrorMsg ( const void *  p_cache,
const char *  msg 
)

Set the current RTTOPO error message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
msgthe error message to be set.
See also
gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoWarningMsg
Remarks
RTTOPO support required.

◆ gaiaSetRtTopoWarningMsg()

GAIAGEO_DECLARE void gaiaSetRtTopoWarningMsg ( const void *  p_cache,
const char *  msg 
)

Set the current RTTOPO warning message.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
msgthe warning message to be set.
See also
gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoErrorMsg
Remarks
RTTOPO support required.

◆ gaiaSharedPaths()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Shared Paths.

Parameters
geom1pointer to first Geometry object
geom2pointer to second Geometry object
Returns
the pointer to newly created Geometry object representing any Share Path common to both input geometries: NULL on failure.
See also
gaiaSharedPaths_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSharedPaths()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSharedPaths_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Shared Paths.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to first Geometry object
geom2pointer to second Geometry object
Returns
the pointer to newly created Geometry object representing any Share Path common to both input geometries: NULL on failure.
See also
gaiaSharedPaths, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSharedPaths_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaShortestLine()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Shortest Line.

Parameters
geom1pointer to the first Geometry object.
geom2pointer to the second Geometry object.
Returns
the pointer to newly created Geometry object representing a Linestring; NULL on failure.
the returned Linestring graphically represents the minimum distance intercurrinng between both input geometries.
See also
gaiaShortestLine_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaShortestLine()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaShortestLine_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2 
)

Spatial operator: Shortest Line.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to the first Geometry object.
geom2pointer to the second Geometry object.
Returns
the pointer to newly created Geometry object representing a Linestring; NULL on failure.
the returned Linestring graphically represents the minimum distance intercurrinng between both input geometries.
See also
gaiaShortestLine, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaShortestLine_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSingleSidedBuffer()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer ( gaiaGeomCollPtr  geom,
double  radius,
int  points,
int  left_right 
)

Spatial operator: Single Sided Buffer.

Parameters
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
left_rightif set to 1 the left-sided Buffer will be returned; otherwise the right-sided one.
Returns
the pointer to newly created Geometry object representing the single-sided Buffer of input Geometry: NULL on failure.
See also
gaiaSingleSidedBuffer_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSingleSidedBuffer()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSingleSidedBuffer_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  radius,
int  points,
int  left_right 
)

Spatial operator: Single Sided Buffer.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object
radiusthe buffer's radius
pointsnumber of points (aka vertices) to be used in order to approximate a circular arc.
left_rightif set to 1 the left-sided Buffer will be returned; otherwise the right-sided one.
Returns
the pointer to newly created Geometry object representing the single-sided Buffer of input Geometry: NULL on failure.
See also
gaiaSingleSidedBuffer, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSingleSidedBuffer_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSnap()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  tolerance 
)

Spatial operator: Snap.

Parameters
geom1pointer to the first Geometry object.
geom2pointer to the second Geometry object.
toleranceapproximation factor
Returns
the pointer to newly created Geometry object; NULL on failure.
the returned Geometry represents the first input Geometry (nicely snapped to the second input Geometry, whenever is possible).
See also
gaiaSnap_r, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSnap()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSnap_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap_r ( const void *  p_cache,
gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double  tolerance 
)

Spatial operator: Snap.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geom1pointer to the first Geometry object.
geom2pointer to the second Geometry object.
toleranceapproximation factor
Returns
the pointer to newly created Geometry object; NULL on failure.
the returned Geometry represents the first input Geometry (nicely snapped to the second input Geometry, whenever is possible).
See also
gaiaSnap, gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSnap_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaSnapToGrid()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnapToGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  origin_z,
double  origin_m,
double  size_x,
double  size_y,
double  size_z,
double  size_m 
)

Utility function: SnapToGrid.

Parameters
geomthe input Geometry object.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
origin_zthe Z ccordinate identifying the Grid Origin.
origin_mthe M coordinate identifiying the Grid Origin.
size_xGrid cell size (X axis).
size_yGrid cell size (Y axis).
size_zGrid cell size (Z axis).
size_mGrid cell size (M axis).
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will return a modified geometry having all points snapped to a regular Grid defined by its origin and cell size.
Consecutive points falling on the same cell will be removed, eventually returning NULL if
output points are not enough to define a geometry of the given type.
Collapsed geometries in a collection are stripped from it.
Specify 0 as size for any dimension you don't want to snap to a grid.
NULL will be returned if the passed argument is invalid.
See also
gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSnapToGrid()

◆ gaiaSplit()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit ( const void *  p_cache,
gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: Split.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
inputthe input Geometry object.
bladethe blade Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
The function supports splitting a line by point, a line by line, a polygon by line.
See also
gaiaFreeGeomColl, gaiaSplitLeft, gaiaSplitRight
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSplit()
gaiaSplit will return both the left and the right split halves at the same time.
Remarks
RTTOPO support required.

◆ gaiaSplitLeft()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft ( const void *  p_cache,
gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: SplitLeft.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
inputthe input Geometry object.
bladethe blade Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
The function supports splitting a line by point, a line by line, a polygon by line.
See also
gaiaFreeGeomColl, gaiaSplit, gaiaSplitRight
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSplitLeft()
gaiaSplitLeft will only return the left split half; NULL may be eventually returned if empty.
Remarks
RTTOPO support required.

◆ gaiaSplitRight()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight ( const void *  p_cache,
gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: SplitRight.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
inputthe input Geometry object.
bladethe blade Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
The function supports splitting a line by point, a line by line, a polygon by line.
See also
gaiaFreeGeomColl, gaiaSplit, gaiaSplitLeft
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSplitRight()
gaiaSplitLeft will only return the right split half; NULL may be eventually returned if empty.
Remarks
RTTOPO support required.

◆ gaiaSquareGrid()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: SquareGrid.

Parameters
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing square POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaSquareGrid_r, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSquareGrid()
not reentrant and thread unsafe.

◆ gaiaSquareGrid_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: SquareGrid.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing square POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaSquareGrid, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSquareGrid_r()
reentrant and thread-safe.

◆ gaiaSubdivide()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSubdivide ( const void *  p_cache,
gaiaGeomCollPtr  input,
int  max_vertices 
)

Utility function: subdividing Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
inputthe input Geometry object.
max_verticesthe maximun number of vertices for each part in the output geometry that will be returned.
Returns
the pointer to newly created Geometry object: NULL on failure.
See also
gaiaFreeGeomColl
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaSubdivide()
Remarks
RTTOPO support required.

◆ gaiaToGeos()

GAIAGEO_DECLARE void* gaiaToGeos ( const gaiaGeomCollPtr  gaia)

Converts a Geometry object into a GEOS Geometry.

Parameters
gaiapointer to Geometry object
Returns
handle to GEOS Geometry
See also
gaiaToGeos_r, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM, gaiaToGeosSelective
Note
convenience method, simply defaulting to gaiaToGeosSelective(geom, GAIA2GEOS_ALL)
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaToGeos_r()

GAIAGEO_DECLARE void* gaiaToGeos_r ( const void *  p_cache,
const gaiaGeomCollPtr  gaia 
)

Converts a Geometry object into a GEOS Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
gaiapointer to Geometry object
Returns
handle to GEOS Geometry
See also
gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM, gaiaToGeosSelective_r
Note
convenience method, simply defaulting to gaiaToGeosSelective_r(p_cache, geom, GAIA2GEOS_ALL)
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaToGeosSelective()

GAIAGEO_DECLARE void* gaiaToGeosSelective ( const gaiaGeomCollPtr  gaia,
int  mode 
)

Converts a Geometry object into a GEOS Geometry.

Parameters
gaiapointer to Geometry object
modeone of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS, GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS
Returns
handle to GEOS Geometry
See also
gaiaToGeosSelective_r, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
if the mode argument is not GAIA2GEOS_ALL only elementary geometries of the selected type will be passed to GEOS, ignoring any other.
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaToGeosSelective_r()

GAIAGEO_DECLARE void* gaiaToGeosSelective_r ( const void *  p_cache,
const gaiaGeomCollPtr  gaia,
int  mode 
)

Converts a Geometry object into a GEOS Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
gaiapointer to Geometry object
modeone of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS, GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS
Returns
handle to GEOS Geometry
See also
gaiaToGeosSelective, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
Note
if the mode argument is not GAIA2GEOS_ALL only elementary geometries of the selected type will be passed to GEOS, ignoring any other.
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaToTWKB()

GAIAGEO_DECLARE int gaiaToTWKB ( const void *  p_cache,
gaiaGeomCollPtr  geom,
unsigned char  precision_xy,
unsigned char  precision_z,
unsigned char  precision_m,
int  with_size,
int  with_bbox,
unsigned char **  twkb,
int *  size_twkb 
)

Converts a native binary Geometry into a compressed TWKB Geometry.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry to be converted
precision_xyhow much precision (decimal digits) X and Y
precision_zhow much precision (decimal digits) Z
precision_mhow much precision (decimal digits) M
with_sizeincluding sizes into the TWKB
with_bboxincluding a BBOX into the TWKB
twkbon succesfull completion this pointer will reference the TWKB geometry
size_twkbon succesfull completion this pointer will reference the size (in bytes) of the TWKB geometry
Returns
0 on failure: any other value on success.
See also
gaiaFromTWKB
Note
you are responsible to free (before or after) the TWKB geometry created by gaiaToTWKB().
Remarks
RTTOPO support required.

◆ gaiaTriangularGrid()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: TriangularGrid.

Parameters
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing triangular POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaTriangularGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaTriangularGrid()
not reentrant and thread unsafe.

◆ gaiaTriangularGrid_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  mode 
)

Utility function: TriangularGrid.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe Geometry to be covered by the Grid.
origin_xthe X ccordinate identifying the Grid Origin.
origin_ythe Y coordinate identifiying the Grid Origin.
sizethe Grid cell-side size.
modeany positive value will return a MULTILINESTRING, any will return a MULTIPOINT; zero will return a MULTIPOLYGON containing riangular POLYGONs.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function will always return a MultiPolygon
NULL will be returned if any argument is invalid.
See also
gaiaTriangularGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaTriangularGrid_r()
reentrant and thread-safe.

◆ gaiaUnaryUnion()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion ( gaiaGeomCollPtr  geom)

Spatial operator: Unary Union.

Parameters
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function is the same as gaiaGeometryUnion, except in that this works internally to the input Geometry itself. NULL on failure.
See also
gaiaUnaryUnion_r, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascaded
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaUnaryUnion()
not reentrant and thread unsafe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaUnaryUnion_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Spatial operator: Unary Union.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function is the same as gaiaGeometryUnion, except in that this works internally to the input Geometry itself. NULL on failure.
See also
gaiaUnaryUnion, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascaded
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaUnaryUnion_r()
reentrant and thread-safe.
Remarks
GEOS-ADVANCED support required.

◆ gaiaUnionCascaded()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded ( gaiaGeomCollPtr  geom)

Spatial operator: Union Cascaded.

Parameters
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function is similar to gaiaUnaryUnion, but it only accepts Polygons and MultiPolygons and it's now deprecated; anyway it's supported on older GEOS versions. NULL on failure.
See also
gaiaUnionCascaded, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaUnionCascaded()
not reentrant and thread unsafe.
Remarks
GEOS support required.

◆ gaiaUnionCascaded_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded_r ( const void *  p_cache,
gaiaGeomCollPtr  geom 
)

Spatial operator: Union Cascaded.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geomthe input Geometry object.
Returns
the pointer to newly created Geometry object: NULL on failure.
this function is similar to gaiaUnaryUnion, but it only accepts Polygons and MultiPolygons and it's now deprecated; anyway it's supported on older GEOS versions. NULL on failure.
See also
gaiaUnionCascaded, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaUnionCascaded_r()
reentrant and thread-safe.
Remarks
GEOS support required.

◆ gaiaVoronojDiagram()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram ( gaiaGeomCollPtr  geom,
double  extra_frame_size,
double  tolerance,
int  only_edges 
)

Voronoj Diagram.

Parameters
geompointer to input Geometry object.
extra_frame_sizepercent factor expanding the BBOX of input Geometry
toleranceoptional snapping tolerance.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON.
Returns
the pointer to newly created Geometry object: NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaVoronojDiagram_r, gaiaFreeGeomColl, gaiaDelaunayTriangulation
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaVoronojDiagram()
not reentrant and thread unsafe.
Remarks
GEOS-TRUNK support required.

◆ gaiaVoronojDiagram_r()

GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  extra_frame_size,
double  tolerance,
int  only_edges 
)

Voronoj Diagram.

Parameters
p_cachea memory pointer returned by spatialite_alloc_connection()
geompointer to input Geometry object.
extra_frame_sizepercent factor expanding the BBOX of input Geometry
toleranceoptional snapping tolerance.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON.
Returns
the pointer to newly created Geometry object: NULL on failure.
NULL will be returned if any argument is invalid.
See also
gaiaVoronojDiagram, gaiaFreeGeomColl, gaiaDelaunayTriangulation
Note
you are responsible to destroy (before or after) any allocated Geometry, this including any Geometry returned by gaiaVoronojDiagram_r()
reentrant and thread-safe.
Remarks
GEOS-TRUNK support required.