SpatiaLite
3.0.0-stable
|
Geometry handling functions: core. More...
Go to the source code of this file.
Functions | |
GAIAGEO_DECLARE void | gaiaFree (void *ptr) |
Safely frees any dynamic memory block allocated by the library itself. | |
GAIAGEO_DECLARE gaiaPointPtr | gaiaAllocPoint (double x, double y) |
Allocates a 2D POINT [XY]. | |
GAIAGEO_DECLARE gaiaPointPtr | gaiaAllocPointXYZ (double x, double y, double z) |
Allocates a 3D POINT [XYZ]. | |
GAIAGEO_DECLARE gaiaPointPtr | gaiaAllocPointXYM (double x, double y, double m) |
Allocates a 2D POINT [XYM]. | |
GAIAGEO_DECLARE gaiaPointPtr | gaiaAllocPointXYZM (double x, double y, double z, double m) |
Allocates a 3D POINT [XYZM]. | |
GAIAGEO_DECLARE void | gaiaFreePoint (gaiaPointPtr ptr) |
Destroys a POINT object. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaAllocLinestring (int vert) |
Allocates a 2D LINESTRING [XY]. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaAllocLinestringXYZ (int vert) |
Allocates a 3D LINESTRING [XYZ]. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaAllocLinestringXYM (int vert) |
Allocates a 2D LINESTRING [XYM]. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaAllocLinestringXYZM (int vert) |
Allocates a 3D LINESTRING [XYZM]. | |
GAIAGEO_DECLARE void | gaiaFreeLinestring (gaiaLinestringPtr ptr) |
Destroys a LINESTRING object. | |
GAIAGEO_DECLARE void | gaiaCopyLinestringCoords (gaiaLinestringPtr dst, gaiaLinestringPtr src) |
Copies coordinates between two LINESTRING objects. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaAllocRing (int vert) |
Allocates a 2D RING [XY]. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaAllocRingXYZ (int vert) |
Allocates a 3D RING [XYZ]. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaAllocRingXYM (int vert) |
Allocates 2D RING [XYM]. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaAllocRingXYZM (int vert) |
Allocates a 3D RING [XYZM]. | |
GAIAGEO_DECLARE void | gaiaFreeRing (gaiaRingPtr ptr) |
Destroys a RING object. | |
GAIAGEO_DECLARE void | gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr src) |
Copies coordinates betwee two RING objects. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaAllocPolygon (int vert, int holes) |
Allocates a 2D POLYGON [XY]. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaAllocPolygonXYZ (int vert, int holes) |
Allocates a 3D POLYGON [XYZ]. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaAllocPolygonXYM (int vert, int holes) |
Allocates a 2D POLYGON [XYM]. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaAllocPolygonXYZM (int vert, int holes) |
Allocates a 3D POLYGON [XYZM]. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaCreatePolygon (gaiaRingPtr ring) |
Allocates a POLYGON. | |
GAIAGEO_DECLARE void | gaiaFreePolygon (gaiaPolygonPtr polyg) |
Destroys a POLYGON object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaAllocGeomColl (void) |
Allocates a 2D Geometry [XY]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaAllocGeomCollXYZ (void) |
Allocates a 3D Geometry [XYZ]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaAllocGeomCollXYM (void) |
Allocates a 2D Geometry [XYM]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaAllocGeomCollXYZM (void) |
Allocates a 3D Geometry [XYZM]. | |
GAIAGEO_DECLARE void | gaiaFreeGeomColl (gaiaGeomCollPtr geom) |
Destroys a Geometry object. | |
GAIAGEO_DECLARE void | gaiaAddPointToGeomColl (gaiaGeomCollPtr p, double x, double y) |
Creates a new 2D Point [XY] object into a Geometry object. | |
GAIAGEO_DECLARE void | gaiaAddPointToGeomCollXYZ (gaiaGeomCollPtr p, double x, double y, double z) |
Creates a new 3D Point [XYZ] object into a Geometry object. | |
GAIAGEO_DECLARE void | gaiaAddPointToGeomCollXYM (gaiaGeomCollPtr p, double x, double y, double m) |
Creates a new 2D Point [XYM] object into a Geometry object. | |
GAIAGEO_DECLARE void | gaiaAddPointToGeomCollXYZM (gaiaGeomCollPtr p, double x, double y, double z, double m) |
Creates a new 3D Point [XYZM] object into a Geometry object. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaAddLinestringToGeomColl (gaiaGeomCollPtr p, int vert) |
Creates a new Linestring object into a Geometry object. | |
GAIAGEO_DECLARE void | gaiaInsertLinestringInGeomColl (gaiaGeomCollPtr p, gaiaLinestringPtr line) |
Inserts an already existing Linestring object into a Geometry object. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaAddPolygonToGeomColl (gaiaGeomCollPtr p, int vert, int interiors) |
Creates a new Polygon object into a Geometry object. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaInsertPolygonInGeomColl (gaiaGeomCollPtr p, gaiaRingPtr ring) |
Creates a new Polygon object into a Geometry object starting from an already existing Ring object. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaAddInteriorRing (gaiaPolygonPtr p, int pos, int vert) |
Creates a new Interior Ring object into a Polygon object. | |
GAIAGEO_DECLARE void | gaiaInsertInteriorRing (gaiaPolygonPtr p, gaiaRingPtr ring) |
Inserts an already existing Ring object into a Polygon object. | |
GAIAGEO_DECLARE void | gaiaAddRingToPolyg (gaiaPolygonPtr polyg, gaiaRingPtr ring) |
Inserts an already existing Ring object into a Polygon object. | |
GAIAGEO_DECLARE gaiaLinestringPtr | gaiaCloneLinestring (gaiaLinestringPtr line) |
Duplicates a Linestring object. | |
GAIAGEO_DECLARE gaiaRingPtr | gaiaCloneRing (gaiaRingPtr ring) |
Duplicates a Ring object. | |
GAIAGEO_DECLARE gaiaPolygonPtr | gaiaClonePolygon (gaiaPolygonPtr polyg) |
Duplicates a Polygon object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCloneGeomColl (gaiaGeomCollPtr geom) |
Duplicates a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCloneGeomCollPoints (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [Points only]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCloneGeomCollLinestrings (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [Linestrings only]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCloneGeomCollPolygons (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [Polygons only]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCastGeomCollToXY (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [casting dimensions to 2D XY]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCastGeomCollToXYZ (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [casting dimensions to 3D XYZ]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCastGeomCollToXYM (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [casting dimensions to 2D XYM]. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaCastGeomCollToXYZM (gaiaGeomCollPtr geom) |
Duplicates a Geometry object [casting dimensions to 3D XYZM]. | |
GAIAGEO_DECLARE int | gaiaLineGetPoint (gaiaLinestringPtr ln, int v, double *x, double *y, double *z, double *m) |
Gets coodinates from a Linestring's Point. | |
GAIAGEO_DECLARE int | gaiaLineSetPoint (gaiaLinestringPtr ln, int v, double x, double y, double z, double m) |
Sets coodinates for a Linestring's Point. | |
GAIAGEO_DECLARE int | gaiaRingGetPoint (gaiaRingPtr rng, int v, double *x, double *y, double *z, double *m) |
Gets coodinates from a Ring's Point. | |
GAIAGEO_DECLARE int | gaiaRingSetPoint (gaiaRingPtr rng, int v, double x, double y, double z, double m) |
Sets coodinates for a Ring's Point. | |
GAIAGEO_DECLARE int | gaiaDimension (gaiaGeomCollPtr geom) |
Determines OGC dimensions for a Geometry object. | |
GAIAGEO_DECLARE int | gaiaGeometryType (gaiaGeomCollPtr geom) |
Determines the corresponding Type for a Geometry object. | |
GAIAGEO_DECLARE int | gaiaGeometryAliasType (gaiaGeomCollPtr geom) |
Determines the corresponding Type for a Geometry object. | |
GAIAGEO_DECLARE int | gaiaIsEmpty (gaiaGeomCollPtr geom) |
Checks for empty Geometry object. | |
GAIAGEO_DECLARE int | gaiaIsToxic (gaiaGeomCollPtr geom) |
Checks for toxic Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaSanitize (gaiaGeomCollPtr org) |
Attempts to sanitize a possibly malformed Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaLinearize (gaiaGeomCollPtr geom, int force_multi) |
Attempts to resolve a (Multi)Linestring from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaDissolveSegments (gaiaGeomCollPtr geom) |
Attempts to resolve a collection of Segments from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaDissolvePoints (gaiaGeomCollPtr geom) |
Attempts to resolve a collection of Points from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaExtractPointsFromGeomColl (gaiaGeomCollPtr geom) |
Extracts any Point from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaExtractLinestringsFromGeomColl (gaiaGeomCollPtr geom) |
Extracts any Linestring from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaExtractPolygonsFromGeomColl (gaiaGeomCollPtr geom) |
Extracts any Polygon from a Geometry object. | |
GAIAGEO_DECLARE gaiaGeomCollPtr | gaiaMergeGeometries (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2) |
Merges two Geometry objects into a single one. | |
GAIAGEO_DECLARE double | gaiaMeasureLength (int dims, double *coords, int vert) |
Measures the geometric length for a Linestring or Ring. | |
GAIAGEO_DECLARE double | gaiaMeasureArea (gaiaRingPtr ring) |
Measures the geometric area for a Ring object. | |
GAIAGEO_DECLARE void | gaiaRingCentroid (gaiaRingPtr ring, double *rx, double *ry) |
Determines the Centroid for a Ring object. | |
GAIAGEO_DECLARE void | gaiaClockwise (gaiaRingPtr p) |
Determines the direction for a Ring object. | |
GAIAGEO_DECLARE int | gaiaIsPointOnRingSurface (gaiaRingPtr ring, double pt_x, double pt_y) |
Check if a Point lays on a Ring surface. | |
GAIAGEO_DECLARE int | gaiaIsPointOnPolygonSurface (gaiaPolygonPtr polyg, double x, double y) |
Checks if a Point lays on a Polygon surface. | |
GAIAGEO_DECLARE double | gaiaMinDistance (double x0, double y0, int dims, double *coords, int vert) |
Computes the minimum distance intercurring from a Point and a Linestring or Ring. | |
GAIAGEO_DECLARE int | gaiaIntersect (double *x0, double *y0, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) |
Determines the intesection Point between two Segments. | |
GAIAGEO_DECLARE void | gaiaShiftCoords (gaiaGeomCollPtr geom, double shift_x, double shift_y) |
Shifts any coordinate within a Geometry object. | |
GAIAGEO_DECLARE void | gaiaScaleCoords (gaiaGeomCollPtr geom, double scale_x, double scale_y) |
Scales any coordinate within a Geometry object. | |
GAIAGEO_DECLARE void | gaiaRotateCoords (gaiaGeomCollPtr geom, double angle) |
Rotates any coordinate within a Geometry object. | |
GAIAGEO_DECLARE void | gaiaReflectCoords (gaiaGeomCollPtr geom, int x_axis, int y_axis) |
Reflects any coordinate within a Geometry object. | |
GAIAGEO_DECLARE void | gaiaSwapCoords (gaiaGeomCollPtr geom) |
Swaps any coordinate within a Geometry object. | |
GAIAGEO_DECLARE int | gaiaLinestringEquals (gaiaLinestringPtr line1, gaiaLinestringPtr line2) |
Checks if two Linestring objects are equivalent. | |
GAIAGEO_DECLARE int | gaiaPolygonEquals (gaiaPolygonPtr polyg1, gaiaPolygonPtr polyg2) |
Checks if two Polygons objects are equivalent. | |
GAIAGEO_DECLARE int | gaiaEllipseParams (const char *name, double *a, double *b, double *rf) |
Retrieves Geodesic params for an Ellipsoid definition. | |
GAIAGEO_DECLARE double | gaiaGreatCircleDistance (double a, double b, double lat1, double lon1, double lat2, double lon2) |
Calculates the Great Circle Distance intercurring between two Points. | |
GAIAGEO_DECLARE double | gaiaGeodesicDistance (double a, double b, double rf, double lat1, double lon1, double lat2, double lon2) |
Calculates the Geodesic Distance intercurring between two Points. | |
GAIAGEO_DECLARE double | gaiaGreatCircleTotalLength (double a, double b, int dims, double *coords, int vert) |
Calculates the Great Circle Total Length for a Linestring / Ring. | |
GAIAGEO_DECLARE double | gaiaGeodesicTotalLength (double a, double b, double rf, int dims, double *coords, int vert) |
Calculates the Geodesic Total Length for a Linestring / Ring. | |
GAIAGEO_DECLARE int | gaiaConvertLength (double value, int unit_from, int unit_to, double *cvt) |
Convert a Length from a Measure Unit to another. |
Geometry handling functions: core.
GAIAGEO_DECLARE gaiaRingPtr gaiaAddInteriorRing | ( | gaiaPolygonPtr | p, |
int | pos, | ||
int | vert | ||
) |
Creates a new Interior Ring object into a Polygon object.
p | pointer to the Polygon object. |
pos | relative position index [first Interior Ring has index 0]. |
vert | number of points (aka vertices) into the Ring. |
GAIAGEO_DECLARE gaiaLinestringPtr gaiaAddLinestringToGeomColl | ( | gaiaGeomCollPtr | p, |
int | vert | ||
) |
Creates a new Linestring object into a Geometry object.
p | pointer to the Geometry object. |
vert | number of points [aka vertices] into the Linestring. |
GAIAGEO_DECLARE void gaiaAddPointToGeomColl | ( | gaiaGeomCollPtr | p, |
double | x, | ||
double | y | ||
) |
Creates a new 2D Point [XY] object into a Geometry object.
p | pointer to the Geometry object |
x | X coordinate of the Point to be created |
y | X coordinate of the Point to be created |
GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYM | ( | gaiaGeomCollPtr | p, |
double | x, | ||
double | y, | ||
double | m | ||
) |
Creates a new 2D Point [XYM] object into a Geometry object.
p | pointer to the Geometry object |
x | X coordinate of the Point to be created |
y | X coordinate of the Point to be created |
m | M measure of the Point to be created |
GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYZ | ( | gaiaGeomCollPtr | p, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Creates a new 3D Point [XYZ] object into a Geometry object.
p | pointer to the Geometry object |
x | X coordinate of the Point to be created |
y | X coordinate of the Point to be created |
z | Z coordinate of the Point to be created |
GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYZM | ( | gaiaGeomCollPtr | p, |
double | x, | ||
double | y, | ||
double | z, | ||
double | m | ||
) |
Creates a new 3D Point [XYZM] object into a Geometry object.
p | pointer to the Geometry object |
x | X coordinate of the Point to be created |
y | X coordinate of the Point to be created |
z | Z coordinate of the Point to be created |
m | M measure of the Point to be created |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaAddPolygonToGeomColl | ( | gaiaGeomCollPtr | p, |
int | vert, | ||
int | interiors | ||
) |
Creates a new Polygon object into a Geometry object.
p | pointer to the Geometry object. |
vert | number of points [aka vertices] into the Polygon's Exterior Ring. |
interiors | number of Interiors Rings [0, if no Interior Ring is required] |
GAIAGEO_DECLARE void gaiaAddRingToPolyg | ( | gaiaPolygonPtr | polyg, |
gaiaRingPtr | ring | ||
) |
Inserts an already existing Ring object into a Polygon object.
polyg | pointer to the Polygon object |
ring | pointer to the Ring object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomColl | ( | void | ) |
Allocates a 2D Geometry [XY].
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomCollXYM | ( | void | ) |
Allocates a 2D Geometry [XYM].
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomCollXYZ | ( | void | ) |
Allocates a 3D Geometry [XYZ].
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomCollXYZM | ( | void | ) |
Allocates a 3D Geometry [XYZM].
GAIAGEO_DECLARE gaiaLinestringPtr gaiaAllocLinestring | ( | int | vert | ) |
Allocates a 2D LINESTRING [XY].
vert | number of points [aka vertices] into the Linestring |
GAIAGEO_DECLARE gaiaLinestringPtr gaiaAllocLinestringXYM | ( | int | vert | ) |
Allocates a 2D LINESTRING [XYM].
vert | number of points [aka vertices] into the Linestring |
GAIAGEO_DECLARE gaiaLinestringPtr gaiaAllocLinestringXYZ | ( | int | vert | ) |
Allocates a 3D LINESTRING [XYZ].
vert | number of points [aka vertices] into the Linestring |
GAIAGEO_DECLARE gaiaLinestringPtr gaiaAllocLinestringXYZM | ( | int | vert | ) |
Allocates a 3D LINESTRING [XYZM].
vert | number of points [aka vertices] into the Linestring |
GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPoint | ( | double | x, |
double | y | ||
) |
Allocates a 2D POINT [XY].
x | the X coordinate. |
y | the Y coordinate. |
GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPointXYM | ( | double | x, |
double | y, | ||
double | m | ||
) |
Allocates a 2D POINT [XYM].
x | the X coordinate. |
y | the Y coordinate. |
m | the M measure. |
GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPointXYZ | ( | double | x, |
double | y, | ||
double | z | ||
) |
Allocates a 3D POINT [XYZ].
x | the X coordinate. |
y | the Y coordinate. |
z | the Z coordinate. |
GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPointXYZM | ( | double | x, |
double | y, | ||
double | z, | ||
double | m | ||
) |
Allocates a 3D POINT [XYZM].
x | the X coordinate. |
y | the Y coordinate. |
z | the Z coordinate. |
m | the M measure. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaAllocPolygon | ( | int | vert, |
int | holes | ||
) |
Allocates a 2D POLYGON [XY].
vert | number of points [aka vertices] into the Exterior Ring. |
holes | number of Interior Rings [0, if no Interior Ring is required]. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaAllocPolygonXYM | ( | int | vert, |
int | holes | ||
) |
Allocates a 2D POLYGON [XYM].
vert | number of points [aka vertices] into the Exterior Ring. |
holes | number of Interior Rings [0, if no Interior Ring is required]. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaAllocPolygonXYZ | ( | int | vert, |
int | holes | ||
) |
Allocates a 3D POLYGON [XYZ].
vert | number of points [aka vertices] into the Exterior Ring. |
holes | number of Interior Rings [0, if no Interior Ring is required]. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaAllocPolygonXYZM | ( | int | vert, |
int | holes | ||
) |
Allocates a 3D POLYGON [XYZM].
vert | number of points [aka vertices] into the Exterior Ring. |
holes | number of Interior Rings [may by 0, if no Interior Ring is required]. |
GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRing | ( | int | vert | ) |
Allocates a 2D RING [XY].
vert | number of points [aka vertices] into the Ring |
GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRingXYM | ( | int | vert | ) |
Allocates 2D RING [XYM].
vert | number of points [aka vertices] into the Ring |
GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRingXYZ | ( | int | vert | ) |
Allocates a 3D RING [XYZ].
vert | number of points [aka vertices] into the Ring |
GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRingXYZM | ( | int | vert | ) |
Allocates a 3D RING [XYZM].
vert | number of points [aka vertices] into the Ring |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXY | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [casting dimensions to 2D XY].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYM | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [casting dimensions to 2D XYM].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZ | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [casting dimensions to 3D XYZ].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZM | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [casting dimensions to 3D XYZM].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE void gaiaClockwise | ( | gaiaRingPtr | p | ) |
Determines the direction for a Ring object.
p | pointer to Ring object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomColl | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object.
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomCollLinestrings | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [Linestrings only].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomCollPoints | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [Points only].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomCollPolygons | ( | gaiaGeomCollPtr | geom | ) |
Duplicates a Geometry object [Polygons only].
geom | pointer to Geometry object [origin]. |
GAIAGEO_DECLARE gaiaLinestringPtr gaiaCloneLinestring | ( | gaiaLinestringPtr | line | ) |
Duplicates a Linestring object.
line | pointer to Linestring object [origin]. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygon | ( | gaiaPolygonPtr | polyg | ) |
Duplicates a Polygon object.
polyg | pointer to Polygon object [origin]. |
GAIAGEO_DECLARE gaiaRingPtr gaiaCloneRing | ( | gaiaRingPtr | ring | ) |
Duplicates a Ring object.
ring | pointer to Ring object [origin]. |
GAIAGEO_DECLARE int gaiaConvertLength | ( | double | value, |
int | unit_from, | ||
int | unit_to, | ||
double * | cvt | ||
) |
Convert a Length from a Measure Unit to another.
value | the length measure to be converted. |
unit_from | original Measure Unit. |
unit_to | converted Measure Unit. |
cvt | on completion this variable will contain the converted length measure. |
GAIAGEO_DECLARE void gaiaCopyLinestringCoords | ( | gaiaLinestringPtr | dst, |
gaiaLinestringPtr | src | ||
) |
Copies coordinates between two LINESTRING objects.
dst | destination LINESTRING [output] |
src | origin LINESTRING [input] |
GAIAGEO_DECLARE void gaiaCopyRingCoords | ( | gaiaRingPtr | dst, |
gaiaRingPtr | src | ||
) |
Copies coordinates betwee two RING objects.
dst | destination RING [output] |
src | origin RING [input] |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaCreatePolygon | ( | gaiaRingPtr | ring | ) |
Allocates a POLYGON.
ring | pointer to a valid RING object: assumed to be the Polygon's Exterior Ring. |
GAIAGEO_DECLARE int gaiaDimension | ( | gaiaGeomCollPtr | geom | ) |
Determines OGC dimensions for a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDissolvePoints | ( | gaiaGeomCollPtr | geom | ) |
Attempts to resolve a collection of Points from a Geometry object.
geom | pointer to Geometry object. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDissolveSegments | ( | gaiaGeomCollPtr | geom | ) |
Attempts to resolve a collection of Segments from a Geometry object.
geom | pointer to Geometry object. |
GAIAGEO_DECLARE int gaiaEllipseParams | ( | const char * | name, |
double * | a, | ||
double * | b, | ||
double * | rf | ||
) |
Retrieves Geodesic params for an Ellipsoid definition.
name | text string identifying an Ellipsoid definition. |
a | on completion this variable will contain the first geodesic param. |
b | on completion this variable will contain the second geodesic param. |
rf | on completion this variable will contain the third geodesic param. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaExtractLinestringsFromGeomColl | ( | gaiaGeomCollPtr | geom | ) |
Extracts any Linestring from a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaExtractPointsFromGeomColl | ( | gaiaGeomCollPtr | geom | ) |
Extracts any Point from a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaExtractPolygonsFromGeomColl | ( | gaiaGeomCollPtr | geom | ) |
Extracts any Polygon from a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE void gaiaFree | ( | void * | ptr | ) |
Safely frees any dynamic memory block allocated by the library itself.
ptr | pointer to dynamicly allocated memory |
GAIAGEO_DECLARE void gaiaFreeGeomColl | ( | gaiaGeomCollPtr | geom | ) |
Destroys a Geometry object.
geom | pointer to the Geometry object to be destroyed |
GAIAGEO_DECLARE void gaiaFreeLinestring | ( | gaiaLinestringPtr | ptr | ) |
Destroys a LINESTRING object.
ptr | pointer to the LINESTRING object to be destroyed |
GAIAGEO_DECLARE void gaiaFreePoint | ( | gaiaPointPtr | ptr | ) |
Destroys a POINT object.
ptr | pointer to the POINT object to be destroyed |
GAIAGEO_DECLARE void gaiaFreePolygon | ( | gaiaPolygonPtr | polyg | ) |
Destroys a POLYGON object.
polyg | pointer to the POLYGON object to be destroyed |
GAIAGEO_DECLARE void gaiaFreeRing | ( | gaiaRingPtr | ptr | ) |
Destroys a RING object.
ptr | pointer to the RING object to be destroyed |
GAIAGEO_DECLARE double gaiaGeodesicDistance | ( | double | a, |
double | b, | ||
double | rf, | ||
double | lat1, | ||
double | lon1, | ||
double | lat2, | ||
double | lon2 | ||
) |
Calculates the Geodesic Distance intercurring between two Points.
a | first geodesic parameter. |
b | second geodesic parameter. |
rf | third geodesic parameter. |
lat1 | Latitude of first Point. |
lon1 | Longitude of first Point. |
lat2 | Latitude of second Point. |
lon2 | Longitude of second Point. |
GAIAGEO_DECLARE double gaiaGeodesicTotalLength | ( | double | a, |
double | b, | ||
double | rf, | ||
int | dims, | ||
double * | coords, | ||
int | vert | ||
) |
Calculates the Geodesic Total Length for a Linestring / Ring.
a | first geodesic parameter. |
b | second geodesic parameter. |
rf | third geodesic parameter. |
dims | dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM |
coords | pointed to COORD mem-array |
vert | number of Points (aka Vertices) within the COORD mem-array |
GAIAGEO_DECLARE int gaiaGeometryAliasType | ( | gaiaGeomCollPtr | geom | ) |
Determines the corresponding Type for a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE int gaiaGeometryType | ( | gaiaGeomCollPtr | geom | ) |
Determines the corresponding Type for a Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE double gaiaGreatCircleDistance | ( | double | a, |
double | b, | ||
double | lat1, | ||
double | lon1, | ||
double | lat2, | ||
double | lon2 | ||
) |
Calculates the Great Circle Distance intercurring between two Points.
a | first geodesic parameter. |
b | second geodesic parameter. |
lat1 | Latitude of first Point. |
lon1 | Longitude of first Point. |
lat2 | Latitude of second Point. |
lon2 | Longitude of second Point. |
GAIAGEO_DECLARE double gaiaGreatCircleTotalLength | ( | double | a, |
double | b, | ||
int | dims, | ||
double * | coords, | ||
int | vert | ||
) |
Calculates the Great Circle Total Length for a Linestring / Ring.
a | first geodesic parameter. |
b | second geodesic parameter. |
dims | dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM |
coords | pointed to COORD mem-array |
vert | number of Points (aka Vertices) within the COORD mem-array |
GAIAGEO_DECLARE void gaiaInsertInteriorRing | ( | gaiaPolygonPtr | p, |
gaiaRingPtr | ring | ||
) |
Inserts an already existing Ring object into a Polygon object.
p | pointer to the Polygon object |
ring | pointer to the Ring object |
GAIAGEO_DECLARE void gaiaInsertLinestringInGeomColl | ( | gaiaGeomCollPtr | p, |
gaiaLinestringPtr | line | ||
) |
Inserts an already existing Linestring object into a Geometry object.
p | pointer to the Geometry object. |
line | pointer to the Linestring object. |
GAIAGEO_DECLARE gaiaPolygonPtr gaiaInsertPolygonInGeomColl | ( | gaiaGeomCollPtr | p, |
gaiaRingPtr | ring | ||
) |
Creates a new Polygon object into a Geometry object starting from an already existing Ring object.
p | pointer to the Geometry object. |
ring | pointer to the Ring object [assumed to represent to Polygon's Exterior Ring]. |
GAIAGEO_DECLARE int gaiaIntersect | ( | double * | x0, |
double * | y0, | ||
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x3, | ||
double | y3, | ||
double | x4, | ||
double | y4 | ||
) |
Determines the intesection Point between two Segments.
x0 | on completion this variable will contain the Intersection X coord |
y0 | on completion this variable will contain the Intersection Y coord |
x1 | start Point X of first Segment |
y1 | start Point Y of first Segment |
x2 | end Point X of first Segment |
y2 | end Point Y of first Segment |
x3 | start Point X of second Segment |
y3 | start Point Y of second Segment |
x4 | end Point X of second Segment |
y4 | end Point Y of second Segment |
GAIAGEO_DECLARE int gaiaIsEmpty | ( | gaiaGeomCollPtr | geom | ) |
Checks for empty Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE int gaiaIsPointOnPolygonSurface | ( | gaiaPolygonPtr | polyg, |
double | x, | ||
double | y | ||
) |
Checks if a Point lays on a Polygon surface.
polyg | pointer to Polygon object |
x | Point X coordinate |
y | Point Y coordinate |
GAIAGEO_DECLARE int gaiaIsPointOnRingSurface | ( | gaiaRingPtr | ring, |
double | pt_x, | ||
double | pt_y | ||
) |
Check if a Point lays on a Ring surface.
ring | pointer to Ring object |
pt_x | Point X coordinate |
pt_y | Point Y coordinate |
GAIAGEO_DECLARE int gaiaIsToxic | ( | gaiaGeomCollPtr | geom | ) |
Checks for toxic Geometry object.
geom | pointer to Geometry object |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinearize | ( | gaiaGeomCollPtr | geom, |
int | force_multi | ||
) |
Attempts to resolve a (Multi)Linestring from a Geometry object.
geom | pointer to Geometry object. |
force_multi,: | 0 if the returned Geometry could represent a Linestring: any other value if casting to MultiLinestring is required unconditionally. |
GAIAGEO_DECLARE int gaiaLineGetPoint | ( | gaiaLinestringPtr | ln, |
int | v, | ||
double * | x, | ||
double * | y, | ||
double * | z, | ||
double * | m | ||
) |
Gets coodinates from a Linestring's Point.
ln | pointer to Linestring object. |
v | relative position of Point: first Point has index 0 |
x | on completion this variable will contain the Point X coordinate. |
y | on completion this variable will contain the Point Y coordinate. |
z | on completion this variable will contain the Point Z coordinate. |
m | on completion this variable will contain the Point M measure. |
GAIAGEO_DECLARE int gaiaLineSetPoint | ( | gaiaLinestringPtr | ln, |
int | v, | ||
double | x, | ||
double | y, | ||
double | z, | ||
double | m | ||
) |
Sets coodinates for a Linestring's Point.
ln | pointer to Linestring object. |
v | relative position of Point: first Point has index 0 |
x | the Point's X coordinate. |
y | the Point's Y coordinate. |
z | the Point's Z coordinate. |
m | the Point's M measure. |
GAIAGEO_DECLARE int gaiaLinestringEquals | ( | gaiaLinestringPtr | line1, |
gaiaLinestringPtr | line2 | ||
) |
Checks if two Linestring objects are equivalent.
line1 | pointer to first Linestring object. |
line2 | pointer to second Linestring object. |
GAIAGEO_DECLARE double gaiaMeasureArea | ( | gaiaRingPtr | ring | ) |
Measures the geometric area for a Ring object.
ring | pointer to Ring object |
GAIAGEO_DECLARE double gaiaMeasureLength | ( | int | dims, |
double * | coords, | ||
int | vert | ||
) |
Measures the geometric length for a Linestring or Ring.
dims | dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM |
coords | pointed to COORD mem-array |
vert | number of Points (aka Vertices) within the COORD mem-array |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries | ( | gaiaGeomCollPtr | geom1, |
gaiaGeomCollPtr | geom2 | ||
) |
Merges two Geometry objects into a single one.
geom1 | pointer to first Geometry object. |
geom2 | pointer to second Geometry object. |
GAIAGEO_DECLARE double gaiaMinDistance | ( | double | x0, |
double | y0, | ||
int | dims, | ||
double * | coords, | ||
int | vert | ||
) |
Computes the minimum distance intercurring from a Point and a Linestring or Ring.
x0 | Point X coordinate |
y0 | Point Y coordinate |
dims | dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM |
coords | pointed to COORD mem-array |
vert | number of Points (aka Vertices) within the COORD mem-array |
GAIAGEO_DECLARE int gaiaPolygonEquals | ( | gaiaPolygonPtr | polyg1, |
gaiaPolygonPtr | polyg2 | ||
) |
Checks if two Polygons objects are equivalent.
polyg1 | pointer to first Polygon object. |
polyg2 | pointer to second Polygon object. |
GAIAGEO_DECLARE void gaiaReflectCoords | ( | gaiaGeomCollPtr | geom, |
int | x_axis, | ||
int | y_axis | ||
) |
Reflects any coordinate within a Geometry object.
geom | pointer to Geometry object. |
x_axis | if set to 0, no X axis reflection will be applied: otherwise the X axis will be reflected. |
y_axis | if set to 0, no Y axis reflection will be applied: otherwise the Y axis will be reflected. |
GAIAGEO_DECLARE void gaiaRingCentroid | ( | gaiaRingPtr | ring, |
double * | rx, | ||
double * | ry | ||
) |
Determines the Centroid for a Ring object.
ring | pointer to Ring object. |
rx | on completion this variable will contain the centroid X coordinate. |
ry | on completion this variable will contain the centroid Y coordinate. |
GAIAGEO_DECLARE int gaiaRingGetPoint | ( | gaiaRingPtr | rng, |
int | v, | ||
double * | x, | ||
double * | y, | ||
double * | z, | ||
double * | m | ||
) |
Gets coodinates from a Ring's Point.
rng | pointer to Ring object. |
v | relative position of Point: first Point has index 0 |
x | on completion this variable will contain the Point X coordinate. |
y | on completion this variable will contain the Point Y coordinate. |
z | on completion this variable will contain the Point Z coordinate. |
m | on completion this variable will contain the Point M measure. |
GAIAGEO_DECLARE int gaiaRingSetPoint | ( | gaiaRingPtr | rng, |
int | v, | ||
double | x, | ||
double | y, | ||
double | z, | ||
double | m | ||
) |
Sets coodinates for a Ring's Point.
rng | pointer to Ring object. |
v | relative position of Point: first Point has index 0 |
x | the Point's X coordinate. |
y | the Point's Y coordinate. |
z | the Point's Z coordinate. |
m | the Point's M measure. |
GAIAGEO_DECLARE void gaiaRotateCoords | ( | gaiaGeomCollPtr | geom, |
double | angle | ||
) |
Rotates any coordinate within a Geometry object.
geom | pointer to Geometry object. |
angle | rotation angle [expressed in Degrees]. |
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSanitize | ( | gaiaGeomCollPtr | org | ) |
Attempts to sanitize a possibly malformed Geometry object.
org | pointer to Geometry object. |
GAIAGEO_DECLARE void gaiaScaleCoords | ( | gaiaGeomCollPtr | geom, |
double | scale_x, | ||
double | scale_y | ||
) |
Scales any coordinate within a Geometry object.
geom | pointer to Geometry object. |
scale_x | X axis scale factor. |
scale_y | Y axis scale factor. |
GAIAGEO_DECLARE void gaiaShiftCoords | ( | gaiaGeomCollPtr | geom, |
double | shift_x, | ||
double | shift_y | ||
) |
Shifts any coordinate within a Geometry object.
geom | pointer to Geometry object. |
shift_x | X axis shift factor. |
shift_y | Y axis shift factor. |
GAIAGEO_DECLARE void gaiaSwapCoords | ( | gaiaGeomCollPtr | geom | ) |
Swaps any coordinate within a Geometry object.
geom | pointer to Geometry object. |