SpatiaLite  4.3.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 gaiaIsValidDetail_r (const void *p_cache, gaiaGeomCollPtr geom)
 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 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 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 only_edges)
 Utility function: SquareGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges)
 Utility function: SquareGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges)
 Utility function: TriangularGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges)
 Utility function: TriangularGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges)
 Utility function: HexagonalGrid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges)
 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 gaiaResetLwGeomMsg (void)
 Resets the LWGEOM error and warning messages to an empty state. More...
 
GAIAGEO_DECLARE const char * gaiaGetLwGeomErrorMsg (void)
 Return the latest LWGEOM error message (if any) More...
 
GAIAGEO_DECLARE const char * gaiaGetLwGeomWarningMsg (void)
 Return the latest LWGEOM warning message (if any) More...
 
GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg (const char *msg)
 Set the current LWGEOM error message. More...
 
GAIAGEO_DECLARE void gaiaSetLwGeomWarningMsg (const char *msg)
 Set the current LWGEOM warning message. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid (gaiaGeomCollPtr geom)
 Utility function: MakeValid. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded (gaiaGeomCollPtr geom)
 Utility function: MakeValidDiscarded. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (gaiaGeomCollPtr geom, double dist)
 Utility function: Segmentize. More...
 
GAIAGEO_DECLARE int gaiaAzimuth (double xa, double ya, double xb, double yb, double *azimuth)
 Utility function: Azimuth. More...
 
GAIAGEO_DECLARE int gaiaEllipsoidAzimuth (double xa, double ya, double xb, double yb, double a, double b, double *azimuth)
 Utility function: EllipsoidAzimuth. More...
 
GAIAGEO_DECLARE int gaiaProjectedPoint (double x1, double y1, double a, double b, double distance, double azimuth, double *x2, double *y2)
 Utility function: ProjectedPoint. More...
 
GAIAGEO_DECLARE char * gaiaGeoHash (gaiaGeomCollPtr geom, int precision)
 Utility function: GeoHash. More...
 
GAIAGEO_DECLARE char * gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs, int precision, int options, const char *refid)
 Utility function: AsX3D. More...
 
GAIAGEO_DECLARE int gaia3DDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the minimum 3D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaiaMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum 2D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE int gaia3DMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
 Calculates the maximum 3D distance intercurring between two Geometry objects. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: Split. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: SplitLeft. More...
 
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
 Utility function: SplitRight. More...
 
