Geometry handling functions: advanced. More...

Go to the source code of this file.
Macros | |
| #define | GAIA2GEOS_ALL 0 |
| #define | GAIA2GEOS_ONLY_POINTS 1 |
| #define | GAIA2GEOS_ONLY_LINESTRINGS 2 |
| #define | GAIA2GEOS_ONLY_POLYGONS 3 |
Functions | |
| GAIAGEO_DECLARE double | gaiaRadsToDegs (double rads) |
| Converts and angle from Radians into Degrees. | |
| GAIAGEO_DECLARE double | gaiaDegsToRads (double degs) |
| Converts and angle from Degrees into Radians. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaTransform (gaiaGeomCollPtr org, char *proj_from, char *proj_to) |
| Tansforms a Geometry object into a different Reference System [aka Reprojection]. | |
| GAIAGEO_DECLARE void | gaiaResetGeosMsg (void) |
| Resets the GEOS error and warning messages to an empty state. | |
| GAIAGEO_DECLARE const char * | gaiaGetGeosErrorMsg (void) |
| Return the latest GEOS error message (if any) | |
| GAIAGEO_DECLARE const char * | gaiaGetGeosWarningMsg (void) |
| Return the latest GEOS warning message (if any) | |
| GAIAGEO_DECLARE void | gaiaSetGeosErrorMsg (const char *msg) |
| Set the current GEOS error message. | |
| GAIAGEO_DECLARE void | gaiaSetGeosWarningMsg (const char *msg) |
| Set the current GEOS warning message. | |
| GAIAGEO_DECLARE void * | gaiaToGeos (const gaiaGeomCollPtr gaia) |
| Converts a Geometry object into a GEOS Geometry. | |
| GAIAGEO_DECLARE void * | gaiaToGeosSelective (const gaiaGeomCollPtr gaia, int mode) |
| Converts a Geometry object into a GEOS Geometry. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaFromGeos_XY (const void *geos) |
| Converts a GEOS Geometry into a Geometry object [XY dims]. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaFromGeos_XYZ (const void *geos) |
| Converts a GEOS Geometry into a Geometry object [XYZ dims]. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaFromGeos_XYM (const void *geos) |
| Converts a GEOS Geometry into a Geometry object [XYM dims]. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaFromGeos_XYZM (const void *geos) |
| Converts a GEOS Geometry into a Geometry object [XYZM dims]. | |
| GAIAGEO_DECLARE int | gaiaIsSimple (gaiaGeomCollPtr geom) |
| Checks if a Geometry object represents an OGC Simple Geometry. | |
| GAIAGEO_DECLARE int | gaiaIsClosed (gaiaLinestringPtr line) |
| Checks if a Linestring object represents an OGC Closed Geometry. | |
| GAIAGEO_DECLARE int | gaiaIsClosedGeom (gaiaGeomCollPtr geom) |
| Checks if a Geometry object represents an OGC Closed Linestring. | |
| GAIAGEO_DECLARE int | gaiaIsRing (gaiaLinestringPtr line) |
| Checks if a Linestring object represents an OGC Ring Geometry. | |
| GAIAGEO_DECLARE int | gaiaIsValid (gaiaGeomCollPtr geom) |
| Checks if a Geometry object represents an OGC Valid Geometry. | |
| GAIAGEO_DECLARE int | gaiaGeomCollLength (gaiaGeomCollPtr geom, double *length) |
| Measures the total Length for a Geometry object. | |
| GAIAGEO_DECLARE int | gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom, int perimeter, double *length) |
| Measures the total Length or Perimeter for a Geometry object. | |
| GAIAGEO_DECLARE int | gaiaGeomCollArea (gaiaGeomCollPtr geom, double *area) |
| Measures the total Area for a Geometry object. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaPolygonize (gaiaGeomCollPtr geom, int force_multi) |
| Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon. | |
| GAIAGEO_DECLARE int | gaiaGeomCollEquals (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Equals. | |
| GAIAGEO_DECLARE int | gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Disjoint. | |
| GAIAGEO_DECLARE int | gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Intesects. | |
| GAIAGEO_DECLARE int | gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Overlaps. | |
| GAIAGEO_DECLARE int | gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Crosses. | |
| GAIAGEO_DECLARE int | gaiaGeomCollContains (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Contains. | |
| GAIAGEO_DECLARE int | gaiaGeomCollWithin (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Within. | |
| GAIAGEO_DECLARE int | gaiaGeomCollTouches (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial relationship evalution: Touches. | |
| GAIAGEO_DECLARE int | gaiaGeomCollRelate (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, const char *pattern) |
| Spatial relationship evalution: Relate. | |
| GAIAGEO_DECLARE int | gaiaGeomCollDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist) |
| Calculates the maximum distance intercurring between two Geometry objects. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeometryIntersection (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Intersection. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeometryUnion (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Union. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaUnionCascaded (gaiaGeomCollPtr geom) |
| Spatial operator: Union Cascaded. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeometryDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Difference. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeometrySymDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: SymDifference. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaBoundary (gaiaGeomCollPtr geom) |
| Spatial operator: Boundary. | |
| GAIAGEO_DECLARE int | gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double *x, double *y) |
| Spatial operator: Centroid. | |
| GAIAGEO_DECLARE int | gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, double *y) |
| Spatial operator: PointOnSurface. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeomCollSimplify (gaiaGeomCollPtr geom, double tolerance) |
| Spatial operator: Simplify. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, double tolerance) |
| Spatial operator: Simplify [preserving topology]. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaConvexHull (gaiaGeomCollPtr geom) |
| Spatial operator: ConvexHull. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaGeomCollBuffer (gaiaGeomCollPtr geom, double radius, int points) |
| Spatial operator: Buffer. | |
| GAIAGEO_DECLARE int | gaiaHausdorffDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist) |
| Calculates the Hausdorff distance intercurring between two Geometry objects. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaOffsetCurve (gaiaGeomCollPtr geom, double radius, int points, int left_right) |
| Spatial operator: Offset Curve. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSingleSidedBuffer (gaiaGeomCollPtr geom, double radius, int points, int left_right) |
| Spatial operator: Single Sided Buffer. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSharedPaths (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Shared Paths. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLineInterpolatePoint (gaiaGeomCollPtr ln_geom, double fraction) |
| Spatial operator: Line Interpolate Point. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr ln_geom, double distance) |
| Spatial operator: Line Interpolate Equidistant Points. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLineSubstring (gaiaGeomCollPtr ln_geom, double start_fraction, double end_fraction) |
| Spatial operator: Line Substring. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaShortestLine (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Shortest Line. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSnap (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance) |
| Spatial operator: Shortest Line. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLineMerge (gaiaGeomCollPtr geom) |
| Spatial operator: Line Merge. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLinesCutAtNodes (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Spatial operator: Line Cut At Nodes. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaUnaryUnion (gaiaGeomCollPtr geom) |
| Spatial operator: Unary Union. | |
| GAIAGEO_DECLARE double | gaiaLineLocatePoint (gaiaGeomCollPtr ln_geom, gaiaGeomCollPtr pt_geom) |
| Determines the location of the closest Point on Linestring to the given Point. | |
| GAIAGEO_DECLARE int | gaiaGeomCollCovers (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Topology check: test if a Geometry covers another one. | |
| GAIAGEO_DECLARE int | gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
| Topology check: test if a Geometry is covered by another one. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSquareGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges) |
| Utility function: SquareGrid. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaTriangularGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges) |
| Utility function: TriangularGrid. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaHexagonalGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y, double size, int only_edges) |
| Utility function: HexagonalGrid. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaDelaunayTriangulation (gaiaGeomCollPtr geom, double tolerance, int only_edges) |
| Delaunay Triangulation. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaVoronojDiagram (gaiaGeomCollPtr geom, double extra_frame_size, double tolerance, int only_edges) |
| Voronoj Diagram. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaConcaveHull (gaiaGeomCollPtr geom, double factor, double tolerance, int allow_holes) |
| Concave Hull. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaMakeValid (gaiaGeomCollPtr geom) |
| Utility function: MakeValid. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaMakeValidDiscarded (gaiaGeomCollPtr geom) |
| Utility function: MakeValidDiscarded. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSegmentize (gaiaGeomCollPtr geom, double dist) |
| Utility function: Segmentize. | |
| GAIAGEO_DECLARE int | gaiaAzimuth (double xa, double ya, double xb, double yb, double *azimuth) |
| Utility function: Azimuth. | |
| GAIAGEO_DECLARE char * | gaiaGeoHash (gaiaGeomCollPtr geom, int precision) |
| Utility function: GeoHash. | |
| GAIAGEO_DECLARE char * | gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs, int precision, int options, const char *defid) |
| Utility function: AsX3D. | |
| GAIAGEO_DECLARE int | gaia3DDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist) |
| Calculates the minimum 3D distance intercurring between two Geometry objects. | |
| GAIAGEO_DECLARE int | gaiaMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist) |
| Calculates the maximum 2D distance intercurring between two Geometry objects. | |
| GAIAGEO_DECLARE int | gaia3DMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist) |
| Calculates the maximum 3D distance intercurring between two Geometry objects. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSplit (gaiaGeomCollPtr input, gaiaGeomCollPtr blade) |
| Utility function: Split. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSplitLeft (gaiaGeomCollPtr input, gaiaGeomCollPtr blade) |
| Utility function: SplitLeft. | |
| GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSplitRight (gaiaGeomCollPtr input, gaiaGeomCollPtr blade) |
| Utility function: SplitRight. | |
| 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. | |
Geometry handling functions: advanced.
| GAIAGEO_DECLARE int gaia3DDistance | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double * | dist | ||
| ) |
Calculates the minimum 3D distance intercurring between two Geometry objects.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| dist | on completion this variable will contain the calculated distance |
| GAIAGEO_DECLARE int gaia3DMaxDistance | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double * | dist | ||
| ) |
Calculates the maximum 3D distance intercurring between two Geometry objects.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| dist | on completion this variable will contain the calculated distance |
| GAIAGEO_DECLARE char* gaiaAsX3D | ( | gaiaGeomCollPtr | geom, |
| const char * | srs, | ||
| int | precision, | ||
| int | options, | ||
| const char * | defid | ||
| ) |
Utility function: AsX3D.
| geom | the input geometry. |
| srs | the WKT SRS definition. |
| precision | the expected precision (coord decimal digits). |
| options | |
| refid | the X3D namespace |
| GAIAGEO_DECLARE int gaiaAzimuth | ( | double | xa, |
| double | ya, | ||
| double | xb, | ||
| double | yb, | ||
| double * | azimuth | ||
| ) |
Utility function: Azimuth.
| xa | the X ccordinate of PointA. |
| ya | the Y coordinate of PointA. |
| xb | the X ccordinate of PointB. |
| yb | the Y coordinate of PointB. |
| azimuth | on 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. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary | ( | gaiaGeomCollPtr | geom | ) |
Spatial operator: Boundary.
| geom | the Geometry object to be evaluated |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull | ( | gaiaGeomCollPtr | geom, |
| double | factor, | ||
| double | tolerance, | ||
| int | allow_holes | ||
| ) |
Concave Hull.
| geom | pointer to input Geometry object. |
| factor | multiplier used for filtering Delaunay triangles: please read the note. |
| tolerance | optional snapping tolerance. |
| allow_hows | if FALSE any interior hole will be suppressed. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull | ( | gaiaGeomCollPtr | geom | ) |
Spatial operator: ConvexHull.
| geom | the input Geometry object |
| GAIAGEO_DECLARE double gaiaDegsToRads | ( | double | degs | ) |
Converts and angle from Degrees into Radians.
| degs | the angle measured in Degrees. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation | ( | gaiaGeomCollPtr | geom, |
| double | tolerance, | ||
| int | only_edges | ||
| ) |
Delaunay Triangulation.
| geom | pointer to input Geometry object. |
| tolerance | optional snapping tolerance. |
| only_edges | if non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing triangular POLYGONs. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY | ( | const void * | geos | ) |
Converts a GEOS Geometry into a Geometry object [XY dims].
| geos | handle to GEOS Geometry |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM | ( | const void * | geos | ) |
Converts a GEOS Geometry into a Geometry object [XYM dims].
| geos | handle to GEOS Geometry |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ | ( | const void * | geos | ) |
Converts a GEOS Geometry into a Geometry object [XYZ dims].
| geos | handle to GEOS Geometry |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM | ( | const void * | geos | ) |
Converts a GEOS Geometry into a Geometry object [XYZM dims].
| geos | handle to GEOS Geometry |
| GAIAGEO_DECLARE char* gaiaGeoHash | ( | gaiaGeomCollPtr | geom, |
| int | precision | ||
| ) |
Utility function: GeoHash.
| geom | the input geometry. |
| precision | the expected precision: if <= 0 will be automatically determined. |
| GAIAGEO_DECLARE int gaiaGeomCollArea | ( | gaiaGeomCollPtr | geom, |
| double * | area | ||
| ) |
Measures the total Area for a Geometry object.
| geom | pointer to Geometry object |
| area | on completion this variable will contain the measured area |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer | ( | gaiaGeomCollPtr | geom, |
| double | radius, | ||
| int | points | ||
| ) |
Spatial operator: Buffer.
| geom | the input Geometry object |
| radius | the buffer's radius |
| points | number of points (aka vertices) to be used in order to approximate a circular arc. |
| GAIAGEO_DECLARE int gaiaGeomCollCentroid | ( | gaiaGeomCollPtr | geom, |
| double * | x, | ||
| double * | y | ||
| ) |
Spatial operator: Centroid.
| geom | pointer to Geometry object. |
| x | on completion this variable will contain the centroid X coordinate |
| y | on completion this variable will contain the centroid Y coordinate |
| GAIAGEO_DECLARE int gaiaGeomCollContains | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Contains.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollCoveredBy | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Topology check: test if a Geometry is covered by another one.
| geom1 | pointer to first input Geometry object. |
| geom2 | pointer to second input Geometry object. |
| GAIAGEO_DECLARE int gaiaGeomCollCovers | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Topology check: test if a Geometry covers another one.
| geom1 | pointer to first input Geometry object. |
| geom2 | pointer to second input Geometry object. |
| GAIAGEO_DECLARE int gaiaGeomCollCrosses | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Crosses.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollDisjoint | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Disjoint.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollDistance | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double * | dist | ||
| ) |
Calculates the maximum distance intercurring between two Geometry objects.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| dist | on completion this variable will contain the calculated distance |
| GAIAGEO_DECLARE int gaiaGeomCollEquals | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Equals.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollIntersects | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Intesects.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollLength | ( | gaiaGeomCollPtr | geom, |
| double * | length | ||
| ) |
Measures the total Length for a Geometry object.
| geom | pointer to Geometry object |
| length | on completion this variable will contain the measured length |
| GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter | ( | gaiaGeomCollPtr | geom, |
| int | perimeter, | ||
| double * | length | ||
| ) |
Measures the total Length or Perimeter for a Geometry object.
| geom | pointer to Geometry object |
| perimeter | if TRUE only Polygons will be considered, ignoring any Linesting the opposite if FALSE (considering only Linestrings and ignoring any Polygon) |
| length | on completion this variable will contain the measured length or perimeter |
| GAIAGEO_DECLARE int gaiaGeomCollOverlaps | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Overlaps.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollRelate | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| const char * | pattern | ||
| ) |
Spatial relationship evalution: Relate.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| pattern | intersection matrix pattern [DE-9IM] |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify | ( | gaiaGeomCollPtr | geom, |
| double | tolerance | ||
| ) |
Spatial operator: Simplify.
| geom | the input Geometry object |
| tolerance | approximation threshold |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplifyPreserveTopology | ( | gaiaGeomCollPtr | geom, |
| double | tolerance | ||
| ) |
Spatial operator: Simplify [preserving topology].
| geom | the input Geometry object |
| tolerance | approximation threshold |
| GAIAGEO_DECLARE int gaiaGeomCollTouches | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Touches.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE int gaiaGeomCollWithin | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial relationship evalution: Within.
| geom1 | the first Geometry object to be evaluated |
| geom2 | the second Geometry object to be evaluated |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Difference.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Intersection.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: SymDifference.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Union.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| GAIAGEO_DECLARE const char* gaiaGetGeosErrorMsg | ( | void | ) |
Return the latest GEOS error message (if any)
| GAIAGEO_DECLARE const char* gaiaGetGeosWarningMsg | ( | void | ) |
Return the latest GEOS warning message (if any)
| GAIAGEO_DECLARE int gaiaGetPointOnSurface | ( | gaiaGeomCollPtr | geom, |
| double * | x, | ||
| double * | y | ||
| ) |
Spatial operator: PointOnSurface.
| geom | pointer to Geometry object. |
| x | on completion this variable will contain the Point X coordinate |
| y | on completion this variable will contain the Point Y coordinate |
| GAIAGEO_DECLARE int gaiaHausdorffDistance | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double * | dist | ||
| ) |
Calculates the Hausdorff distance intercurring between two Geometry objects.
| geom1 | pointer to first Geometry object |
| geom2 | pointer to second Geometry object |
| dist | on completion this variable will contain the calculated Hausdorff distance |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid | ( | gaiaGeomCollPtr | geom, |
| double | origin_x, | ||
| double | origin_y, | ||
| double | size, | ||
| int | only_edges | ||
| ) |
Utility function: HexagonalGrid.
| geom | the Geometry to be covered by the Grid. |
| origin_x | the X ccordinate identifying the Grid Origin. |
| origin_y | the Y coordinate identifiying the Grid Origin. |
| size | the Grid cell-side size. |
| only_edges | if non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing hexagonal POLYGONs. |
| 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.
| line | pointer to Linestring object. |
| GAIAGEO_DECLARE int gaiaIsClosedGeom | ( | gaiaGeomCollPtr | geom | ) |
Checks if a Geometry object represents an OGC Closed Linestring.
| line | pointer to Geometry object. |
| GAIAGEO_DECLARE int gaiaIsRing | ( | gaiaLinestringPtr | line | ) |
Checks if a Linestring object represents an OGC Ring Geometry.
| line | pointer to Geometry object. |
| GAIAGEO_DECLARE int gaiaIsSimple | ( | gaiaGeomCollPtr | geom | ) |
Checks if a Geometry object represents an OGC Simple Geometry.
| geom | pointer to Geometry object. |
| GAIAGEO_DECLARE int gaiaIsValid | ( | gaiaGeomCollPtr | geom | ) |
Checks if a Geometry object represents an OGC Valid Geometry.
| geom | pointer to Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolateEquidistantPoints | ( | gaiaGeomCollPtr | ln_geom, |
| double | distance | ||
| ) |
Spatial operator: Line Interpolate Equidistant Points.
| ln_geom | the input Geometry object [expected to be of lineal type] |
| distance | regular distance between interpolated points |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint | ( | gaiaGeomCollPtr | ln_geom, |
| double | fraction | ||
| ) |
Spatial operator: Line Interpolate Point.
| ln_geom | the input Geometry object [expected to be of lineal type] |
| fraction | total length fraction [in the range 0.0 / 1.0] |
| GAIAGEO_DECLARE double gaiaLineLocatePoint | ( | gaiaGeomCollPtr | ln_geom, |
| gaiaGeomCollPtr | pt_geom | ||
| ) |
Determines the location of the closest Point on Linestring to the given Point.
| ln_geom | pointer to first input Geometry object [expected to be of the lineal type]. |
| pt_geom | pointer to second input Geometry object [expected to be a Point]. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge | ( | gaiaGeomCollPtr | geom | ) |
Spatial operator: Line Merge.
| geom | pointer to input Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Line Cut At Nodes.
| geom1 | pointer to input Geometry object [Linestring or MultiLinestring]. |
| geom2 | pointer to input Geometry object [Point or MultiPoint]. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring | ( | gaiaGeomCollPtr | ln_geom, |
| double | start_fraction, | ||
| double | end_fraction | ||
| ) |
Spatial operator: Line Substring.
| ln_geom | the input Geometry object [expected to be of lineal type] |
| start_fraction | substring start, expressed as total length fraction [in the range 0.0 / 1.0] |
| end_fraction | substring end, expressed as total length fraction |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid | ( | gaiaGeomCollPtr | geom | ) |
Utility function: MakeValid.
| geom | the input Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded | ( | gaiaGeomCollPtr | geom | ) |
Utility function: MakeValidDiscarded.
| geom | the input Geometry object. |
| GAIAGEO_DECLARE int gaiaMaxDistance | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double * | dist | ||
| ) |
Calculates the maximum 2D distance intercurring between two Geometry objects.
| geom1 | the first Geometry object |
| geom2 | the second Geometry object |
| dist | on completion this variable will contain the calculated distance |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve | ( | gaiaGeomCollPtr | geom, |
| double | radius, | ||
| int | points, | ||
| int | left_right | ||
| ) |
Spatial operator: Offset Curve.
| geom | the input Geometry object |
| radius | the buffer's radius |
| points | number of points (aka vertices) to be used in order to approximate a circular arc. |
| left_right | if set to 1 the left-sided OffsetCurve will be returned; otherwise the right-sided one. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize | ( | gaiaGeomCollPtr | geom, |
| int | force_multi | ||
| ) |
Attempts to rearrange a generic Geometry object into a Polygon or MultiPolygon.
| geom | the input Geometry object |
| force_multi | if not set to 0, then an eventual Polygon will be returned casted to MultiPolygon |
| GAIAGEO_DECLARE double gaiaRadsToDegs | ( | double | rads | ) |
Converts and angle from Radians into Degrees.
| rads | the angle measured in Radians. |
| GAIAGEO_DECLARE void gaiaResetGeosMsg | ( | void | ) |
Resets the GEOS error and warning messages to an empty state.
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize | ( | gaiaGeomCollPtr | geom, |
| double | dist | ||
| ) |
Utility function: Segmentize.
| geom | the input Geometry object. |
| dist | the meximum segment length. |
| GAIAGEO_DECLARE void gaiaSetGeosErrorMsg | ( | const char * | msg | ) |
Set the current GEOS error message.
| msg | the error message to be set. |
| GAIAGEO_DECLARE void gaiaSetGeosWarningMsg | ( | const char * | msg | ) |
Set the current GEOS warning message.
| msg | the warning message to be set. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Shared Paths.
| geom1 | pointer to first Geometry object |
| geom2 | pointer to second Geometry object |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2 | ||
| ) |
Spatial operator: Shortest Line.
| geom1 | pointer to the first Geometry object. |
| geom2 | pointer to the second Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer | ( | gaiaGeomCollPtr | geom, |
| double | radius, | ||
| int | points, | ||
| int | left_right | ||
| ) |
Spatial operator: Single Sided Buffer.
| geom | the input Geometry object |
| radius | the buffer's radius |
| points | number of points (aka vertices) to be used in order to approximate a circular arc. |
| left_right | if set to 1 the left-sided Buffer will be returned; otherwise the right-sided one. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap | ( | gaiaGeomCollPtr | geom1, |
| gaiaGeomCollPtr | geom2, | ||
| double | tolerance | ||
| ) |
Spatial operator: Shortest Line.
| geom1 | pointer to the first Geometry object. |
| geom2 | pointer to the second Geometry object. |
| tolerance | approximation factor |
| 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.
| origin_x | the X ccordinate identifying the Grid Origin. |
| origin_y | the Y coordinate identifiying the Grid Origin. |
| size_x | Grid cell size (X axis). |
| size_y | Grid cell size (Y axis). |
| size_z | Grid cell size (Z axis). |
| size_m | Grid cell size (M axis). |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit | ( | gaiaGeomCollPtr | input, |
| gaiaGeomCollPtr | blade | ||
| ) |
Utility function: Split.
| input | the input Geometry object. |
| blade | the blade Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft | ( | gaiaGeomCollPtr | input, |
| gaiaGeomCollPtr | blade | ||
| ) |
Utility function: SplitLeft.
| input | the input Geometry object. |
| blade | the blade Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight | ( | gaiaGeomCollPtr | input, |
| gaiaGeomCollPtr | blade | ||
| ) |
Utility function: SplitRight.
| input | the input Geometry object. |
| blade | the blade Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid | ( | gaiaGeomCollPtr | geom, |
| double | origin_x, | ||
| double | origin_y, | ||
| double | size, | ||
| int | only_edges | ||
| ) |
Utility function: SquareGrid.
| geom | the Geometry to be covered by the Grid. |
| origin_x | the X ccordinate identifying the Grid Origin. |
| origin_y | the Y coordinate identifiying the Grid Origin. |
| size | the Grid cell-side size. |
| only_edges | if non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing square POLYGONs. |
| GAIAGEO_DECLARE void* gaiaToGeos | ( | const gaiaGeomCollPtr | gaia | ) |
Converts a Geometry object into a GEOS Geometry.
| gaia | pointer to Geometry object |
| GAIAGEO_DECLARE void* gaiaToGeosSelective | ( | const gaiaGeomCollPtr | gaia, |
| int | mode | ||
| ) |
Converts a Geometry object into a GEOS Geometry.
| gaia | pointer to Geometry object |
| mode | one of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS, GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform | ( | gaiaGeomCollPtr | org, |
| char * | proj_from, | ||
| char * | proj_to | ||
| ) |
Tansforms a Geometry object into a different Reference System [aka Reprojection].
| org | pointer to input Geometry object. |
| proj_from | geodetic parameters string [EPSG format] qualifying the input Reference System |
| proj_to | geodetic parameters string [EPSG format] qualifying the output Reference System |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid | ( | gaiaGeomCollPtr | geom, |
| double | origin_x, | ||
| double | origin_y, | ||
| double | size, | ||
| int | only_edges | ||
| ) |
Utility function: TriangularGrid.
| geom | the Geometry to be covered by the Grid. |
| origin_x | the X ccordinate identifying the Grid Origin. |
| origin_y | the Y coordinate identifiying the Grid Origin. |
| size | the Grid cell-side size. |
| only_edges | if non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON containing triangular POLYGONs. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion | ( | gaiaGeomCollPtr | geom | ) |
Spatial operator: Unary Union.
| geom | the input Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded | ( | gaiaGeomCollPtr | geom | ) |
Spatial operator: Union Cascaded.
| geom | the input Geometry object. |
| GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram | ( | gaiaGeomCollPtr | geom, |
| double | extra_frame_size, | ||
| double | tolerance, | ||
| int | only_edges | ||
| ) |
Voronoj Diagram.
| geom | pointer to input Geometry object. |
| extra_frame_size | percent factor expanding the BBOX of input Geometry |
| tolerance | optional snapping tolerance. |
| only_edges | if non-zero will return a MULTILINESTRING, otherwise it will return a MULTIPOLYGON. |
1.8.1.1