GAIAGEO_DECLARE int gaiaGeodesicArea (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 (gaiaGeomCollPtr input)
 Utility function: re-noding lines. 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

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

Calculates the minimum 3D 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, gaiaMaxDistance, gaia3DMaxDisance
Note
this function computes the 3D cartesian distance (if Z is supported)
Remarks
LWGEOM support required.
GAIAGEO_DECLARE int gaia3DMaxDistance ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum 3D 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, gaia3DDistance, gaiaMaxDistance
Note
this function computes the 3D maximum cartesian distance (if Z is supported)
Remarks
LWGEOM support required.
GAIAGEO_DECLARE char* gaiaAsX3D ( gaiaGeomCollPtr  geom,
const char *  srs,
int  precision,
int  options,
const char *  refid 
)

Utility function: AsX3D.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE int gaiaAzimuth ( double  xa,
double  ya,
double  xb,
double  yb,
double *  azimuth 
)

Utility function: Azimuth.

Parameters
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
LWGEOM support required.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
GAIAGEO_DECLARE int gaiaEllipsoidAzimuth ( double  xa,
double  ya,
double  xb,
double  yb,
double  a,
double  b,
double *  azimuth 
)

Utility function: EllipsoidAzimuth.

Parameters
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
LWGEOM support required.
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.
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.
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.
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.
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.
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.
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.
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.
GAIAGEO_DECLARE int gaiaGeodesicArea ( gaiaGeomCollPtr  geom,
double  a,
double  b,
int  use_ellipsoid,
double *  area 
)

Measures the total Area for a Geometry object (geodesic)

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE char* gaiaGeoHash ( gaiaGeomCollPtr  geom,
int  precision 
)

Utility function: GeoHash.

Parameters
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
LWGEOM support required.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Examples:
demo1.c.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollRelate
Note
not reentrant and thread unsafe.
Remarks
GEOS support required.
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, gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollRelate
Note
reentrant and thread-safe.
Remarks
GEOS support required.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
GAIAGEO_DECLARE const char* gaiaGetLwGeomErrorMsg ( void  )

Return the latest LWGEOM error message (if any)

Returns
the latest LWGEOM error message: an empty string if no error was previoysly found.
Note
not reentrant and thread unsafe.
See also
gaiaResetLwGeomMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg, gaiaSetLwGeomWarningMsg
Remarks
LWGEOM support required.
GAIAGEO_DECLARE const char* gaiaGetLwGeomWarningMsg ( void  )

Return the latest LWGEOM warning message (if any)

Returns
the latest LWGEOM warning message: an empty string if no warning was previoysly found.
See also
gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaSetLwGeomErrorMsg, gaiaSetLwGeomWarningMsg
Note
not reentrant and thread unsafe.
Remarks
LWGEOM support required.
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.
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.
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.
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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it 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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it 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.
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.
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.
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.
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.
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.
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.
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.
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.
Examples:
demo2.c.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid ( gaiaGeomCollPtr  geom)

Utility function: MakeValid.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded ( gaiaGeomCollPtr  geom)

Utility function: MakeValidDiscarded.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE int gaiaMaxDistance ( gaiaGeomCollPtr  geom1,
gaiaGeomCollPtr  geom2,
double *  dist 
)

Calculates the maximum 2D 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, gaia3DDistance, gaia3DMaxDistance
Note
this function computes the 2D maximum cartesian distance (Z is always ignored)
Remarks
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines ( gaiaGeomCollPtr  input)

Utility function: re-noding lines.

Parameters
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 gaiaNode()
Remarks
LWGEOM support required.
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.
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.
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.
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.
GAIAGEO_DECLARE int gaiaProjectedPoint ( double  x1,
double  y1,
double  a,
double  b,
double  distance,
double  azimuth,
double *  x2,
double *  y2 
)

Utility function: ProjectedPoint.

Parameters
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
LWGEOM support required.
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.
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.
GAIAGEO_DECLARE void gaiaResetLwGeomMsg ( void  )

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

See also
gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg, gaiaSetLwGeomWarningMsg
Note
not reentrant and thread unsafe.
Remarks
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize ( gaiaGeomCollPtr  geom,
double  dist 
)

Utility function: Segmentize.

Parameters
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
LWGEOM support required.
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.
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.
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.
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.
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.
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.
GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg ( const char *  msg)

Set the current LWGEOM error message.

Parameters
msgthe error message to be set.
See also
gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomWarningMsg
Note
not reentrant and thread unsafe.
Remarks
LWGEOM support required.
GAIAGEO_DECLARE void gaiaSetLwGeomWarningMsg ( const char *  msg)

Set the current LWGEOM warning message.

Parameters
msgthe warning message to be set.
See also
gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg
Note
not reentrant and thread unsafe.
Remarks
LWGEOM support required.
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.
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.
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.
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.
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.
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.
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.
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.
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()
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit ( gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: Split.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft ( gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: SplitLeft.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight ( gaiaGeomCollPtr  input,
gaiaGeomCollPtr  blade 
)

Utility function: SplitRight.

Parameters
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
LWGEOM support required.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it 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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
only_edgesif non-zero will return a MULTILINESTRING, otherwise it 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.
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.
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.
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.
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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid ( gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
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.
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.
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r ( const void *  p_cache,
gaiaGeomCollPtr  geom,
double  origin_x,
double  origin_y,
double  size,
int  only_edges 
)

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.
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.
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.
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.
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.
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.
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.
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.
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.