debug.h   debug.h 
/* /*
debug.h -- abstract defs for standard output functions debug.h -- abstract defs for standard output functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gaiaaux.h   gaiaaux.h 
/* /*
gaiaaux.h -- Gaia common utility functions gaiaaux.h -- Gaia common utility functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 363 skipping to change at line 363
\note this function will return the MD5 checksum into a dynamically alloca ted \note this function will return the MD5 checksum into a dynamically alloca ted
buffer created by malloc(). buffer created by malloc().
You are required to explicitly free() any string returned by this function . You are required to explicitly free() any string returned by this function .
\note gaiaFinalizeMD5Checksum will implicitly reset the MD5 object to its \note gaiaFinalizeMD5Checksum will implicitly reset the MD5 object to its
initial state. initial state.
*/ */
GAIAAUX_DECLARE char *gaiaFinalizeMD5Checksum (void *md5); GAIAAUX_DECLARE char *gaiaFinalizeMD5Checksum (void *md5);
/**
Return longitude and latitude angles from a DMS string
\param dms a text string representing a valid DMS (Degrees/Minutes/Seconds
)
expression.
\param longitude on completion this variable will contain the longitude an
gle
expressed in Decimal Degrees.
\param latitude on completion this variable will contain the latitude angl
e
expressed in Decimal Degrees.
\return ZERO (FALSE) on failure, any other different value (TRUE) on succe
ss.
\sa gaiaConvertToDMS
\note this function will return a dynamically allocated buffer created
by malloc().
You are required to explicitly free() any string returned by this function
.
*/
GAIAAUX_DECLARE int gaiaParseDMS (const char *dms, double *longitude,
double *latitude);
/**
Return a DMS string
\param longitude the angle of longitude expressed in Decimal Degrees.
\param latitude the angle of latitude expressed in Decimal Degrees.
\return the corresponding DMS (Degrees/Minutes/Seconds) text string,
or NULL on failure
\sa gaiaLongitudeFromDMS, gaiaLatitudeFromDMS
\note this function will return a dynamically allocated buffer created
by malloc().
You are required to explicitly free() any string returned by this function
.
*/
GAIAAUX_DECLARE char *gaiaConvertToDMS (double longitude, double latitu
de);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GAIAAUX_H */ #endif /* _GAIAAUX_H */
 End of changes. 2 change blocks. 
1 lines changed or deleted 46 lines changed or added


 gaiaexif.h   gaiaexif.h 
/* /*
gaiaexif.h -- Gaia common EXIF Metadata reading functions gaiaexif.h -- Gaia common EXIF Metadata reading functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 94 skipping to change at line 94
/** this BLOB does actually contain a PDF document */ /** this BLOB does actually contain a PDF document */
#define GAIA_PDF_BLOB 7 #define GAIA_PDF_BLOB 7
/** this BLOB does actually contain a SpatiaLite Geometry */ /** this BLOB does actually contain a SpatiaLite Geometry */
#define GAIA_GEOMETRY_BLOB 8 #define GAIA_GEOMETRY_BLOB 8
/** this BLOB does actually contain a TIFF image */ /** this BLOB does actually contain a TIFF image */
#define GAIA_TIFF_BLOB 9 #define GAIA_TIFF_BLOB 9
/** this BLOB does actually contain a WebP image */ /** this BLOB does actually contain a WebP image */
#define GAIA_WEBP_BLOB 10 #define GAIA_WEBP_BLOB 10
/** this BLOB does actually contain a SpatiaLite XmlBLOB */ /** this BLOB does actually contain a SpatiaLite XmlBLOB */
#define GAIA_XML_BLOB 11 #define GAIA_XML_BLOB 11
/** this BLOB does actually contain a GPKG Geometry */
#define GAIA_GPB_BLOB 12
/* constants used for EXIF value types */ /* constants used for EXIF value types */
/** unrecognized EXIF value */ /** unrecognized EXIF value */
#define GAIA_EXIF_NONE 0 #define GAIA_EXIF_NONE 0
/** EXIF value of the BYTE type */ /** EXIF value of the BYTE type */
#define GAIA_EXIF_BYTE 1 #define GAIA_EXIF_BYTE 1
/** EXIF value of the SHORT type */ /** EXIF value of the SHORT type */
#define GAIA_EXIF_SHORT 2 #define GAIA_EXIF_SHORT 2
/** EXIF value of the STRING type */ /** EXIF value of the STRING type */
#define GAIA_EXIF_STRING 3 #define GAIA_EXIF_STRING 3
skipping to change at line 611 skipping to change at line 613
int *ok); int *ok);
/** /**
Attempts to guess the actual content-type of some BLOB Attempts to guess the actual content-type of some BLOB
\param blob the BLOB to be parsed \param blob the BLOB to be parsed
\param size length of the BLOB (in bytes) \param size length of the BLOB (in bytes)
\return the BLOB type: one of GAIA_HEX_BLOB, GAIA_GIF_BLOB, GAIA_PNG_BLOB, \return the BLOB type: one of GAIA_HEX_BLOB, GAIA_GIF_BLOB, GAIA_PNG_BLOB,
GAIA_JPEG_BLOB, GAIA_EXIF_BLOB, GAIA_EXIF_GPS_BLOB, GAIA_ZIP_BLOB, GAIA_JPEG_BLOB, GAIA_EXIF_BLOB, GAIA_EXIF_GPS_BLOB, GAIA_ZIP_BLOB,
GAIA_PDF_BLOB, GAIA_GEOMETRY_BLOB, GAIA_TIFF_BLOB GAIA_PDF_BLOB, GAIA_GEOMETRY_BLOB, GAIA_TIFF_BLOB, GAIA_WEBP_BLOB,
GAIA_XML_BLOB, GAIA_GPB_BLOB
*/ */
GAIAEXIF_DECLARE int gaiaGuessBlobType (const unsigned char *blob, GAIAEXIF_DECLARE int gaiaGuessBlobType (const unsigned char *blob,
int size); int size);
/** /**
Return longitude and latitude from an EXIF-GPS tag Return longitude and latitude from an EXIF-GPS tag
\param blob the BLOB to be parsed \param blob the BLOB to be parsed
\param size length of the BLOB (in bytes) \param size length of the BLOB (in bytes)
\param longitude on success will contain the longitude coordinate \param longitude on success will contain the longitude coordinate
\param latitude on success will contain the latitude coordinate \param latitude on success will contain the latitude coordinate
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added


 gaiageo.h   gaiageo.h 
/* /*
gaiageo.h -- Gaia common support for geometries gaiageo.h -- Gaia common support for geometries
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 geopackage.h   geopackage.h 
/* /*
GeoPackage extensions for SpatiaLite / SQLite GeoPackage extensions for SpatiaLite / SQLite
version 4.2, 2014 July 25
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/ http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis, Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the for the specific language governing rights and limitations under the
License. License.
The Original Code is GeoPackage Extensions The Original Code is GeoPackage Extensions
The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.n et) The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.n et)
Portions created by the Initial Developer are Copyright (C) 2012 Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Sandro Furieri (a.furieri@lqt.it)
Alternatively, the contents of this file may be used under the terms of Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL. the terms of any one of the MPL, the GPL or the LGPL.
*/ */
/** /**
\file gaiaexif.h \file geopackage.h
EXIF/image: supporting functions and constants GeoPackage: supporting functions and constants
*/ */
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef DLL_EXPORT #ifdef DLL_EXPORT
#define GEOPACKAGE_DECLARE __declspec(dllexport) #define GEOPACKAGE_DECLARE __declspec(dllexport)
#else #else
#define GEOPACKAGE_DECLARE extern #define GEOPACKAGE_DECLARE extern
#endif #endif
#endif #endif
skipping to change at line 66 skipping to change at line 69
#define _GEOPACKAGE_H #define _GEOPACKAGE_H
#endif #endif
#include "sqlite.h" #include "sqlite.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#include <spatialite/gaiageo.h>
/* Internal geopackage SQL function implementation */ /* Internal geopackage SQL function implementation */
GEOPACKAGE_DECLARE void fnct_gpkgCreateBaseTables (sqlite3_context * GEOPACKAGE_DECLARE void fnct_gpkgCreateBaseTables (sqlite3_context *
context, int argc, context, int argc,
sqlite3_value ** argv ); sqlite3_value ** argv );
GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesTable (sqlite3_context * GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesTable (sqlite3_context *
context, int argc, context, int argc,
sqlite3_value ** argv ); sqlite3_value ** argv );
GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesZoomLevel (sqlite3_context * GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesZoomLevel (sqlite3_context *
context, int argc , context, int argc ,
sqlite3_value ** sqlite3_value **
argv); argv);
GEOPACKAGE_DECLARE void fnct_gpkgInsertEpsgSRID (sqlite3_context *
context, int argc,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgAddTileTriggers (sqlite3_context * con text, GEOPACKAGE_DECLARE void fnct_gpkgAddTileTriggers (sqlite3_context * con text,
int argc, int argc,
sqlite3_value ** argv) ; sqlite3_value ** argv) ;
GEOPACKAGE_DECLARE void fnct_gpkgAddRasterTriggers (sqlite3_context *
context, int argc,
sqlite3_value ** arg
v);
GEOPACKAGE_DECLARE void fnct_gpkgAddRtMetadataTriggers (sqlite3_context
*
context, int arg
c,
sqlite3_value **
argv);
GEOPACKAGE_DECLARE void fnct_gpkgGetNormalRow (sqlite3_context * contex t, GEOPACKAGE_DECLARE void fnct_gpkgGetNormalRow (sqlite3_context * contex t,
int argc, int argc,
sqlite3_value ** argv); sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgGetNormalZoom (sqlite3_context * conte xt, GEOPACKAGE_DECLARE void fnct_gpkgGetNormalZoom (sqlite3_context * conte xt,
int argc, int argc,
sqlite3_value ** argv); sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgGetImageType (sqlite3_context * contex t, GEOPACKAGE_DECLARE void fnct_gpkgGetImageType (sqlite3_context * contex t,
int argc, int argc,
sqlite3_value ** argv); sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgPointToTile (sqlite3_context * context GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryColumn (sqlite3_context *
, context, int argc,
int argc, sqlite3_value ** arg
v);
GEOPACKAGE_DECLARE void fnct_gpkgMakePoint (sqlite3_context *
context, int argc,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointWithSRID (sqlite3_context *
context, int argc,
sqlite3_value ** arg
v);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointZ (sqlite3_context *
context, int argc,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointZWithSRID (sqlite3_context *
context, int argc,
sqlite3_value ** ar
gv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointM (sqlite3_context *
context, int argc,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointMWithSRID (sqlite3_context *
context, int argc,
sqlite3_value ** ar
gv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointZM (sqlite3_context *
context, int argc,
sqlite3_value ** argv); sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgMakePointZMWithSRID (sqlite3_context *
context, int argc,
sqlite3_value **
argv);
GEOPACKAGE_DECLARE void fnct_ToGPB (sqlite3_context * context, int argc
,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_GeomFromGPB (sqlite3_context * context,
int argc, sqlite3_value ** arg
v);
GEOPACKAGE_DECLARE gaiaGeomCollPtr gaiaFromGeoPackageGeometryBlob (cons
t
unsig
ned
char
*gpb,
unsig
ned
int
gpb_l
en);
/* Sandro Furieri - 2014-05-19 */
GEOPACKAGE_DECLARE int gaiaIsValidGPB (const unsigned char *gpb,
int gpb_len);
GEOPACKAGE_DECLARE int gaiaGetSridFromGPB (const unsigned char *gpb,
int gpb_len);
GEOPACKAGE_DECLARE int gaiaIsEmptyGPB (const unsigned char *gpb,
int gpb_len);
GEOPACKAGE_DECLARE int gaiaGetEnvelopeFromGPB (const unsigned char *gpb
,
int gpb_len, double *min_
x,
double *max_x, double *mi
n_y,
double *max_y, int *has_z
,
double *min_z, double *ma
x_z,
int *has_m, double *min_m
,
double *max_m);
GEOPACKAGE_DECLARE char *gaiaGetGeometryTypeFromGPB (const unsigned cha
r
*gpb, int gpb_len);
GEOPACKAGE_DECLARE void fnct_IsValidGPB (sqlite3_context * context,
int argc, sqlite3_value ** argv
);
GEOPACKAGE_DECLARE void fnct_GPKG_IsAssignable (sqlite3_context * conte
xt,
int argc,
sqlite3_value ** argv);
GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryTriggers (sqlite3_context *
context, int argc,
sqlite3_value **
argv);
GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryTriggers (sqlite3_context *
context, int argc,
sqlite3_value **
argv);
GEOPACKAGE_DECLARE void fnct_gpkgAddSpatialIndex (sqlite3_context * con
text,
int argc,
sqlite3_value ** argv)
;
/* end Sandro Furieri - 2014-05-19 */
/* Markers for unused arguments / variable */ /* Markers for unused arguments / variable */
#if __GNUC__ #if __GNUC__
#define UNUSED __attribute__ ((__unused__)) #define UNUSED __attribute__ ((__unused__))
#else #else
#define UNUSED #define UNUSED
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 9 change blocks. 
16 lines changed or deleted 104 lines changed or added


 gg_advanced.h   gg_advanced.h 
/* /*
gg_advanced.h -- Gaia common support for geometries: advanced gg_advanced.h -- Gaia common support for geometries: advanced
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 114 skipping to change at line 114
\sa gaiaRadsToDegs \sa gaiaRadsToDegs
\remark \b PROJ.4 support required \remark \b PROJ.4 support required
*/ */
GAIAGEO_DECLARE double gaiaDegsToRads (double degs); GAIAGEO_DECLARE double gaiaDegsToRads (double degs);
/** /**
Tansforms a Geometry object into a different Reference System Tansforms a Geometry object into a different Reference System
[aka Reprojection] [aka Reprojection]
\param org pointer to input Geometry object. \param org pointer to input Geometry object.
\param proj_from geodetic parameters string [EPSG format] qualifying the \param proj_from geodetic parameters string [EPSG format] qualifying the
input Reference System input Reference System
\param proj_to geodetic parameters string [EPSG format] qualifying the \param proj_to geodetic parameters string [EPSG format] qualifying the
output Reference System output Reference System
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaTransform_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome \note you are responsible to destroy (before or after) any allocated Geome
try, this including any Geometry returned by gaiaGeometryTransform() try, this including any Geometry returned by gaiaGeometryTransform()\n
not reentrant and thread unsafe.
\remark \b PROJ.4 support required \remark \b PROJ.4 support required
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org,
char *proj_from, char *proj_from,
char *proj_to); char *proj_to);
/**
Tansforms a Geometry object into a different Reference System
[aka Reprojection]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param org pointer to input Geometry object.
\param proj_from geodetic parameters string [EPSG format] qualifying the
input Reference System
\param proj_to geodetic parameters string [EPSG format] qualifying the
output Reference System
\return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaTransform, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try, this including any Geometry returned by gaiaGeometryTransform()\n
reentrant and thread-safe.
\remark \b PROJ.4 support required
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform_r (const void *p_cache,
gaiaGeomCollPtr org,
char *proj_from,
char *proj_to);
#endif /* end including PROJ.4 */ #endif /* end including PROJ.4 */
#ifndef OMIT_GEOS /* including GEOS */ #ifndef OMIT_GEOS /* including GEOS */
/** /**
Resets the GEOS error and warning messages to an empty state Resets the GEOS error and warning messages to an empty state
\sa gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg, \sa gaiaResetGeosMsg_r,
gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void gaiaResetGeosMsg (void); GAIAGEO_DECLARE void gaiaResetGeosMsg (void);
/** /**
Resets the GEOS error and warning messages to an empty state
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\sa gaiaResetGeosMsg,
gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void gaiaResetGeosMsg_r (const void *p_cache);
/**
Return the latest GEOS error message (if any) Return the latest GEOS error message (if any)
\return the latest GEOS error message: an empty string if no error was \return the latest GEOS error message: an empty string if no error was
previoysly found. previoysly found.
\sa gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg, \sa gaiaGetGeosErrorMsg_r,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg,
gaiaCriticalPointFromGEOSmsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE const char *gaiaGetGeosErrorMsg (void); GAIAGEO_DECLARE const char *gaiaGetGeosErrorMsg (void);
/** /**
Return the latest GEOS error message (if any)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\return the latest GEOS error message: an empty string if no error was
previoysly found.
\sa gaiaGetGeosErrorMsg,
gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg,
gaiaCriticalPointFromGEOSmsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE const char *gaiaGetGeosErrorMsg_r (const void *p_cache)
;
/**
Return the latest GEOS warning message (if any) Return the latest GEOS warning message (if any)
\return the latest GEOS warning message: an empty string if no warning was \return the latest GEOS warning message: an empty string if no warning was
previoysly found. previoysly found.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg, \sa gaiaGetGeosWarningMsg_r,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg,
gaiaCriticalPointFromGEOSmsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE const char *gaiaGetGeosWarningMsg (void); GAIAGEO_DECLARE const char *gaiaGetGeosWarningMsg (void);
/** /**
Return the latest GEOS warning message (if any)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\return the latest GEOS warning message: an empty string if no warning was
previoysly found.
\sa gaiaGetGeosWarningMsg,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg,
gaiaCriticalPointFromGEOSmsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE const char *gaiaGetGeosWarningMsg_r (const void *p_cach
e);
/**
Return the latest GEOS (auxiliary) error message (if any) Return the latest GEOS (auxiliary) error message (if any)
\return the latest GEOS (auxiliary) error message: an empty string if no \return the latest GEOS (auxiliary) error message: an empty string if no
error was previoysly found. error was previoysly found.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, \sa gaiaGetGeosAuxErrorMsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE const char *gaiaGetGeosAuxErrorMsg (void); GAIAGEO_DECLARE const char *gaiaGetGeosAuxErrorMsg (void);
/** /**
Return the latest GEOS (auxiliary) error message (if any)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\return the latest GEOS (auxiliary) error message: an empty string if no
error was previoysly found.
\sa gaiaGetGeosAuxErrorMsg,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE const char *gaiaGetGeosAuxErrorMsg_r (const void *p_cac
he);
/**
Attempts to (possibile) return a Point Geometry extracted from the latest
GEOS error / warning message
\return a Point Geometry: NULL if no warning/error was previoysly found
or if the current GEOS message doesn't contains a critical Point.
\sa gaiaCriticalPointFromGEOSmsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg (void);
/**
Attempts to (possibile) return a Point Geometry extracted from the latest
GEOS error / warning message
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\return a Point Geometry: NULL if no warning/error was previoysly found
or if the current GEOS message doesn't contains a critical Point.
\sa gaiaCriticalPointFromGEOSmsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCriticalPointFromGEOSmsg_r (const v
oid
*p_cache
);
/**
Set the current GEOS error message Set the current GEOS error message
\param msg the error message to be set. \param msg the error message to be set.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, \sa gaiaSetGeosErrorMsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void gaiaSetGeosErrorMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetGeosErrorMsg (const char *msg);
/** /**
Set the current GEOS error message
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param msg the error message to be set.
\sa gaiaSetGeosErrorMsg,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void gaiaSetGeosErrorMsg_r (const void *p_cache,
const char *msg);
/**
Set the current GEOS warning message Set the current GEOS warning message
\param msg the warning message to be set. \param msg the warning message to be set.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, \sa gaiaSetGeosWarningMsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (const char *msg);
/** /**
Set the current GEOS warning message
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param msg the warning message to be set.
\sa gaiaSetGeosWarningMsg,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void gaiaSetGeosWarningMsg_r (const void *p_cache,
const char *msg);
/**
Set the current GEOS (auxiliary) error message Set the current GEOS (auxiliary) error message
\param msg the error message to be set. \param msg the error message to be set.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, \sa gaiaSetAuxErrorMsg_r,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg (const char *msg);
/** /**
Set the current GEOS (auxiliary) error message
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param msg the error message to be set.
\sa gaiaSetAuxErrorMsg,
gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg_r (const void *p_cache,
const char *msg);
/**
Converts a Geometry object into a GEOS Geometry Converts a Geometry object into a GEOS Geometry
\param gaia pointer to Geometry object \param gaia pointer to Geometry object
\return handle to GEOS Geometry \return handle to GEOS Geometry
\sa gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM \sa gaiaToGeos_r, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM,
, gaiaFromGeos_XYZM, gaiaToGeosSelective
gaiaToGeosSelective
\note convenience method, simply defaulting to gaiaToGeos(geom, GAIA2GEOS_ \note convenience method, simply defaulting to gaiaToGeosSelective(geom, G
ALL) AIA2GEOS_ALL)\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void *gaiaToGeos (const gaiaGeomCollPtr gaia); GAIAGEO_DECLARE void *gaiaToGeos (const gaiaGeomCollPtr gaia);
/** /**
Converts a Geometry object into a GEOS Geometry Converts a Geometry object into a GEOS Geometry
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param gaia pointer to Geometry object
\return handle to GEOS Geometry
\sa gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM,
gaiaFromGeos_XYZM, gaiaToGeosSelective_r
\note convenience method, simply defaulting to gaiaToGeosSelective_r(p_cac
he, geom, GAIA2GEOS_ALL)\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void *gaiaToGeos_r (const void *p_cache,
const gaiaGeomCollPtr gaia);
/**
Converts a Geometry object into a GEOS Geometry
\param gaia pointer to Geometry object \param gaia pointer to Geometry object
\param mode one of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS, \param mode one of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS,
GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS
\return handle to GEOS Geometry \return handle to GEOS Geometry
\sa gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM \sa gaiaToGeosSelective_r, gaiaFromGeos_XY, gaiaFromGeos_XYZ,
gaiaFromGeos_XYM, gaiaFromGeos_XYZM
\note if the mode argument is not GAIA2GEOS_ALL only elementary geometries \note if the mode argument is not GAIA2GEOS_ALL only elementary geometries
of the selected type will be passed to GEOS, ignoring any other. of the selected type will be passed to GEOS, ignoring any other.\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void *gaiaToGeosSelective (const gaiaGeomCollPtr gaia, GAIAGEO_DECLARE void *gaiaToGeosSelective (const gaiaGeomCollPtr gaia,
int mode); int mode);
/** /**
Converts a Geometry object into a GEOS Geometry
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param gaia pointer to Geometry object
\param mode one of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS,
GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS
\return handle to GEOS Geometry
\sa 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.\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void *gaiaToGeosSelective_r (const void *p_cache,
const gaiaGeomCollPtr gaia,
int mode);
/**
Converts a GEOS Geometry into a Geometry object [XY dims] Converts a GEOS Geometry into a Geometry object [XY dims]
\param geos handle to GEOS Geometry \param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object \return the pointer to the newly created Geometry object
\sa gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM \sa gaiaFromGeos_XY_r,
gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry, this including any Geometry returned by gaiaFromGeos_XY() Geometry, this including any Geometry returned by gaiaFromGeos_XY()\n
not reentrant and thread usafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY (const void *geos); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY (const void *geos);
/** /**
Converts a GEOS Geometry into a Geometry object [XY dims]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object
\sa 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()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY_r (const void *p_cache,
const void *geos);
/**
Converts a GEOS Geometry into a Geometry object [XYZ dims] Converts a GEOS Geometry into a Geometry object [XYZ dims]
\param geos handle to GEOS Geometry \param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object \return the pointer to the newly created Geometry object
\sa gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYM, gaiaFromGeos_XYZM \sa gaiaFromGeos_XYZ_r,
gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry, this including any Geometry returned by gaiaFromGeos_XYZ() Geometry, this including any Geometry returned by gaiaFromGeos_XYZ()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ (const void *geos); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ (const void *geos);
/** /**
Converts a GEOS Geometry into a Geometry object [XYZ dims]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object
\sa 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()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ_r (const void *p_cache
,
const void *geos);
/**
Converts a GEOS Geometry into a Geometry object [XYM dims] Converts a GEOS Geometry into a Geometry object [XYM dims]
\param geos handle to GEOS Geometry \param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object \return the pointer to the newly created Geometry object
\sa gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYZM \sa gaiaFromGeos_XYM_r,
gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYZM
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry, this including any Geometry returned by gaiaFromGeos_XYM() Geometry, this including any Geometry returned by gaiaFromGeos_XYM()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM (const void *geos); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM (const void *geos);
/** /**
Converts a GEOS Geometry into a Geometry object [XYM dims]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object
\sa 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()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM_r (const void *p_cache
,
const void *geos);
/**
Converts a GEOS Geometry into a Geometry object [XYZM dims] Converts a GEOS Geometry into a Geometry object [XYZM dims]
\param geos handle to GEOS Geometry \param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object \return the pointer to the newly created Geometry object
\sa gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM \sa gaiaFromGeos_XYZM_r,
gaiaToGeos, gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry, this including any Geometry returned by gaiaFromGeos_XYZM() Geometry, this including any Geometry returned by gaiaFromGeos_XYZM()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM (const void *geos); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM (const void *geos);
/** /**
Converts a GEOS Geometry into a Geometry object [XYZM dims]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object
\sa 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()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM_r (const void *p_cach
e,
const void *geos);
/**
Checks if a Geometry object represents an OGC Simple Geometry Checks if a Geometry object represents an OGC Simple Geometry
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsClosed, gaiaIsRing, gaiaIsValid \sa gaiaIsSimple_r,
gaiaIsClosed, gaiaIsRing, gaiaIsValid
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom);
/** /**
Checks if a Geometry object represents an OGC Simple Geometry
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object.
\return 0 if false; any other value if true
\sa gaiaIsSimple,
gaiaIsClosed, gaiaIsRing, gaiaIsValid
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaIsSimple_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Checks if a Linestring object represents an OGC Closed Geometry Checks if a Linestring object represents an OGC Closed Geometry
This function only works on a single linestring - if you pass in a multi-l ine This function only works on a single linestring - if you pass in a multi-l ine
linestring geometry, it will return 0 (false). See gaiaIsClosedGeom for an linestring geometry, it will return 0 (false). See gaiaIsClosedGeom for an
alternative. alternative.
\param line pointer to Linestring object. \param line pointer to Linestring object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
skipping to change at line 357 skipping to change at line 720
*/ */
GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line); GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line);
/** /**
Checks if a Geometry object represents an OGC Closed Linestring Checks if a Geometry object represents an OGC Closed Linestring
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed \sa gaiaIsClosedGeom_r,
gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom);
/** /**
Checks if a Geometry object represents an OGC Closed Linestring
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object.
\return 0 if false; any other value if true
\sa gaiaIsClosedGeom,
gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaIsClosedGeom_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Checks if a Linestring object represents an OGC Ring Geometry Checks if a Linestring object represents an OGC Ring Geometry
\param line pointer to Geometry object. \param line pointer to Geometry object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsClosed, gaiaIsValid \sa gaiaIsRing_r,
gaiaIsSimple, gaiaIsClosed, gaiaIsValid
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line); GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line);
/** /**
Checks if a Linestring object represents an OGC Ring Geometry
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param line pointer to Geometry object.
\return 0 if false; any other value if true
\sa gaiaIsRing,
gaiaIsSimple, gaiaIsClosed, gaiaIsValid
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaIsRing_r (const void *p_cache,
gaiaLinestringPtr line);
/**
Checks if a Geometry object represents an OGC Valid Geometry Checks if a Geometry object represents an OGC Valid Geometry
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsClosed, gaiaIsRing \sa gaiaIsValid_r,
gaiaIsSimple, gaiaIsClosed, gaiaIsRing, gaiaIsValidReason
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom);
/** /**
return a TEXT string stating if a Geometry is valid and if not
valid, a reason why
*
\param geom pointer to the Geometry object to be validated.
\return a text string.
\sa gaiaIsValid, gaiaIsValidReason_r, gaiaIsValidDetail
\note you are responsible to free() the returned text string\n
not reentrant and thread unsafe.
\remark \b 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
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to the Geometry object to be validated.
\return a text string.
\sa gaiaIsValid_r, gaiaIsValidReason, gaiaIsValidDetail_r
\note you are responsible to free() the returned text string\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE char *gaiaIsValidReason_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
return a Geometry detail causing a Geometry to be invalid
*
\param geom pointer to the Geometry object to be validated.
\return pointer to a Geometry object causing invalidity, or NULL.
\sa gaiaIsValid, gaiaIsValidReason, gaiaIsValidDetail_r
\note you are responsible to destroy the returned Geometry\n
not reentrant and thread unsafe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail (gaiaGeomCollPtr geom
);
/**
return a Geometry detail causing a Geometry to be invalid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to the Geometry object to be validated.
\return pointer to a Geometry object causing invalidity, or NULL.
\sa gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail
\note you are responsible to destroy the returned Geometry\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail_r (const void *p_cach
e,
gaiaGeomCollPtr geo
m);
/**
Checks if a Geometry object represents an OGC Valid Geometry
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object.
\return 0 if false; any other value if true
\sa gaiaIsValid,
gaiaIsSimple, gaiaIsClosed, gaiaIsRing, gaiaIsValidReason_r
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaIsValid_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Measures the total Length for a Geometry object Measures the total Length for a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param length on completion this variable will contain the measured length \param length on completion this variable will contain the measured length
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter \sa gaiaGeomCollLenght_r,
gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom, GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom,
double *length); double *length);
/** /**
Measures the total Length for a Geometry object
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object
\param length on completion this variable will contain the measured length
\return 0 on failure: any other value on success
\sa gaiaGeomCollLenght,
gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollLength_r (const void *p_cache,
gaiaGeomCollPtr geom,
double *length);
/**
Measures the total Length or Perimeter for a Geometry object Measures the total Length or Perimeter for a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param perimeter if TRUE only Polygons will be considered, ignoring any Li nesting \param perimeter if TRUE only Polygons will be considered, ignoring any Li nesting
\n the opposite if FALSE (considering only Linestrings and ignoring any Po lygon) \n the opposite if FALSE (considering only Linestrings and ignoring any Po lygon)
\param length on completion this variable will contain the measured length \param length on completion this variable will contain the measured length
or perimeter or perimeter
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength \sa gaiaGeomCollLengthOrPerimeter_r,
gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom , GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom ,
int perimeter, int perimeter,
double *length); double *length);
/**
Measures the total Length or Perimeter for a Geometry object
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object
\param perimeter if TRUE only Polygons will be considered, ignoring any Li
nesting
\n the opposite if FALSE (considering only Linestrings and ignoring any Po
lygon)
\param length on completion this variable will contain the measured length
or perimeter
\return 0 on failure: any other value on success
\sa gaiaGeomCollLengthOrPerimeter,
gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter_r (const void *p_cach
e,
gaiaGeomCollPtr geo
m,
int perimeter,
double *length);
/** /**
Measures the total Area for a Geometry object Measures the total Area for a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param area on completion this variable will contain the measured area \param area on completion this variable will contain the measured area
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea \sa gaiaGeoCollArea_r,
gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *are a); GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *are a);
/** /**
Measures the total Area for a Geometry object
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object
\param area on completion this variable will contain the measured area
\return 0 on failure: any other value on success
\sa gaiaGeoCollArea,
gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollArea_r (const void *p_cache,
gaiaGeomCollPtr geom, double *ar
ea);
/**
Attempts to rearrange a generic Geometry object into a Polygon or MultiPol ygon Attempts to rearrange a generic Geometry object into a Polygon or MultiPol ygon
\param geom the input Geometry object \param geom the input Geometry object
\param force_multi if not set to 0, then an eventual Polygon will be \param force_multi if not set to 0, then an eventual Polygon will be
returned casted to MultiPolygon returned casted to MultiPolygon
\return the pointer to newly created Geometry object representing a \return the pointer to newly created Geometry object representing a
Polygon or MultiPolygon Geometry: NULL on failure. Polygon or MultiPolygon Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaPolygonize_r, gaiaMakePolygon, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaPolygonize() this including any Geometry returned by gaiaPolygonize()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize (gaiaGeomCollPtr geom,
int force_multi); int force_multi);
/**
Attempts to rearrange a generic Geometry object into a Polygon or MultiPol
ygon
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param force_multi if not set to 0, then an eventual Polygon will be
returned casted to MultiPolygon
\return the pointer to newly created Geometry object representing a
Polygon or MultiPolygon Geometry: NULL on failure.
\sa gaiaPolygonize, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaPolygonize_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize_r (const void *p_cache,
gaiaGeomCollPtr geom,
int force_multi);
/** /**
Spatial relationship evalution: Equals Spatial relationship evalution: Equals
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, \sa gaiaGeomCollEquals_r, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedDisjoint gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
\note Obsolete: not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollEquals (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollEquals (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Equals
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollEquals_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Disjoint Spatial relationship evalution: Disjoint
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, \sa gaiaGeomCollDisjoint_r, gaiaGeomCollEquals, gaiaGeomCollIntersects,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
\note Obsolete: not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Disjoint
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollDisjoint_r, gaiaGeomCollEquals, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollDisjoint_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Disjoint (GEOSPreparedGeometry) Spatial relationship evalution: Disjoint (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollDisjoint \sa gaiaGeomCollDisjoint, gaiaGeomCollDisjoint_r
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedDisjoint (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedDisjoint (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Intesects Spatial relationship evalution: Intesects
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps, \sa gaiaGeomCollIntersects_r, gaiaGeomCollPreparedIntersects,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedIntersects gaiaGeomCollTouches, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollIntersects (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Intesects (GEOSPreparedGeometry) Spatial relationship evalution: Intersects
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollIntersects, gaiaGeomCollPreparedIntersects,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollIntersects_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Intersects (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollIntersects \sa gaiaGeomCollIntersects, gaiaGeomCollIntersects_r
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedIntersects (const void *p_cache
,
gaiaGeomCollPtr geom
1,
unsigned char *blob1
,
int size1,
gaiaGeomCollPtr geom
2,
unsigned char *blob2
,
int size2);
/**
Spatial relationship evalution: Overlaps
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollOverlaps_r, gaiaGeomCollPreparedOverlaps,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedIntersects (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom gaiaGeomCollPtr geom2);
1,
unsigned char *blob1
,
int size1,
gaiaGeomCollPtr geom
2,
unsigned char *blob2
,
int size2);
/** /**
Spatial relationship evalution: Overlaps Spatial relationship evalution: Overlaps
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollOverlaps, gaiaGeomCollPreparedOverlaps,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedOverlaps gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollOverlaps_r (const void *p_cache,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Overlaps (GEOSPreparedGeometry) Spatial relationship evalution: Overlaps (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollOverlaps \sa gaiaGeomCollOverlaps, gaiaGeomCollOverlaps_r
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedOverlaps (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedOverlaps (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Crosses Spatial relationship evalution: Crosses
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollCrosses_r, gaiaGeomCollPreparedCrosses,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollCrosses gaiaGeomCollTouches, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollCrosses (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Crosses
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollCrosses, gaiaGeomCollPreparedCrosses,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollCrosses_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Crosses (GEOSPreparedGeometry) Spatial relationship evalution: Crosses (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollCrosses \note reentrant and thread-safe.
\sa gaiaGeomCollCrosses, gaiaGeomCollCrosses_r
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedCrosses (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedCrosses (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Contains Spatial relationship evalution: Contains
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollContains_r, gaiaGeomCollPreparedContains,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedContains gaiaGeomCollTouches, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollContains (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollContains (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Contains
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollContains, gaiaGeomCollPreparedContains,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollContains_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Contains (GEOSPreparedGeometry) Spatial relationship evalution: Contains (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollContains \sa gaiaGeomCollContains, gaiaGeomCollContains_r
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedContains (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedContains (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Within Spatial relationship evalution: Within
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollWithin_r, gaiaGeomCollPreparedWithin,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollWithin gaiaGeomCollTouches, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollWithin (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollWithin (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Within
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollWithin, gaiaGeomCollPreparedWithin,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollTouches, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollWithin_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Within (GEOSPreparedGeometry) Spatial relationship evalution: Within (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollPrepared \sa gaiaGeomCollWithin, gaiaGeomCollWithin_r
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedWithin (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedWithin (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Touches Spatial relationship evalution: Touches
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollTouches_r, gaiaGeomCollPreparedTouches,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollRelate, gaiaGeomCollPreparedTouches gaiaGeomCollWithin, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollTouches (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollTouches (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Touches
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\return 0 if false: any other value if true
\sa gaiaGeomCollTouches, gaiaGeomCollPreparedTouches,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollTouches_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2);
/**
Spatial relationship evalution: Touches (GEOSPreparedGeometry) Spatial relationship evalution: Touches (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollTouches \sa gaiaGeomCollTouches, gaiaGeomCollTouches_r
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedTouches (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedTouches (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Spatial relationship evalution: Relate Spatial relationship evalution: Relate
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated \param geom2 the second Geometry object to be evaluated
\param pattern intersection matrix pattern [DE-9IM] \param pattern intersection matrix pattern [DE-9IM]
\return 0 if false: any other value if true \return 0 if false: any other value if true
\sa gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, \sa gaiaGeomCollRelate_r,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollTouches gaiaGeomCollWithin, gaiaGeomCollRelate
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
const char *pattern); const char *pattern);
/** /**
Spatial relationship evalution: Relate
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param geom2 the second Geometry object to be evaluated
\param pattern intersection matrix pattern [DE-9IM]
\return 0 if false: any other value if true
\sa gaiaGeomCollRelate,
gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollRelate
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollRelate_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2,
const char *pattern);
/**
Calculates the maximum distance intercurring between two Geometry objects Calculates the maximum distance intercurring between two Geometry objects
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan ce \param dist on completion this variable will contain the calculated distan ce
\return 0 on failure: any other value on success. \return 0 on failure: any other value on success.
\sa gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance \sa gaiaGeomCollDistance_r,
gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance
\note this function always computes the 2D cartesian distance. \note this function always computes the 2D cartesian distance.\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
double *dist); double *dist);
/** /**
Calculates the maximum distance intercurring between two Geometry objects
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan
ce
\return 0 on failure: any other value on success.
\sa gaiaGeomCollDistance,
gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance
\note this function always computes the 2D cartesian distance.\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollDistance_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2,
double *dist);
/**
Spatial operator: Intersection Spatial operator: Intersection
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry Intersection of both input Geometries: NULL on failure. geometry Intersection of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl, gaiaGeometryUnion, gaiaGeometryDifference, \sa gaiaGeometryIntersection_r,
gaiaFreeGeomColl, gaiaGeometryUnion, gaiaGeometryDifference,
gaiaGeometrySymDifference, gaiaBoundary gaiaGeometrySymDifference, gaiaBoundary
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeometryIntersection() this including any Geometry returned by gaiaGeometryIntersection()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection (gaiaGeomCollP tr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection (gaiaGeomCollP tr
geom1, geom1,
gaiaGeomCollPt r gaiaGeomCollPt r
geom2); geom2);
/** /**
Spatial operator: Intersection
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the
geometry Intersection of both input Geometries: NULL on failure.
\sa gaiaGeometryIntersection,
gaiaFreeGeomColl, gaiaGeometryUnion, gaiaGeometryDifference,
gaiaGeometrySymDifference, gaiaBoundary
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeometryIntersection_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection_r (const void
*p_cache,
gaiaGeomColl
Ptr
geom1,
gaiaGeomColl
Ptr
geom2);
/**
Spatial operator: Union Spatial operator: Union
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry Union of both input Geometries: NULL on failure. geometry Union of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded \sa gaiaGeometryUnion_r,
gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeometryUnion() this including any Geometry returned by gaiaGeometryUnion()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom 1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom 1,
gaiaGeomCollPtr geom2 ); gaiaGeomCollPtr geom2 );
/** /**
Spatial operator: Union
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the
geometry Union of both input Geometries: NULL on failure.
\sa gaiaGeometryUnion,
gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeometryUnion_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion_r (const void *p_cach
e,
gaiaGeomCollPtr geo
m1,
gaiaGeomCollPtr geo
m2);
/**
Spatial operator: Union Cascaded Spatial operator: Union Cascaded
\param geom the input Geometry object. \param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function is similar to gaiaUnaryUnion, but it only accepts Polygon s and \n this function is similar to gaiaUnaryUnion, but it only accepts Polygon s and
MultiPolygons and it's now deprecated; anyway it's supported on older GEOS versions. MultiPolygons and it's now deprecated; anyway it's supported on older GEOS versions.
NULL on failure. NULL on failure.
\sa gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion \sa gaiaUnionCascaded,
gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaUnionCascaded() this including any Geometry returned by gaiaUnionCascaded()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded (gaiaGeomCollPtr geom ); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded (gaiaGeomCollPtr geom );
/** /**
Spatial operator: Union Cascaded
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function is similar to gaiaUnaryUnion, but it only accepts Polygon
s and
MultiPolygons and it's now deprecated; anyway it's supported on older GEOS
versions.
NULL on failure.
\sa gaiaUnionCascaded,
gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaUnionCascaded_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded_r (const void *p_cach
e,
gaiaGeomCollPtr geo
m);
/**
Spatial operator: Difference Spatial operator: Difference
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry Difference of both input Geometries: NULL on failure. geometry Difference of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaGeometryDifference_r, gaiaGeometrySymDifference, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeometryDifference() this including any Geometry returned by gaiaGeometryDifference()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference (gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference (gaiaGeomCollPtr
geom1, geom1,
gaiaGeomCollPtr gaiaGeomCollPtr
geom2); geom2);
/** /**
Spatial operator: Difference
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the
geometry Difference of both input Geometries: NULL on failure.
\sa gaiaGeometryDifference, gaiaGeometrySymDifference, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeometryDifference_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference_r (const void
*p_cache,
gaiaGeomCollPt
r
geom1,
gaiaGeomCollPt
r
geom2);
/**
Spatial operator: SymDifference Spatial operator: SymDifference
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry SymDifference of both input Geometries: NULL on failure. geometry SymDifference of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaGeometrySymDifference_r, gaiaGeometryDifference, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeometrySymDifference() this including any Geometry returned by gaiaGeometrySymDifference()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference (gaiaGeomColl Ptr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference (gaiaGeomColl Ptr
geom1, geom1,
gaiaGeomCollP tr gaiaGeomCollP tr
geom2); geom2);
/** /**
Spatial operator: SymDifference
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the
geometry SymDifference of both input Geometries: NULL on failure.
\sa gaiaGeometrySymDifference, gaiaGeometryDifference, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeometrySymDifference_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference_r (const void
*p_cache,
gaiaGeomCol
lPtr
geom1,
gaiaGeomCol
lPtr
geom2);
/**
Spatial operator: Boundary
\param geom the Geometry object to be evaluated
\return the pointer to newly created Geometry object representing the
geometry Boundary of the input Geometry: NULL on failure.
\sa gaiaBoudary_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaBoundary()\n
not reentrant and thread unsafe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary (gaiaGeomCollPtr geom);
/**
Spatial operator: Boundary Spatial operator: Boundary
\param geom the Geometry object to be evaluated \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the Geometry object to be evaluated
\return the pointer to newly created Geometry object representing the
geometry Boundary of the input Geometry: NULL on failure.
\sa gaiaBoudary, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaBoundary_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Spatial operator: Centroid
\param geom pointer to Geometry object.
\param x on completion this variable will contain the centroid X coordinat
e
\param y on completion this variable will contain the centroid Y coordinat
e
\return the pointer to newly created Geometry object representing the \return 0 on failure: any other value on success
geometry Boundary of the input Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaGeomCollCentroid_r, gaiaRingCentroid
\note you are responsible to destroy (before or after) any allocated Geome \note not reentrant and thread unsafe.
try,
this including any Geometry returned by gaiaBoundary()
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double
*x,
double *y);
/** /**
Spatial operator: Centroid Spatial operator: Centroid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\param x on completion this variable will contain the centroid X coordinat e \param x on completion this variable will contain the centroid X coordinat e
\param y on completion this variable will contain the centroid Y coordinat e \param y on completion this variable will contain the centroid Y coordinat e
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaRingCentroid \sa gaiaGeomCollCentroid, gaiaRingCentroid
\note reentrant and thread-safe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double GAIAGEO_DECLARE int gaiaGeomCollCentroid_r (const void *p_cache,
*x, gaiaGeomCollPtr geom, double
double *y); *x,
double *y);
/** /**
Spatial operator: PointOnSurface Spatial operator: PointOnSurface
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\param x on completion this variable will contain the Point X coordinate \param x on completion this variable will contain the Point X coordinate
\param y on completion this variable will contain the Point Y coordinate \param y on completion this variable will contain the Point Y coordinate
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGetPointOnSurface_r
\note not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x,
double *y); double *y);
/** /**
Spatial operator: PointOnSurface
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object.
\param x on completion this variable will contain the Point X coordinate
\param y on completion this variable will contain the Point Y coordinate
\return 0 on failure: any other value on success
\sa gaiaGetPointOnSurface
\note reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGetPointOnSurface_r (const void *p_cache,
gaiaGeomCollPtr geom,
double *x, double *y);
/**
Spatial operator: Simplify Spatial operator: Simplify
\param geom the input Geometry object \param geom the input Geometry object
\param tolerance approximation threshold \param tolerance approximation threshold
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail ure. simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail ure.
\sa gaiaFreeGeomColl, gaiaGeomCollSimplifyPreserveTopology \sa gaiaGeomCollSimplify_r,
gaiaFreeGeomColl, gaiaGeomCollSimplifyPreserveTopology
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeomCollSimplify() this including any Geometry returned by gaiaGeomCollSimplify()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr g eom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr g eom,
double tolerance); double tolerance);
/** /**
Spatial operator: Simplify
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param tolerance approximation threshold
\return the pointer to newly created Geometry object representing the
simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail
ure.
\sa gaiaGeomCollSimplify,
gaiaFreeGeomColl, gaiaGeomCollSimplifyPreserveTopology
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeomCollSimplify_r()\n
reentrant and thread safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify_r (const void *p_c
ache,
gaiaGeomCollPtr
geom,
double tolerance
);
/**
Spatial operator: Simplify [preserving topology] Spatial operator: Simplify [preserving topology]
\param geom the input Geometry object \param geom the input Geometry object
\param tolerance approximation threshold \param tolerance approximation threshold
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail ure. simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail ure.
\sa gaiaFreeGeomColl, gaiaGeomCollSimplify \sa gaiaGeomCollSimplifyPreserveTopology_r,
gaiaFreeGeomColl, gaiaGeomCollSimplify
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeomCollSimplify() this including any Geometry returned by gaiaGeomCollSimplify()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom,
double tolerance); double tolerance);
/** /**
Spatial operator: Simplify [preserving topology]
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param tolerance approximation threshold
\return the pointer to newly created Geometry object representing the
simplified Geometry [applying the Douglas-Peucker algorithm]: NULL on fail
ure.
\sa gaiaGeomCollSimplifyPreserveTopology,
gaiaFreeGeomColl, gaiaGeomCollSimplify
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeomCollSimplify_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology_r (const void *p_cache,
gaiaGeomCollPtr geom,
double tolerance);
/**
Spatial operator: ConvexHull Spatial operator: ConvexHull
\param geom the input Geometry object \param geom the input Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
ConvexHull of input Geometry: NULL on failure. ConvexHull of input Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaConvexHull_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaConvexHull() this including any Geometry returned by gaiaConvexHull()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom);
/** /**
Spatial operator: ConvexHull
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\return the pointer to newly created Geometry object representing the
ConvexHull of input Geometry: NULL on failure.
\sa gaiaConvexHull, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaConvexHull_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Spatial operator: Buffer Spatial operator: Buffer
\param geom the input Geometry object \param geom the input Geometry object
\param radius the buffer's radius \param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to \param points number of points (aka vertices) to be used in order to
approximate a circular arc. approximate a circular arc.
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
Buffer of input Geometry: NULL on failure. Buffer of input Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaGeomCollBuffer_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeomCollBuffer() this including any Geometry returned by gaiaGeomCollBuffer()\n
not reentrant and thread unsafe.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geo m, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geo m,
double radius, double radius,
int points); int points);
/**
Spatial operator: Buffer
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to
approximate a circular arc.
\return the pointer to newly created Geometry object representing the
Buffer of input Geometry: NULL on failure.
\sa gaiaGeomCollBuffer, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaGeomCollBuffer_r()\n
reentrant and thread-safe.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer_r (const void *p_cac
he,
gaiaGeomCollPtr ge
om,
double radius,
int points);
#ifndef DOXYGEN_SHOULD_IGNORE_THIS #ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_ADVANCED #ifdef GEOS_ADVANCED
#endif #endif
/** /**
Calculates the Hausdorff distance intercurring between two Geometry object s Calculates the Hausdorff distance intercurring between two Geometry object s
\param geom1 pointer to first Geometry object \param geom1 pointer to first Geometry object
\param geom2 pointer to second Geometry object \param geom2 pointer to second Geometry object
\param dist on completion this variable will contain the calculated Hausdo rff \param dist on completion this variable will contain the calculated Hausdo rff
distance distance
\return 0 on failure: any other value on success. \return 0 on failure: any other value on success.
\sa gaiaHausdorffDistance_r
\note not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE int gaiaHausdorffDistance (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaHausdorffDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
double *dist); double *dist);
/** /**
Calculates the Hausdorff distance intercurring between two Geometry object
s
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first Geometry object
\param geom2 pointer to second Geometry object
\param dist on completion this variable will contain the calculated Hausdo
rff
distance
\return 0 on failure: any other value on success.
\sa gaiaHausdorffDistance
\note reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE int gaiaHausdorffDistance_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2,
double *dist);
/**
Spatial operator: Offset Curve Spatial operator: Offset Curve
\param geom the input Geometry object \param geom the input Geometry object
\param radius the buffer's radius \param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to \param points number of points (aka vertices) to be used in order to
approximate a circular arc. approximate a circular arc.
\param left_right if set to 1 the left-sided OffsetCurve will be returned; \param left_right if set to 1 the left-sided OffsetCurve will be returned;
otherwise the right-sided one. otherwise the right-sided one.
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
OffsetCurve of input Geometry: NULL on failure. OffsetCurve of input Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaOffsetCurve_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaOffsetCurve() this including any Geometry returned by gaiaOffsetCurve()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom,
double radius, int poin ts, double radius, int poin ts,
int left_right); int left_right);
/** /**
Spatial operator: Offset Curve
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to
approximate a circular arc.
\param left_right if set to 1 the left-sided OffsetCurve will be returned;
otherwise the right-sided one.
\return the pointer to newly created Geometry object representing the
OffsetCurve of input Geometry: NULL on failure.
\sa gaiaOffsetCurve, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaOffsetCurve_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve_r (const void *p_cache,
gaiaGeomCollPtr geom,
double radius,
int points,
int left_right);
/**
Spatial operator: Single Sided Buffer Spatial operator: Single Sided Buffer
\param geom the input Geometry object \param geom the input Geometry object
\param radius the buffer's radius \param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to \param points number of points (aka vertices) to be used in order to
approximate a circular arc. approximate a circular arc.
\param left_right if set to 1 the left-sided Buffer will be returned; \param left_right if set to 1 the left-sided Buffer will be returned;
otherwise the right-sided one. otherwise the right-sided one.
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
single-sided Buffer of input Geometry: NULL on failure. single-sided Buffer of input Geometry: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaSingleSidedBuffer_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaSingleSidedBuffer() this including any Geometry returned by gaiaSingleSidedBuffer()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr geom,
double radius, double radius,
int points, int points,
int left_right); int left_right);
/** /**
Spatial operator: Single Sided Buffer
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object
\param radius the buffer's radius
\param points number of points (aka vertices) to be used in order to
approximate a circular arc.
\param left_right if set to 1 the left-sided Buffer will be returned;
otherwise the right-sided one.
\return the pointer to newly created Geometry object representing the
single-sided Buffer of input Geometry: NULL on failure.
\sa gaiaSingleSidedBuffer, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSingleSidedBuffer_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer_r (const void
*p_cache,
gaiaGeomCollPtr
geom,
double radius,
int points,
int left_right)
;
/**
Spatial operator: Shared Paths Spatial operator: Shared Paths
\param geom1 pointer to first Geometry object \param geom1 pointer to first Geometry object
\param geom2 pointer to second Geometry object \param geom2 pointer to second Geometry object
\return the pointer to newly created Geometry object representing any \return the pointer to newly created Geometry object representing any
Share Path common to both input geometries: NULL on failure. Share Path common to both input geometries: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaSharedPaths_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaSharedPaths() this including any Geometry returned by gaiaSharedPaths()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial operator: Shared Paths
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first Geometry object
\param geom2 pointer to second Geometry object
\return the pointer to newly created Geometry object representing any
Share Path common to both input geometries: NULL on failure.
\sa gaiaSharedPaths, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSharedPaths_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths_r (const void *p_cache,
gaiaGeomCollPtr geom1
,
gaiaGeomCollPtr geom2
);
/**
Spatial operator: Line Interpolate Point Spatial operator: Line Interpolate Point
\param ln_geom the input Geometry object [expected to be of lineal type] \param ln_geom the input Geometry object [expected to be of lineal type]
\param fraction total length fraction [in the range 0.0 / 1.0] \param fraction total length fraction [in the range 0.0 / 1.0]
\return the pointer to newly created Geometry object representing a Point \return the pointer to newly created Geometry object representing a Point
laying on the input Geometry and positioned at the given length fraction: laying on the input Geometry and positioned at the given length fraction:
NULL on failure. NULL on failure.
\sa gaiaLineInterpolateEquidistantPoints \sa gaiaLineInterpolatePoint_r,
\sa gaiaFreeGeomColl gaiaLineInterpolateEquidistantPoints, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineInterpolatePoint() this including any Geometry returned by gaiaLineInterpolatePoint()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollP tr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollP tr
ln_geom, ln_geom,
double fractio n); double fractio n);
/** /**
Spatial operator: Line Interpolate Point
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param ln_geom the input Geometry object [expected to be of lineal type]
\param fraction total length fraction [in the range 0.0 / 1.0]
\return 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.
\sa gaiaLineInterpolatePoint,
gaiaLineInterpolateEquidistantPoints, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLineInterpolatePoint_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint_r (const void
*p_cache,
gaiaGeomColl
Ptr
ln_geom,
double
fraction);
/**
Spatial operator: Line Interpolate Equidistant Points Spatial operator: Line Interpolate Equidistant Points
\param ln_geom the input Geometry object [expected to be of lineal type] \param ln_geom the input Geometry object [expected to be of lineal type]
\param distance regular distance between interpolated points \param distance regular distance between interpolated points
\return the pointer to newly created Geometry object representing a MultiP oint; \return the pointer to newly created Geometry object representing a MultiP oint;
such MultiPoint always supports the M coordinate (the corresponding value such MultiPoint always supports the M coordinate (the corresponding value
representing the progressive distance for each interpolated Point). representing the progressive distance for each interpolated Point).
individual Points will be regularly spaced by the given distance: individual Points will be regularly spaced by the given distance:
NULL on failure. NULL on failure.
\sa gaiaLineInterpolatePoint \sa gaiaLineInterpolateEquidistantPoints_r,
\sa gaiaFreeGeomColl gaiaLineInterpolatePoint, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineInterpolateEquidistantPoin this including any Geometry returned by gaiaLineInterpolateEquidistantPoin
ts() ts()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr ln_geom, gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr ln_geom,
double distance); double distance);
/** /**
Spatial operator: Line Interpolate Equidistant Points
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param ln_geom the input Geometry object [expected to be of lineal type]
\param distance regular distance between interpolated points
\return the pointer to newly created Geometry object representing a MultiP
oint;
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.
\sa gaiaLineInterpolateEquidistantPoints,
gaiaLineInterpolatePoint, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLineInterpolateEquidistantPoin
ts_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolateEquidistantPoints_r (const void *p_cache,
gaiaGeomCollPtr ln_geom,
double distance);
/**
Spatial operator: Line Substring Spatial operator: Line Substring
\param ln_geom the input Geometry object [expected to be of lineal type] \param ln_geom the input Geometry object [expected to be of lineal type]
\param start_fraction substring start, expressed as total length fraction \param start_fraction substring start, expressed as total length fraction
[in the range 0.0 / 1.0] [in the range 0.0 / 1.0]
\param end_fraction substring end, expressed as total length fraction \param end_fraction substring end, expressed as total length fraction
\return the pointer to newly created Geometry object representing a Linest ring \return the pointer to newly created Geometry object representing a Linest ring
laying on the input Geometry. laying on the input Geometry.
\n this Linestring will begin (and stop) at given total length fractions. \n this Linestring will begin (and stop) at given total length fractions.
NULL on failure. NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaLineSubstring_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineSubstring() this including any Geometry returned by gaiaLineSubstring()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr ln_g eom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr ln_g eom,
double start_fraction , double start_fraction ,
double end_fraction); double end_fraction);
/** /**
Spatial operator: Line Substring
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param ln_geom the input Geometry object [expected to be of lineal type]
\param start_fraction substring start, expressed as total length fraction
[in the range 0.0 / 1.0]
\param end_fraction substring end, expressed as total length fraction
\return the pointer to newly created Geometry object representing a Linest
ring
laying on the input Geometry.
\n this Linestring will begin (and stop) at given total length fractions.
NULL on failure.
\sa gaiaLineSubstring, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLineSubstring_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring_r (const void *p_cach
e,
gaiaGeomCollPtr
ln_geom,
double start_fracti
on,
double end_fraction
);
/**
Spatial operator: Shortest Line
\param geom1 pointer to the first Geometry object.
\param geom2 pointer to the second Geometry object.
\return the pointer to newly created Geometry object representing a Linest
ring;
NULL on failure.
\n the returned Linestring graphically represents the minimum distance
intercurrinng between both input geometries.
\sa gaiaShortestLine_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaShortestLine()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine (gaiaGeomCollPtr geom1
,
gaiaGeomCollPtr geom2)
;
/**
Spatial operator: Shortest Line Spatial operator: Shortest Line
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to the first Geometry object. \param geom1 pointer to the first Geometry object.
\param geom2 pointer to the second Geometry object. \param geom2 pointer to the second Geometry object.
\return the pointer to newly created Geometry object representing a Linest ring; \return the pointer to newly created Geometry object representing a Linest ring;
NULL on failure. NULL on failure.
\n the returned Linestring graphically represents the minimum distance \n the returned Linestring graphically represents the minimum distance
intercurrinng between both input geometries. intercurrinng between both input geometries.
\sa gaiaFreeGeomColl \sa gaiaShortestLine, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaShortestLine() this including any Geometry returned by gaiaShortestLine_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine (gaiaGeomCollPtr geom1 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine_r (const void *p_cache
, ,
gaiaGeomCollPtr geom2) gaiaGeomCollPtr geom
; 1,
gaiaGeomCollPtr geom
2);
/** /**
Spatial operator: Shortest Line Spatial operator: Snap
\param geom1 pointer to the first Geometry object. \param geom1 pointer to the first Geometry object.
\param geom2 pointer to the second Geometry object. \param geom2 pointer to the second Geometry object.
\param tolerance approximation factor \param tolerance approximation factor
\return the pointer to newly created Geometry object; NULL on failure. \return the pointer to newly created Geometry object; NULL on failure.
\n the returned Geometry represents the first input Geometry (nicely \n the returned Geometry represents the first input Geometry (nicely
\e snapped to the second input Geometry, whenever is possible). \e snapped to the second input Geometry, whenever is possible).
\sa gaiaFreeGeomColl \sa gaiaSnap_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaShortestLine() this including any Geometry returned by gaiaSnap()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
double tolerance); double tolerance);
/** /**
Spatial operator: Snap
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to the first Geometry object.
\param geom2 pointer to the second Geometry object.
\param tolerance approximation factor
\return the pointer to newly created Geometry object; NULL on failure.
\n the returned Geometry represents the first input Geometry (nicely
\e snapped to the second input Geometry, whenever is possible).
\sa gaiaSnap, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSnap_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap_r (const void *p_cache,
gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2,
double tolerance);
/**
Spatial operator: Line Merge Spatial operator: Line Merge
\param geom pointer to input Geometry object. \param geom pointer to input Geometry object.
\return the pointer to newly created Geometry object; NULL on failure. \return the pointer to newly created Geometry object; NULL on failure.
\n if possible, this representing a reassembled Linestring or MultiLinestr ing. \n if possible, this representing a reassembled Linestring or MultiLinestr ing.
\sa gaiaFreeGeomColl \sa gaiaLineMerge_r, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineMerge() this including any Geometry returned by gaiaLineMerge()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom);
/** /**
Spatial operator: Line Merge
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to input Geometry object.
\return the pointer to newly created Geometry object; NULL on failure.
\n if possible, this representing a reassembled Linestring or MultiLinestr
ing.
\sa gaiaLineMerge, gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLineMerge_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Spatial operator: Line Cut At Nodes Spatial operator: Line Cut At Nodes
\param geom1 pointer to input Geometry object [Linestring or MultiLinestri ng]. \param geom1 pointer to input Geometry object [Linestring or MultiLinestri ng].
\param geom2 pointer to input Geometry object [Point or MultiPoint]. \param geom2 pointer to input Geometry object [Point or MultiPoint].
\return the pointer to newly created Geometry object; NULL on failure. \return the pointer to newly created Geometry object; NULL on failure.
\n if possible, any input Linestring will be split accordingly to given No de(s): \n if possible, any input Linestring will be split accordingly to given No de(s):
no point will be interpolated, existing Linestring Vertices will be evalua ted. no point will be interpolated, existing Linestring Vertices will be evalua ted.
\sa gaiaFreeGeomColl \sa gaiaFreeGeomColl
skipping to change at line 1278 skipping to change at line 2697
/** /**
Spatial operator: Unary Union Spatial operator: Unary Union
\param geom the input Geometry object. \param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function is the same as gaiaGeometryUnion, except in that this \n this function is the same as gaiaGeometryUnion, except in that this
works internally to the input Geometry itself. works internally to the input Geometry itself.
NULL on failure. NULL on failure.
\sa gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascaded \sa gaiaUnaryUnion_r, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascad ed
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaUnaryUnion() this including any Geometry returned by gaiaUnaryUnion()\n
not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom);
/** /**
Spatial operator: Unary Union
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function is the same as gaiaGeometryUnion, except in that this
works internally to the input Geometry itself.
NULL on failure.
\sa gaiaUnaryUnion, gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascaded
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaUnaryUnion_r()\n
reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Determines the location of the closest Point on Linestring to the given Po int Determines the location of the closest Point on Linestring to the given Po int
\param ln_geom pointer to first input Geometry object [expected to be of \param ln_geom pointer to first input Geometry object [expected to be of
the lineal type]. the lineal type].
\param pt_geom pointer to second input Geometry object [expected to be a \param pt_geom pointer to second input Geometry object [expected to be a
Point]. Point].
\return the fraction [in the range 0.0 / 1.0] of ln_geom total length \return the fraction [in the range 0.0 / 1.0] of ln_geom total length
where the closest Point to pt_geom lays. where the closest Point to pt_geom lays.
\sa gaiaLineLocatePoint_r
\note not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE double gaiaLineLocatePoint (gaiaGeomCollPtr ln_geom, GAIAGEO_DECLARE double gaiaLineLocatePoint (gaiaGeomCollPtr ln_geom,
gaiaGeomCollPtr pt_geom); gaiaGeomCollPtr pt_geom);
/** /**
Determines the location of the closest Point on Linestring to the given Po
int
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param ln_geom pointer to first input Geometry object [expected to be of
the lineal type].
\param pt_geom pointer to second input Geometry object [expected to be a
Point].
\return the fraction [in the range 0.0 / 1.0] of ln_geom total length
where the closest Point to pt_geom lays.
\sa gaiaLineLocatePoint
\note reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE double gaiaLineLocatePoint_r (const void *p_cache,
gaiaGeomCollPtr ln_geom,
gaiaGeomCollPtr pt_geom);
/**
Topology check: test if a Geometry covers another one Topology check: test if a Geometry covers another one
\param geom1 pointer to first input Geometry object. \param geom1 pointer to first input Geometry object.
\param geom2 pointer to second input Geometry object. \param geom2 pointer to second input Geometry object.
\return 0 if false; any other value if geom1 \e spatially \e covers geom2. \return 0 if false; any other value if geom1 \e spatially \e covers geom2.
\sa gaiaGeomCollCoveredBy \sa gaiaGeomCollCovers_r, gaiaGeomCollPreparedCovers, gaiaGeomCollCoveredB
y
\note not reentrant and thead unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollCovers (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollCovers (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Topology check: test if a Geometry covers another one
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object.
\param geom2 pointer to second input Geometry object.
\return 0 if false; any other value if geom1 \e spatially \e covers geom2.
\sa gaiaGeomCollCovers, gaiaGeomCollPreparedCovers, gaiaGeomCollCoveredBy
\note reentrant and thead-safe.
\remark \b 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 (GEOSPreparedGeometr y) Topology check: test if a Geometry covers another one (GEOSPreparedGeometr y)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object. \param geom1 pointer to first input Geometry object.
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 pointer to second input Geometry object. \param geom2 pointer to second input Geometry object.
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false; any other value if geom1 \e spatially \e covers geom2. \return 0 if false; any other value if geom1 \e spatially \e covers geom2.
\sa gaiaGeomCollCovers \note reentrant and thread-safe.
\sa gaiaGeomCollCovers, gaiaGeomCollCovers_r
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedCovers (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedCovers (const void *p_cache,
gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom1,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Topology check: test if a Geometry is covered by another one Topology check: test if a Geometry is covered by another one
\param geom1 pointer to first input Geometry object. \param geom1 pointer to first input Geometry object.
\param geom2 pointer to second input Geometry object. \param geom2 pointer to second input Geometry object.
\return 0 if false; any other value if geom2 is \e spatially \e covered \e by \return 0 if false; any other value if geom2 is \e spatially \e covered \e by
geom1. geom1.
\sa gaiaGeomCollCovers \sa gaiaGeomCollCoveredBy_r, gaiaGeomCollPreparedCoveredBy, gaiaGeomCollCo
vers
\note not reentrant and thread unsafe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Topology check: test if a Geometry is covered by another one
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object.
\param geom2 pointer to second input Geometry object.
\return 0 if false; any other value if geom2 is \e spatially \e covered \e
by
geom1.
\sa gaiaGeomCollCoveredBy, gaiaGeomCollPreparedCoveredBy, gaiaGeomCollCove
rs
\note reentrant and thread-safe.
\remark \b 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 (GEOSPrepared Geometry) Topology check: test if a Geometry is covered by another one (GEOSPrepared Geometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object. \param geom1 pointer to first input Geometry object.
\param blob1 the BLOB corresponding to the first Geometry \param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB \param size1 the size (in bytes) of the first BLOB
\param geom2 pointer to second input Geometry object. \param geom2 pointer to second input Geometry object.
\param blob2 the BLOB corresponding to the second Geometry \param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB \param size2 the size (in bytes) of the second BLOB
\return 0 if false; any other value if geom2 is \e spatially \e covered \e by \return 0 if false; any other value if geom2 is \e spatially \e covered \e by
geom1. geom1.
\sa gaiaGeomCollCovers \sa gaiaGeomCollCoveredBy, gaiaGeomCollCoveredBy_r, gaiaGeomCollCovers
\note reentrant and thread-safe.
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollPreparedCoveredBy (void *p_cache, GAIAGEO_DECLARE int gaiaGeomCollPreparedCoveredBy (const void *p_cache,
gaiaGeomCollPtr geom1 , gaiaGeomCollPtr geom1 ,
unsigned char *blob1, unsigned char *blob1,
int size1, int size1,
gaiaGeomCollPtr geom2 , gaiaGeomCollPtr geom2 ,
unsigned char *blob2, unsigned char *blob2,
int size2); int size2);
/** /**
Utility function: SquareGrid Utility function: SquareGrid
skipping to change at line 1399 skipping to change at line 2914
\param origin_x the X ccordinate identifying the Grid Origin. \param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin. \param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size. \param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it will \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
return a MULTIPOLYGON containing square POLYGONs. return a MULTIPOLYGON containing square POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon \n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid \sa gaiaSquareGrid_r, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalG rid
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaSquareGrid() this including any Geometry returned by gaiaSquareGrid()\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom,
double origin_x, double origin_x,
double origin_y, double origin_y,
double size, double size,
int only_edges); int only_edges);
/** /**
Utility function: SquareGrid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing square POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaSquareGrid, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGri
d
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSquareGrid_r()\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r (const void *p_cache,
gaiaGeomCollPtr geom,
double origin_x,
double origin_y,
double size,
int only_edges);
/**
Utility function: TriangularGrid Utility function: TriangularGrid
\param geom the Geometry to be covered by the Grid. \param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin. \param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin. \param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size. \param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it will \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
return a MULTIPOLYGON containing triangular POLYGONs. return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon \n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid \sa gaiaTriangularGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalG rid
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaTriangularGrid() this including any Geometry returned by gaiaTriangularGrid()\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geo m, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geo m,
double origin_x, double origin_x,
double origin_y, double origin_y,
double size, double size,
int only_edges); int only_edges);
/** /**
Utility function: TriangularGrid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaTriangularGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGri
d
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaTriangularGrid_r()\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r (const void *p_cac
he,
gaiaGeomCollPtr ge
om,
double origin_x,
double origin_y,
double size,
int only_edges);
/**
Utility function: HexagonalGrid Utility function: HexagonalGrid
\param geom the Geometry to be covered by the Grid. \param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin. \param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin. \param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size. \param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it will \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
return a MULTIPOLYGON containing hexagonal POLYGONs. return a MULTIPOLYGON containing hexagonal POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon \n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid \sa gaiaGexagonalGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularG rid
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaHexagonalGrid() this including any Geometry returned by gaiaHexagonalGrid()\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom , GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom ,
double origin_x, double origin_x,
double origin_y, double origin_y,
double size, double size,
int only_edges); int only_edges);
/**
Utility function: HexagonalGrid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing hexagonal POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaGexagonalGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGri
d
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaHexagonalGrid_r()\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r (const void *p_cach
e,
gaiaGeomCollPtr geo
m,
double origin_x,
double origin_y,
double size,
int only_edges);
#endif /* end GEOS advanced features */ #endif /* end GEOS advanced features */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS #ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_TRUNK #ifdef GEOS_TRUNK
#endif #endif
/** /**
Delaunay Triangulation Delaunay Triangulation
\param geom pointer to input Geometry object. \param geom pointer to input Geometry object.
\param tolerance optional snapping tolerance. \param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it will \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
return a MULTIPOLYGON containing triangular POLYGONs. return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull \sa gaiaDelaunatTriangulation_r,
gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaDelaunayTriangulation() this including any Geometry returned by gaiaDelaunayTriangulation()\n
not reentrant and thread unsafe.
\remark \b GEOS-TRUNK support required. \remark \b GEOS-TRUNK support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomColl Ptr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomColl Ptr
geom, geom,
double tolera nce, double tolera nce,
int only_edge s); int only_edge s);
/** /**
Delaunay Triangulation
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to input Geometry object.
\param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaDelaunatTriangulation,
gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaDelaunayTriangulation_r()\n
reentrant and thread-safe.
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation_r (const void
*p_cache,
gaiaGeomCol
lPtr
geom,
double
tolerance,
int
only_edges)
;
/**
Voronoj Diagram Voronoj Diagram
\param geom pointer to input Geometry object. \param geom pointer to input Geometry object.
\param extra_frame_size percent factor expanding the BBOX of input Geometr y \param extra_frame_size percent factor expanding the BBOX of input Geometr y
\param tolerance optional snapping tolerance. \param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it will \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
return a MULTIPOLYGON. return a MULTIPOLYGON.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaDelaunayTriangulation \sa gaiaVoronojDiagram_r, gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaVoronojDiagram() this including any Geometry returned by gaiaVoronojDiagram()\n
not reentrant and thread unsafe.
\remark \b GEOS-TRUNK support required. \remark \b GEOS-TRUNK support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geo m, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geo m,
double extra_frame_s ize, double extra_frame_s ize,
double tolerance, double tolerance,
int only_edges); int only_edges);
/** /**
Voronoj Diagram
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to input Geometry object.
\param extra_frame_size percent factor expanding the BBOX of input Geometr
y
\param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON.
\return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaVoronojDiagram, gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaVoronojDiagram_r()\n
reentrant and thread-safe.
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram_r (const void *p_cac
he,
gaiaGeomCollPtr ge
om,
double
extra_frame_size,
double tolerance,
int only_edges);
/**
Concave Hull Concave Hull
\param geom pointer to input Geometry object. \param geom pointer to input Geometry object.
\param factor multiplier used for filtering Delaunay triangles: please rea d the note. \param factor multiplier used for filtering Delaunay triangles: please rea d the note.
\param tolerance optional snapping tolerance. \param tolerance optional snapping tolerance.
\param allow_holes if FALSE any interior hole will be suppressed. \param allow_holes if FALSE any interior hole will be suppressed.
\return the pointer to newly created Geometry object (always of the Polygo n type): \return the pointer to newly created Geometry object (always of the Polygo n type):
NULL on failure. NULL on failure.
\n NULL will be returned if any argument is invalid. \n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaDelaunayTriangulation \sa gaiaConcaveHull_r, gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note This function will first create the Delauany Triangulation correspon ding \note This function will first create the Delauany Triangulation correspon ding
to input Geometry, determining at the same time the \b standard \b deviat ion to input Geometry, determining at the same time the \b standard \b deviat ion
for all edge's lengths. for all edge's lengths.
\n Then in a second pass all Delaunay's triangles will be filtered, and al l \n Then in a second pass all Delaunay's triangles will be filtered, and al l
triangles presenting at least one edge longer than \b standard \b deviatio n triangles presenting at least one edge longer than \b standard \b deviatio n
\b * \b factor will be discarded. \b * \b factor will be discarded.
\n All filtered triangles will then be merged altogether so to create the Concave Hull. \n All filtered triangles will then be merged altogether so to create the Concave Hull.
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaConcaveHull() this including any Geometry returned by gaiaConcaveHull()\n
not reentrant and thread unsafe.
\remark \b GEOS-TRUNK support required. \remark \b GEOS-TRUNK support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull (gaiaGeomCollPtr geom,
double factor, double factor,
double tolerance, double tolerance,
int allow_holes); int allow_holes);
/**
Concave Hull
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to input Geometry object.
\param factor multiplier used for filtering Delaunay triangles: please rea
d the note.
\param tolerance optional snapping tolerance.
\param allow_holes if FALSE any interior hole will be suppressed.
\return the pointer to newly created Geometry object (always of the Polygo
n type):
NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaConcaveHull, gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note This function will first create the Delauany Triangulation correspon
ding
to input Geometry, determining at the same time the \b standard \b deviat
ion
for all edge's lengths.
\n Then in a second pass all Delaunay's triangles will be filtered, and al
l
triangles presenting at least one edge longer than \b standard \b deviatio
n
\b * \b factor will be discarded.
\n All filtered triangles will then be merged altogether so to create the
Concave Hull.
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaConcaveHull_r()\n
reentrant and thread-safe.
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull_r (const void *p_cache,
gaiaGeomCollPtr geom,
double factor,
double tolerance,
int allow_holes);
#endif /* end GEOS experimental features */ #endif /* end GEOS experimental features */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS #ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LWGEOM #ifdef ENABLE_LWGEOM
#endif #endif
/** /**
Resets the LWGEOM error and warning messages to an empty state Resets the LWGEOM error and warning messages to an empty state
\sa gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg, \sa gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg gaiaSetLwGeomWarningMsg
\note not reentrant and thread unsafe.
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE void gaiaResetLwGeomMsg (void); GAIAGEO_DECLARE void gaiaResetLwGeomMsg (void);
/** /**
Return the latest LWGEOM error message (if any) Return the latest LWGEOM error message (if any)
\return the latest LWGEOM error message: an empty string if no error was \return the latest LWGEOM error message: an empty string if no error was
previoysly found. previoysly found.
\note not reentrant and thread unsafe.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg, \sa gaiaResetLwGeomMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg gaiaSetLwGeomWarningMsg
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE const char *gaiaGetLwGeomErrorMsg (void); GAIAGEO_DECLARE const char *gaiaGetLwGeomErrorMsg (void);
/** /**
Return the latest LWGEOM warning message (if any) Return the latest LWGEOM warning message (if any)
\return the latest LWGEOM warning message: an empty string if no warning w as \return the latest LWGEOM warning message: an empty string if no warning w as
previoysly found. previoysly found.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaSetLwGeomErrorMsg, \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg gaiaSetLwGeomWarningMsg
\note not reentrant and thread unsafe.
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE const char *gaiaGetLwGeomWarningMsg (void); GAIAGEO_DECLARE const char *gaiaGetLwGeomWarningMsg (void);
/** /**
Set the current LWGEOM error message Set the current LWGEOM error message
\param msg the error message to be set. \param msg the error message to be set.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
gaiaSetLwGeomWarningMsg gaiaSetLwGeomWarningMsg
\note not reentrant and thread unsafe.
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg (const char *msg);
/** /**
Set the current LWGEOM warning message Set the current LWGEOM warning message
\param msg the warning message to be set. \param msg the warning message to be set.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
gaiaSetLwGeomErrorMsg gaiaSetLwGeomErrorMsg
\note not reentrant and thread unsafe.
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE void gaiaSetLwGeomWarningMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetLwGeomWarningMsg (const char *msg);
/** /**
Utility function: MakeValid Utility function: MakeValid
\param geom the input Geometry object. \param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
skipping to change at line 1919 skipping to change at line 3631
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea \sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE int gaiaGeodesicArea (gaiaGeomCollPtr geom, double a, GAIAGEO_DECLARE int gaiaGeodesicArea (gaiaGeomCollPtr geom, double a,
double b, int use_ellipsoid, double b, int use_ellipsoid,
double *area); double *area);
/**
Utility function: re-noding lines
\param input the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n The function fully nodes a set of linestrings, using the least nodes
preserving all the input ones.
\sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaNode()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines (gaiaGeomCollPtr input);
#endif /* end LWGEOM support */ #endif /* end LWGEOM support */
#endif /* end including GEOS */ #endif /* end including GEOS */
/** /**
Utility function: SnapToGrid Utility function: SnapToGrid
\param geom the input Geometry object. \param geom the input Geometry object.
\param origin_x the X ccordinate identifying the Grid Origin. \param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin. \param origin_y the Y coordinate identifiying the Grid Origin.
 End of changes. 211 change blocks. 
163 lines changed or deleted 2009 lines changed or added


 gg_const.h   gg_const.h 
/* /*
gg_const.h -- Gaia common support for geometries: constants gg_const.h -- Gaia common support for geometries: constants
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 64 skipping to change at line 64
#define _GG_CONST_H #define _GG_CONST_H
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* constant values for getVectorLayersList modes */ /* constant values for getVectorLayersList modes */
/** mode: FAST */ /** mode: FAST (QGIS data-provider) */
#define GAIA_VECTORS_LIST_FAST 0 #define GAIA_VECTORS_LIST_FAST 0
/** mode: OPTIMISTIC */ /** mode: OPTIMISTIC */
#define GAIA_VECTORS_LIST_OPTIMISTIC 1 #define GAIA_VECTORS_LIST_OPTIMISTIC 1
/** mode: PESSIMISTIC */ /** mode: PESSIMISTIC */
#define GAIA_VECTORS_LIST_PESSIMISTIC 2 #define GAIA_VECTORS_LIST_PESSIMISTIC 2
/* constant values for Vector Layer Types */ /* constant values for Vector Layer Types */
/** Vector Layer: unknown type */ /** Vector Layer: unknown type */
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added


 gg_core.h   gg_core.h 
/* /*
gg_core.h -- Gaia common support for geometries: core functions gg_core.h -- Gaia common support for geometries: core functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 1167 skipping to change at line 1167
*/ */
GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom);
/** /**
Checks for toxic Geometry object Checks for toxic Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\return 0 if the Geometry is not toxic: otherwise any other different valu e. \return 0 if the Geometry is not toxic: otherwise any other different valu e.
\sa gaiaSanitize \sa gaiaIsToxic_r, gaiaSanitize
\note a \b toxic Geometry is a Geometry containing severely malformed \note a \b toxic Geometry is a Geometry containing severely malformed
Polygons: i.e. containing less than 4 Points. Polygons: i.e. containing less than 4 Points.
\n Or containing severely malformed Linestrings: i.e. containing less \n Or containing severely malformed Linestrings: i.e. containing less
than 2 Points. than 2 Points.
\n Attempting to pass any toxic Geometry to GEOS supported functions \n Attempting to pass any toxic Geometry to GEOS supported functions
will easily cause a crash. will easily cause a crash.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE int gaiaIsToxic (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsToxic (gaiaGeomCollPtr geom);
/** /**
Checks for toxic Geometry object
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object
\return 0 if the Geometry is not toxic: otherwise any other different valu
e.
\sa gaiaIsToxic, gaiaSanitize
\note a \b toxic Geometry is a Geometry containing severely malformed
Polygons: i.e. containing less than 4 Points.
\n Or containing severely malformed Linestrings: i.e. containing less
than 2 Points.
\n Attempting to pass any toxic Geometry to GEOS supported functions
will easily cause a crash.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE int gaiaIsToxic_r (const void *p_cache,
gaiaGeomCollPtr geom);
/**
Checks for not-closed Rings Checks for not-closed Rings
\param ring pointer to Ring object \param ring pointer to Ring object
\return 0 if the Ring in unclosed: otherwise any other different value. \return 0 if the Ring in unclosed: otherwise any other different value.
\sa gaiaIsToxic, gaiaIsNotClosedGeomColl \sa gaiaIsNotClosedRing_r, gaiaIsToxic, gaiaIsNotClosedGeomColl
\note unclosed Rings cause GEOS supported functions to crash. \note unclosed Rings cause GEOS supported functions to crash.
\n SpatiaLite will always carefully check any Ring before passing it \n SpatiaLite will always carefully check any Ring before passing it
to GEOS, eventually silently inserting a further point required so to GEOS, eventually silently inserting a further point required so
to properly close the figure. to properly close the figure.
\n This function allows to explicitly identify any unclosed Ring. \n This function allows to explicitly identify any unclosed Ring.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE int gaiaIsNotClosedRing (gaiaRingPtr ring); GAIAGEO_DECLARE int gaiaIsNotClosedRing (gaiaRingPtr ring);
/** /**
Checks for not-closed Rings
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param ring pointer to Ring object
\return 0 if the Ring in unclosed: otherwise any other different value.
\sa gaiaIsNotClosedRing, gaiaIsToxic, gaiaIsNotClosedGeomColl
\note unclosed Rings cause GEOS supported functions to crash.
\n SpatiaLite will always carefully check any Ring before passing it
to GEOS, eventually silently inserting a further point required so
to properly close the figure.
\n This function allows to explicitly identify any unclosed Ring.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE int gaiaIsNotClosedRing_r (const void *p_data,
gaiaRingPtr ring);
/**
Checks for not-closed Rings in a Geometry object Checks for not-closed Rings in a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\return 0 if the Geometry has no unclosed Rings: otherwise any other diffe rent value. \return 0 if the Geometry has no unclosed Rings: otherwise any other diffe rent value.
\sa gaiaIsToxic, gaiaIsNotClosedRing \sa gaiaIsNotClosedGeomColl_r, gaiaIsToxic, gaiaIsNotClosedRing
\note This function allows to explicitly identify any Geometry containing \note This function allows to explicitly identify any Geometry containing
at least one unclosed Ring. at least one unclosed Ring.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE int gaiaIsNotClosedGeomColl (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsNotClosedGeomColl (gaiaGeomCollPtr geom);
/** /**
Checks for not-closed Rings in a Geometry object
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom pointer to Geometry object
\return 0 if the Geometry has no unclosed Rings: otherwise any other diffe
rent value.
\sa gaiaIsNotClosedGeomColl, gaiaIsToxic, gaiaIsNotClosedRing
\note This function allows to explicitly identify any Geometry containing
at least one unclosed Ring.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE int gaiaIsNotClosedGeomColl_r (const void *p_data,
gaiaGeomCollPtr geom);
/**
Attempts to sanitize a possibly malformed Geometry object Attempts to sanitize a possibly malformed Geometry object
\param org pointer to Geometry object. \param org pointer to Geometry object.
\return the pointer to newly created Geometry: NULL on failure. \return the pointer to newly created Geometry: NULL on failure.
\sa gaiaIsToxic \sa gaiaIsToxic
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry created by gaiaSanitize() this including any Geometry created by gaiaSanitize()
skipping to change at line 1349 skipping to change at line 1410
gaiaExtractPolygonsFromGeomColl (gaiaGeomCollPtr geom); gaiaExtractPolygonsFromGeomColl (gaiaGeomCollPtr geom);
/** /**
Merges two Geometry objects into a single one Merges two Geometry objects into a single one
\param geom1 pointer to first Geometry object. \param geom1 pointer to first Geometry object.
\param geom2 pointer to second Geometry object. \param geom2 pointer to second Geometry object.
\return the pointer to newly created Geometry: NULL on failure. \return the pointer to newly created Geometry: NULL on failure.
\sa gaiaCloneGeomColl \sa gaiaMergeGeometries_r, gaiaCloneGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry created by gaiaMergeGeometries() this including any Geometry created by gaiaMergeGeometries()
\n the newly created Geometry will contain any Point, Linestring and/or \n the newly created Geometry will contain any Point, Linestring and/or
Polygon contained in both input Geometries. Polygon contained in both input Geometries.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr ge om1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr ge om1,
gaiaGeomCollPtr geo m2); gaiaGeomCollPtr geo m2);
/** /**
Merges two Geometry objects into a single one
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first Geometry object.
\param geom2 pointer to second Geometry object.
\return the pointer to newly created Geometry: NULL on failure.
\sa gaiaMergeGeometries, gaiaCloneGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry created by gaiaMergeGeometries()
\n the newly created Geometry will contain any Point, Linestring and/or
Polygon contained in both input Geometries.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries_r (const void *p_ca
che,
gaiaGeomCollPtr
geom1,
gaiaGeomCollPtr
geom2);
/**
Return a GeometryCollection containing elements matching the specified ran ge of measures Return a GeometryCollection containing elements matching the specified ran ge of measures
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param m_start range of measures: start value \param m_start range of measures: start value
\param m_end range of measures: end value \param m_end range of measures: end value
\return the pointer to newly created Geometry: NULL on failure. \return the pointer to newly created Geometry: NULL on failure.
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry created by gaiaLocateBetweenMeasures() this including any Geometry created by gaiaLocateBetweenMeasures()
skipping to change at line 1846 skipping to change at line 1931
\sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc \sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeEllipticArc (double center_x, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeEllipticArc (double center_x,
double center_y, double center_y,
double x_axis, double x_axis,
double y_axis, double y_axis,
double start, double start,
double stop, double stop,
double step); double step);
/**
Creates a Polygon from closed Linestrings
\param exterior a closed Linestring assumed to represent the Exterior Ring
.
\param interiors one (or more than one) clsed Linestrings assumed to repre
sent
all Interior Rings (could be a Linstring or a MultiLinestring).\n
NULL if there are no Interior Rings at all.
\sa gaiaPolygonize
\note this method will simply check if all the received Linestrings are
closed, but it could possibly return an invalid Polygon if there is any
topology inconsistency between the exterior and interior rings.
You are responsible to destroy (before or after) any allocated Geometry,
this including any Geometry returned by gaiaPolygonize()\n
not reentrant and thread unsafe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakePolygon (gaiaGeomCollPtr exteri
or,
gaiaGeomCollPtr interio
rs);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GG_CORE_H */ #endif /* _GG_CORE_H */
 End of changes. 14 change blocks. 
9 lines changed or deleted 122 lines changed or added


 gg_dxf.h   gg_dxf.h 
/* /*
gg_dxf.h -- Gaia common support for DXF files gg_dxf.h -- Gaia common support for DXF files
version 4.1, 2013 May 14 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 714 skipping to change at line 714
GAIAGEO_DECLARE void gaiaDestroyDxfParser (gaiaDxfParserPtr parser); GAIAGEO_DECLARE void gaiaDestroyDxfParser (gaiaDxfParserPtr parser);
/** /**
Parsing a DXF file Parsing a DXF file
\param parser pointer to DXF Parser object \param parser pointer to DXF Parser object
\param dxf_path pathname of the DXF external file to be parsed \param dxf_path pathname of the DXF external file to be parsed
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\sa gaiaCreateDxfParser, gaiaDestroyDxfParser, gaiaLoadFromDxfParser \sa gaiaParseDxfFile_r,
gaiaCreateDxfParser, gaiaDestroyDxfParser, gaiaLoadFromDxfParser
\note the pointer to the DXF Parser object is expected to be the one \note the pointer to the DXF Parser object is expected to be the one
returned by a previous call to gaiaCreateDxfParser. returned by a previous call to gaiaCreateDxfParser.
A DXF Parser object can be used only a single time to parse a DXF file A DXF Parser object can be used only a single time to parse a DXF file.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE int gaiaParseDxfFile (gaiaDxfParserPtr parser, GAIAGEO_DECLARE int gaiaParseDxfFile (gaiaDxfParserPtr parser,
const char *dxf_path); const char *dxf_path);
/** /**
Parsing a DXF file
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param parser pointer to DXF Parser object
\param dxf_path pathname of the DXF external file to be parsed
\return 0 on failure, any other value on success
\sa gaiaParseDxfFile,
gaiaCreateDxfParser, gaiaDestroyDxfParser, gaiaLoadFromDxfParser
\note the pointer to the DXF Parser object is expected to be the one
returned by a previous call to gaiaCreateDxfParser.
A DXF Parser object can be used only a single time to parse a DXF file.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE int gaiaParseDxfFile_r (const void *p_cache,
gaiaDxfParserPtr parser,
const char *dxf_path);
/**
Populating a DB so to permanently store all Geometries from a DXF Parser Populating a DB so to permanently store all Geometries from a DXF Parser
\param db_handle handle to a valid DB connection \param db_handle handle to a valid DB connection
\param parser pointer to DXF Parser object \param parser pointer to DXF Parser object
\param mode should be one of GAIA_DXF_IMPORT_BY_LAYER or GAIA_DXF_IMPORT_M IXED \param mode should be one of GAIA_DXF_IMPORT_BY_LAYER or GAIA_DXF_IMPORT_M IXED
\param append boolean flag: if set and some required DB table already exis ts \param append boolean flag: if set and some required DB table already exis ts
will attempt to append further rows into the existing table. will attempt to append further rows into the existing table.
otherwise an error will be returned. otherwise an error will be returned.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
 End of changes. 4 change blocks. 
3 lines changed or deleted 26 lines changed or added


 gg_dynamic.h   gg_dynamic.h 
/* /*
gg_dynamic.h -- Gaia common support for geometries: DynamicLine functions gg_dynamic.h -- Gaia common support for geometries: DynamicLine functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gg_formats.h   gg_formats.h 
/* /*
gg_formats.h -- Gaia common support for geometries: formats gg_formats.h -- Gaia common support for geometries: formats
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 901 skipping to change at line 901
gaiaGeomCollPtr geom, int precision ); gaiaGeomCollPtr geom, int precision );
/** /**
Creates a Geometry object from GML notation Creates a Geometry object from GML notation
\param in_buffer pointer to GML buffer \param in_buffer pointer to GML buffer
\param sqlite_handle handle to current DB connection \param sqlite_handle handle to current DB connection
\return the pointer to the newly created Geometry object: NULL on failure \return the pointer to the newly created Geometry object: NULL on failure
\sa gaiaOutGml \sa gaiaParseGml_r, gaiaOutGml
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
unless you've passed ownership of the Geometry object to some further obje ct: unless you've passed ownership of the Geometry object to some further obje ct:
in this case destroying the higher order object will implicitly destroy an y in this case destroying the higher order object will implicitly destroy an y
contained child object. contained child object.\n
not reentrant and thread unsafe.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml (const unsigned char GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml (const unsigned char
*in_buffer, *in_buffer,
sqlite3 * sqlite_handle); sqlite3 * sqlite_handle);
/** /**
Creates a Geometry object from GML notation
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param in_buffer pointer to GML buffer
\param sqlite_handle handle to current DB connection
\return the pointer to the newly created Geometry object: NULL on failure
\sa gaiaParseGml, gaiaOutGml
\note you are responsible to destroy (before or after) any allocated Geome
try,
unless you've passed ownership of the Geometry object to some further obje
ct:
in this case destroying the higher order object will implicitly destroy an
y
contained child object.\n
reentrant and thread-safe.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseGml_r (const void *p_cache,
const unsigned char
*in_buffer,
sqlite3 * sqlite_handle)
;
/**
Encodes a Geometry object into GML notation Encodes a Geometry object into GML notation
\param out_buf pointer to dynamically growing Text buffer \param out_buf pointer to dynamically growing Text buffer
\param version GML version \param version GML version
\param precision decimal digits to be used for coordinates \param precision decimal digits to be used for coordinates
\param geom pointer to Geometry object \param geom pointer to Geometry object
\sa gaiaParseGml \sa gaiaParseGml
\note if \e version is set to \b 3, then GMLv3 will be used; \note if \e version is set to \b 3, then GMLv3 will be used;
 End of changes. 4 change blocks. 
3 lines changed or deleted 30 lines changed or added


 gg_mbr.h   gg_mbr.h 
/* /*
gg_mbr.h -- Gaia common support for geometries: MBR functions gg_mbr.h -- Gaia common support for geometries: MBR functions
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gg_structs.h   gg_structs.h 
/* /*
gg_structs.h -- Gaia common support for geometries: structures gg_structs.h -- Gaia common support for geometries: structures
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gg_wfs.h   gg_wfs.h 
/* /*
gg_wfs.h -- Gaia common support for WFS gg_wfs.h -- Gaia common support for WFS
version 4.1, 2013 May 14 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 93 skipping to change at line 93
\param pk_column name of the Primary Key column; if NULL or mismatching \param pk_column name of the Primary Key column; if NULL or mismatching
then "PK_UID" will be assumed by default. then "PK_UID" will be assumed by default.
\param spatial_index if TRUE an R*Tree Spatial Index will be created \param spatial_index if TRUE an R*Tree Spatial Index will be created
\param rows on completion will contain the total number of actually import ed rows \param rows on completion will contain the total number of actually import ed rows
\param err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\param progress_callback pointer to a callback function to be invoked imme diately \param progress_callback pointer to a callback function to be invoked imme diately
after processing each WFS page (could be NULL) after processing each WFS page (could be NULL)
\param callback_ptr an arbitrary pointer (to be passed as the second argum ent \param callback_ptr an arbitrary pointer (to be passed as the second argum ent
by the callback function). by the callback function).
\sa create_wfs_catalog, load_from_wfs_paged \sa create_wfs_catalog, load_from_wfs_paged, reset_wfs_http_connection
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\note an eventual error message returned via err_msg requires to be deallo cated \note an eventual error message returned via err_msg requires to be deallo cated
by invoking free() by invoking free()
\n please note: this one simply is a convenience method, and exactly corre sponds \n please note: this one simply is a convenience method, and exactly corre sponds
to load_from_wfs_paged() setting a negative page size. to load_from_wfs_paged() setting a negative page size.
*/ */
SPATIALITE_DECLARE int load_from_wfs (sqlite3 * sqlite, SPATIALITE_DECLARE int load_from_wfs (sqlite3 * sqlite,
const char *path_or_url, const char *path_or_url,
skipping to change at line 136 skipping to change at line 136
\param spatial_index if TRUE an R*Tree Spatial Index will be created \param spatial_index if TRUE an R*Tree Spatial Index will be created
\param page_size max number of features for each single WFS call; if zero or \param page_size max number of features for each single WFS call; if zero or
negative a single monolithic page is assumed (i.e. paging will not be appl ied). negative a single monolithic page is assumed (i.e. paging will not be appl ied).
\param rows on completion will contain the total number of actually import ed rows \param rows on completion will contain the total number of actually import ed rows
\param err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\param progress_callback pointer to a callback function to be invoked imme diately \param progress_callback pointer to a callback function to be invoked imme diately
after processing each WFS page (could be NULL) after processing each WFS page (could be NULL)
\param callback_ptr an arbitrary pointer (to be passed as the second argum ent \param callback_ptr an arbitrary pointer (to be passed as the second argum ent
by the callback function). by the callback function).
\sa create_wfs_catalog, load_from_wfs \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\note an eventual error message returned via err_msg requires to be deallo cated \note an eventual error message returned via err_msg requires to be deallo cated
by invoking free() by invoking free()
\note the progress_callback function must have this signature: \note the progress_callback function must have this signature:
\b void \b myfunct(\b int \b count, \b void \b *ptr); \b void \b myfunct(\b int \b count, \b void \b *ptr);
\n and will cyclically report how many features have been processed since the initial call start. \n and will cyclically report how many features have been processed since the initial call start.
*/ */
skipping to change at line 170 skipping to change at line 170
void *callback_ptr); void *callback_ptr);
/** /**
Creates a Catalog for some WFS service Creates a Catalog for some WFS service
\param path_or_url pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL). \param path_or_url pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL).
\param err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\return the pointer to the corresponding WFS-Catalog object: NULL on failu re \return the pointer to the corresponding WFS-Catalog object: NULL on failu re
\sa destroy_wfs_catalog, get_wfs_catalog_count, get_wfs_catalog_item, load \sa destroy_wfs_catalog, get_wfs_catalog_count, get_wfs_catalog_item, load
_from_wfs _from_wfs,
reset_wfs_http_connection
\note an eventual error message returned via err_msg requires to be deallo cated \note an eventual error message returned via err_msg requires to be deallo cated
by invoking free().\n by invoking free().\n
you are responsible to destroy (before or after) any WFS-Catalog returned by create_wfs_catalog(). you are responsible to destroy (before or after) any WFS-Catalog returned by create_wfs_catalog().
*/ */
SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char SPATIALITE_DECLARE gaiaWFScatalogPtr create_wfs_catalog (const char
*path_or_url, *path_or_url,
char **err_msg) ; char **err_msg) ;
/** /**
skipping to change at line 504 skipping to change at line 505
\return TRUE on success, FALSE if any error is encountered \return TRUE on success, FALSE if any error is encountered
\sa get_wfs_schema_column, get_wfs_schema_geometry_info \sa get_wfs_schema_column, get_wfs_schema_geometry_info
*/ */
SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr han dle, SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr han dle,
const char **name, const char **name,
int *type, int *type,
int *nullable); int *nullable);
/**
Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settin
gs
\sa create_wfs_catalog, load_from_wfs, load_from_wfs_paged
*/
SPATIALITE_DECLARE void reset_wfs_http_connection (void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GG_WFS_H */ #endif /* _GG_WFS_H */
 End of changes. 5 change blocks. 
5 lines changed or deleted 14 lines changed or added


 gg_xml.h   gg_xml.h 
/* /*
gg_xml.h -- Gaia common support for XML documents gg_xml.h -- Gaia common support for XML documents
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 68 skipping to change at line 68
{ {
#endif #endif
/* constant values for XmlBLOB */ /* constant values for XmlBLOB */
/** XmlBLOB internal marker: START */ /** XmlBLOB internal marker: START */
#define GAIA_XML_START 0x00 #define GAIA_XML_START 0x00
/** XmlBLOB internal marker: END */ /** XmlBLOB internal marker: END */
#define GAIA_XML_END 0xDD #define GAIA_XML_END 0xDD
/** XmlBLOB internal marker: HEADER */ /** XmlBLOB internal marker: HEADER */
#define GAIA_XML_HEADER 0xAB #define GAIA_XML_HEADER 0xAC
/** XmlBLOB internal marker: LEGACY HEADER */
#define GAIA_XML_LEGACY_HEADER 0xAB
/** XmlBLOB internal marker: SCHEMA */ /** XmlBLOB internal marker: SCHEMA */
#define GAIA_XML_SCHEMA 0xBA #define GAIA_XML_SCHEMA 0xBA
/** XmlBLOB internal marker: FILEID */ /** XmlBLOB internal marker: FILEID */
#define GAIA_XML_FILEID 0xCA #define GAIA_XML_FILEID 0xCA
/** XmlBLOB internal marker: PARENTID */ /** XmlBLOB internal marker: PARENTID */
#define GAIA_XML_PARENTID 0xDA #define GAIA_XML_PARENTID 0xDA
/** XmlBLOB internal marker: TITLE */ /** XmlBLOB internal marker: TITLE */
#define GAIA_XML_NAME 0xDE
/** XmlBLOB internal marker: TITLE */
#define GAIA_XML_TITLE 0xDB #define GAIA_XML_TITLE 0xDB
/** XmlBLOB internal marker: ABSTRACT */ /** XmlBLOB internal marker: ABSTRACT */
#define GAIA_XML_ABSTRACT 0xDC #define GAIA_XML_ABSTRACT 0xDC
/** XmlBLOB internal marker: GEOMETRY */ /** XmlBLOB internal marker: GEOMETRY */
#define GAIA_XML_GEOMETRY 0xDD #define GAIA_XML_GEOMETRY 0xDD
/** XmlBLOB internal marker: CRC32 */ /** XmlBLOB internal marker: CRC32 */
#define GAIA_XML_CRC32 0xBC #define GAIA_XML_CRC32 0xBC
/** XmlBLOB internal marker: PAYLOAD */ /** XmlBLOB internal marker: PAYLOAD */
#define GAIA_XML_PAYLOAD 0xCB #define GAIA_XML_PAYLOAD 0xCB
skipping to change at line 100 skipping to change at line 104
/** XmlBLOB FLAG - COMPRESSED bitmask */ /** XmlBLOB FLAG - COMPRESSED bitmask */
#define GAIA_XML_COMPRESSED 0x02 #define GAIA_XML_COMPRESSED 0x02
/** XmlBLOB FLAG - VALIDATED bitmask */ /** XmlBLOB FLAG - VALIDATED bitmask */
#define GAIA_XML_VALIDATED 0x04 #define GAIA_XML_VALIDATED 0x04
/** XmlBLOB FLAG - ISO METADATA bitmask */ /** XmlBLOB FLAG - ISO METADATA bitmask */
#define GAIA_XML_ISO_METADATA 0x80 #define GAIA_XML_ISO_METADATA 0x80
/** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */ /** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */
#define GAIA_XML_SLD_SE_RASTER_STYLE 0x10 #define GAIA_XML_SLD_SE_RASTER_STYLE 0x10
/** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */ /** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */
#define GAIA_XML_SLD_SE_VECTOR_STYLE 0x40 #define GAIA_XML_SLD_SE_VECTOR_STYLE 0x40
/** XmlBLOB FLAG - SLD STYLE bitmask */
#define GAIA_XML_SLD_STYLE 0x48
/** XmlBLOB FLAG - SVG bitmask */ /** XmlBLOB FLAG - SVG bitmask */
#define GAIA_XML_SVG 0x20 #define GAIA_XML_SVG 0x20
/* function prototypes */ /* function prototypes */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS #ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LIBXML2 /* LIBXML2 enabled: supporting XML documents */ #ifdef ENABLE_LIBXML2 /* LIBXML2 enabled: supporting XML documents */
#endif #endif
/** /**
skipping to change at line 144 skipping to change at line 150
\param schema_validation_errors on completion this variable will contain a ll error/warning \param schema_validation_errors on completion this variable will contain a ll error/warning
messages emitted during the XML Schema Validation step. Can be set to NULL so to ignore any message. messages emitted during the XML Schema Validation step. Can be set to NULL so to ignore any message.
\sa gaiaXmlFromBlob, gaiaXmlTextFromBlob, gaiaXmlBlobGetLastParseError, \sa gaiaXmlFromBlob, gaiaXmlTextFromBlob, gaiaXmlBlobGetLastParseError,
gaiaXmlBlobGetLastValidateError gaiaXmlBlobGetLastValidateError
\note the XmlBLOB buffer corresponds to dynamically allocated memory: \note the XmlBLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding]. of memory cleanup via buffer binding].
*/ */
GAIAGEO_DECLARE void gaiaXmlToBlob (void *p_cache, const unsigned char GAIAGEO_DECLARE void gaiaXmlToBlob (const void *p_cache,
*xml, const unsigned char *xml, int xml_le
int xml_len, int compressed, n,
const char *schemaURI, int compressed, const char *schemaUR
I,
unsigned char **result, int *size, unsigned char **result, int *size,
char **parsing_errors, char **parsing_errors,
char **schema_validation_errors); char **schema_validation_errors);
/** /**
Extract an XMLDocument from within an XmlBLOB buffer Extract an XMLDocument from within an XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\param indent if a negative value is passed the XMLDocument will \param indent if a negative value is passed the XMLDocument will
skipping to change at line 211 skipping to change at line 217
/** /**
Checks if a BLOB actually is a valid XmlBLOB buffer Checks if a BLOB actually is a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE \return TRUE or FALSE
\sa gaiaIsCompressedXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsCompressedXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
gaiaIsSvgXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsValidXmlBlob (const unsigned char *blob, GAIAGEO_DECLARE int gaiaIsValidXmlBlob (const unsigned char *blob,
int size); int size);
/** /**
Checks if a valid XmlBLOB buffer is compressed or not Checks if a valid XmlBLOB buffer is compressed or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case. \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
gaiaIsSvgXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsCompressedXmlBlob (const unsigned char *blob, GAIAGEO_DECLARE int gaiaIsCompressedXmlBlob (const unsigned char *blob,
int size); int size);
/** /**
Checks if a valid XmlBLOB buffer does contain an ISO Metadata or not Checks if a valid XmlBLOB buffer does contain an ISO Metadata or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case. \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, gaiaIsCompressedXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
gaiaIsSvgXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsIsoMetadataXmlBlob (const unsigned char *blob , GAIAGEO_DECLARE int gaiaIsIsoMetadataXmlBlob (const unsigned char *blob ,
int size); int size);
/** /**
Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
ther case. Vector type; -1 in any other case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsSldSeVectorStyleXmlBlob (const unsigned char GAIAGEO_DECLARE int gaiaIsSldSeVectorStyleXmlBlob (const unsigned char
*blob, int size); *blob, int size);
/** /**
Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
ther case. Raster type; -1 in any other case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob,
gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSvgXmlBlob gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
gaiaIsSvgXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsSldSeRasterStyleXmlBlob (const unsigned char GAIAGEO_DECLARE int gaiaIsSldSeRasterStyleXmlBlob (const unsigned char
*blob, int size); *blob, int size);
/** /**
Checks if a valid XmlBLOB buffer does contain an SLD Style or not
\param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
SLD type; -1 in any other case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob,
gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterXmlBlob,
gaiaIsSvgXmlBlob
*/
GAIAGEO_DECLARE int gaiaIsSldStyleXmlBlob (const unsigned char
*blob, int size);
/**
Checks if a valid XmlBLOB buffer does contain an SVG Symbol or not Checks if a valid XmlBLOB buffer does contain an SVG Symbol or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case. \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any o ther case.
\sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob,
gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterStyleXmlBlob gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsSvgXmlBlob (const unsigned char *blob, int si ze); GAIAGEO_DECLARE int gaiaIsSvgXmlBlob (const unsigned char *blob, int si ze);
/** /**
Return another XmlBLOB buffer compressed / uncompressed Return another XmlBLOB buffer compressed / uncompressed
\param blob pointer to the input XmlBLOB buffer. \param blob pointer to the input XmlBLOB buffer.
\param in_size input XmlBLOB's size (in bytes). \param in_size input XmlBLOB's size (in bytes).
\param compressed if TRUE the returned XmlBLOB will be zip-compressed. \param compressed if TRUE the returned XmlBLOB will be zip-compressed.
\param result on completion will containt a pointer to the output XmlBLOB: \param result on completion will containt a pointer to the output XmlBLOB:
skipping to change at line 322 skipping to change at line 352
Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema va lidation or not Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema va lidation or not
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return TRUE or FALSE if the BLOB actually is a valid XmlBLOB but not sche ma-validated; \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB but not sche ma-validated;
-1 in any other case. -1 in any other case.
\sa gaiaIsValidXmlBlob, gaiaIsSvgXmlBlob, \sa gaiaIsValidXmlBlob, gaiaIsSvgXmlBlob,
gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob,
gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterStyleXmlBlob gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterStyleXmlBlob,
gaiaIsSldStyleXmlBlob
*/ */
GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob (const unsigned char * blob, GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob (const unsigned char * blob,
int size); int size);
/** /**
Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
skipping to change at line 371 skipping to change at line 402
\param xml_len lenght of the XML document (in bytes). \param xml_len lenght of the XML document (in bytes).
\return the SchemaURI eventually defined within a valid XMLDocument; \return the SchemaURI eventually defined within a valid XMLDocument;
NULL if the XMLDocument is invalid, or if it doesn't contain any SchemaUR I. NULL if the XMLDocument is invalid, or if it doesn't contain any SchemaUR I.
\sa gaiaXmlBlobGetSchemaURI \sa gaiaXmlBlobGetSchemaURI
\note the returned SchemaURI corresponds to dynamically allocated memory: \note the returned SchemaURI corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlGetInternalSchemaURI (void *p_cache, GAIAGEO_DECLARE char *gaiaXmlGetInternalSchemaURI (const void *p_cache,
const unsigned char * xml, const unsigned char * xml,
int xml_len); int xml_len);
/** /**
Return the FileIdentifier from a valid XmlBLOB buffer Return the FileIdentifier from a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return the FileIdentifier for any valid XmlBLOB containing a FileIdentifi er; \return the FileIdentifier for any valid XmlBLOB containing a FileIdentifi er;
skipping to change at line 426 skipping to change at line 457
\param new_blob on completion will contain a pointer to the output XmlBLOB buffer. \param new_blob on completion will contain a pointer to the output XmlBLOB buffer.
\param new_size on completion will containg the output XmlBlob's size (in bytes). \param new_size on completion will containg the output XmlBlob's size (in bytes).
\return TRUE for success; FALSE for any failure cause. \return TRUE for success; FALSE for any failure cause.
\sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobAddFileId \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobAddFileId
\note the output XmlBLOB corresponds to dynamically allocated memory: \note the output XmlBLOB corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE int gaiaXmlBlobSetFileId (void *p_cache, const unsigned GAIAGEO_DECLARE int gaiaXmlBlobSetFileId (const void *p_cache,
char const unsigned char *blob,
*blob, int size, int size, const char *identifi
const char *identifier, er,
unsigned char **new_blob, unsigned char **new_blob,
int *new_size); int *new_size);
/** /**
Return a new XmlBLOB (ISO Metadata) by replacing the ParentId value Return a new XmlBLOB (ISO Metadata) by replacing the ParentId value
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param blob pointer to the inputXmlBLOB buffer. \param blob pointer to the inputXmlBLOB buffer.
\param size input XmlBLOB's size (in bytes). \param size input XmlBLOB's size (in bytes).
\param identifier the new ParentId value to be set. \param identifier the new ParentId value to be set.
\param new_blob on completion will contain a pointer to the output XmlBLOB buffer. \param new_blob on completion will contain a pointer to the output XmlBLOB buffer.
\param new_size on completion will containg the output XmlBlob's size (in bytes). \param new_size on completion will containg the output XmlBlob's size (in bytes).
\return TRUE for success; FALSE for any failure cause. \return TRUE for success; FALSE for any failure cause.
\sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetParentId, gaiaXmlBlobAddParent Id \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetParentId, gaiaXmlBlobAddParent Id
\note the returned XmlBLOB corresponds to dynamically allocated memory: \note the returned XmlBLOB corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE int gaiaXmlBlobSetParentId (void *p_cache, GAIAGEO_DECLARE int gaiaXmlBlobSetParentId (const void *p_cache,
const unsigned char *blob, const unsigned char *blob,
int size, int size,
const char *identifier, const char *identifier,
unsigned char **new_blob, unsigned char **new_blob,
int *new_size); int *new_size);
/** /**
Return a new XmlBLOB (ISO Metadata) by inserting a FileId value Return a new XmlBLOB (ISO Metadata) by inserting a FileId value
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
skipping to change at line 477 skipping to change at line 508
\param new_blob on completion will contain a pointer to the output XmlBLOB buffer. \param new_blob on completion will contain a pointer to the output XmlBLOB buffer.
\param new_size on completion will containg the output XmlBlob's size (in bytes). \param new_size on completion will containg the output XmlBlob's size (in bytes).
\return TRUE for success; FALSE for any failure cause. \return TRUE for success; FALSE for any failure cause.
\sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobSetFileId \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobSetFileId
\note the output XmlBLOB corresponds to dynamically allocated memory: \note the output XmlBLOB corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE int gaiaXmlBlobAddFileId (void *p_cache, const unsigned GAIAGEO_DECLARE int gaiaXmlBlobAddFileId (const void *p_cache,
char const unsigned char *blob,
*blob, int size, int size, const char *identifi
const char *identifier, er,
const char *ns_id, const char *ns_id,
const char *uri_id, const char *uri_id,
const char *ns_charstr, const char *ns_charstr,
const char *uri_charstr, const char *uri_charstr,
unsigned char **new_blob, unsigned char **new_blob,
int *new_size); int *new_size);
/** /**
Return a new XmlBLOB (ISO Metadata) by inserting a ParentId value Return a new XmlBLOB (ISO Metadata) by inserting a ParentId value
skipping to change at line 508 skipping to change at line 539
\param new_blob on completion will contain a pointer to the output XmlBLOB buffer. \param new_blob on completion will contain a pointer to the output XmlBLOB buffer.
\param new_size on completion will containg the output XmlBlob's size (in bytes). \param new_size on completion will containg the output XmlBlob's size (in bytes).
\return TRUE for success; FALSE for any failure cause. \return TRUE for success; FALSE for any failure cause.
\sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetParentId, gaiaXmlBlobSetParent Id \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetParentId, gaiaXmlBlobSetParent Id
\note the returned XmlBLOB corresponds to dynamically allocated memory: \note the returned XmlBLOB corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE int gaiaXmlBlobAddParentId (void *p_cache, GAIAGEO_DECLARE int gaiaXmlBlobAddParentId (const void *p_cache,
const unsigned char *blob, const unsigned char *blob,
int size, int size,
const char *identifier, const char *identifier,
const char *ns_id, const char *ns_id,
const char *uri_id, const char *uri_id,
const char *ns_charstr, const char *ns_charstr,
const char *uri_charstr, const char *uri_charstr,
unsigned char **new_blob, unsigned char **new_blob,
int *new_size); int *new_size);
/** /**
Return the Name from a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes).
\return the Name for any valid XmlBLOB containing a Name;
NULL in any other case.
\sa gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob
\note the returned Name corresponds to dynamically allocated memory:
so you are responsible to free() it before or after.
*/
GAIAGEO_DECLARE char *gaiaXmlBlobGetName (const unsigned char
*blob, int size);
/**
Return the Title from a valid XmlBLOB buffer Return the Title from a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return the Title for any valid XmlBLOB containing a Title; \return the Title for any valid XmlBLOB containing a Title;
NULL in any other case. NULL in any other case.
\sa gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, \sa gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob
\note the returned Title corresponds to dynamically allocated memory: \note the returned Title corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlBlobGetTitle (const unsigned char GAIAGEO_DECLARE char *gaiaXmlBlobGetTitle (const unsigned char
*blob, int size); *blob, int size);
/** /**
Return the Abstract from a valid XmlBLOB buffer Return the Abstract from a valid XmlBLOB buffer
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\return the Abstract for any valid XmlBLOB containing an Abstract; \return the Abstract for any valid XmlBLOB containing an Abstract;
NULL in any other case. NULL in any other case.
\sa gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, \sa gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob,
gaiaIsSldSeRasterStyleXmlBlob gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob
\note the returned Abstract corresponds to dynamically allocated memory: \note the returned Abstract corresponds to dynamically allocated memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlBlobGetAbstract (const unsigned char GAIAGEO_DECLARE char *gaiaXmlBlobGetAbstract (const unsigned char
*blob, int size); *blob, int size);
/** /**
Return the Geometry Buffer from a valid XmlBLOB buffer Return the Geometry Buffer from a valid XmlBLOB buffer
skipping to change at line 605 skipping to change at line 654
\return the most recent XML Parse error/warning message (if any); \return the most recent XML Parse error/warning message (if any);
NULL in any other case. NULL in any other case.
\sa gaiaXmlBlobGetLastValidateError, gaiaIsValidXPathExpression, \sa gaiaXmlBlobGetLastValidateError, gaiaIsValidXPathExpression,
gaiaXmlBlobGetLastXPathError gaiaXmlBlobGetLastXPathError
\note the returned error/warning message corresponds to dynamically alloca ted memory: \note the returned error/warning message corresponds to dynamically alloca ted memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlBlobGetLastParseError (void *p_cache); GAIAGEO_DECLARE char *gaiaXmlBlobGetLastParseError (const void *p_cache );
/** /**
Return the most recent XML Validate error/warning (if any) Return the most recent XML Validate error/warning (if any)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\return the most recent XML Validate error/warning message (if any); \return the most recent XML Validate error/warning message (if any);
NULL in any other case. NULL in any other case.
\sa gaiaXmlBlobGetLastParseError, gaiaIsValidXPathExpression, \sa gaiaXmlBlobGetLastParseError, gaiaIsValidXPathExpression,
gaiaXmlBlobGetLastXPathError gaiaXmlBlobGetLastXPathError
\note the returned error/warning message corresponds to dynamically alloca ted memory: \note the returned error/warning message corresponds to dynamically alloca ted memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlBlobGetLastValidateError (void *p_cache); GAIAGEO_DECLARE char *gaiaXmlBlobGetLastValidateError (const void *p_ca che);
/** /**
Checks if a Text string could be a valid XPathExpression Checks if a Text string could be a valid XPathExpression
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\param xpath_expr pointer to the XPathExpression to be checked. \param xpath_expr pointer to the XPathExpression to be checked.
\return TRUE or FALSE if the Text string actually is a valid XPathExpressi on; \return TRUE or FALSE if the Text string actually is a valid XPathExpressi on;
-1 in any other case. -1 in any other case.
\sa gaiaXmlBlobGetLastXPathError \sa gaiaXmlBlobGetLastXPathError
*/ */
GAIAGEO_DECLARE int gaiaIsValidXPathExpression (void *p_cache, GAIAGEO_DECLARE int gaiaIsValidXPathExpression (const void *p_cache,
const char *xpath_expr); const char *xpath_expr);
/** /**
Return the most recent XPath error/warning (if any) Return the most recent XPath error/warning (if any)
\param p_cache a memory pointer returned by spatialite_alloc_connection() \param p_cache a memory pointer returned by spatialite_alloc_connection()
\return the most recent XPath error/warning message (if any); \return the most recent XPath error/warning message (if any);
NULL in any other case. NULL in any other case.
\sa gaiaXmlBlobGetLastParseError, gaiaXmlBlobGetLastValidateError, \sa gaiaXmlBlobGetLastParseError, gaiaXmlBlobGetLastValidateError,
gaiaIsValidXPathExpression gaiaIsValidXPathExpression
\note the returned error/warning message corresponds to dynamically alloca ted memory: \note the returned error/warning message corresponds to dynamically alloca ted memory:
so you are responsible to free() it before or after. so you are responsible to free() it before or after.
*/ */
GAIAGEO_DECLARE char *gaiaXmlBlobGetLastXPathError (void *p_cache); GAIAGEO_DECLARE char *gaiaXmlBlobGetLastXPathError (const void *p_cache );
/** /**
Load an external XML Document Load an external XML Document
\param path_or_url pointer to the external XML Document (could be a pathna me or an URL). \param path_or_url pointer to the external XML Document (could be a pathna me or an URL).
\param result on completion will containt a pointer to a BLOB: \param result on completion will containt a pointer to a BLOB:
NULL on failure. NULL on failure.
\param size on completion this variable will contain the BLOB's size (in b ytes). \param size on completion this variable will contain the BLOB's size (in b ytes).
\param parsing_errors on completion this variable will contain all error/w arning \param parsing_errors on completion this variable will contain all error/w arning
messages emitted during the XML Parsing step. Can be set to NULL so to ign ore any message. messages emitted during the XML Parsing step. Can be set to NULL so to ign ore any message.
\sa gaiaXmlFromBlob, gaiaXmlStore \sa gaiaXmlFromBlob, gaiaXmlStore
\note the BLOB buffer corresponds to dynamically allocated memory: \note the BLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding]. of memory cleanup via buffer binding].
*/ */
GAIAGEO_DECLARE int gaiaXmlLoad (void *p_cache, const char *path_or_url GAIAGEO_DECLARE int gaiaXmlLoad (const void *p_cache,
, const char *path_or_url,
unsigned char **result, int *size, unsigned char **result, int *size,
char **parsing_errors); char **parsing_errors);
/** /**
Stores an external XML Document Stores an external XML Document
\param blob pointer to the XmlBLOB buffer. \param blob pointer to the XmlBLOB buffer.
\param size XmlBLOB's size (in bytes). \param size XmlBLOB's size (in bytes).
\param path pathname of the export file \param path pathname of the export file
\param indent if a negative value is passed the XMLDocument will \param indent if a negative value is passed the XMLDocument will
 End of changes. 27 change blocks. 
35 lines changed or deleted 83 lines changed or added


 spatialite.h   spatialite.h 
/* /*
spatialite.h -- Gaia spatial support for SQLite spatialite.h -- Gaia spatial support for SQLite
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
skipping to change at line 74 skipping to change at line 74
#define _SPATIALITE_H #define _SPATIALITE_H
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#include <spatialite/gaiageo.h> #include <spatialite/gaiageo.h>
#ifdef LOADABLE_EXTENSION
SPATIALITE_DECLARE int
sqlite3_spatialite_init (sqlite3 * db, char **pzErrMsg,
const sqlite3_api_routines * pApi);
#endif
/**
Initializes the library
\note you are always expected to explicitly call this function
before attempting to call any SpatiaLite own function.
*/
SPATIALITE_DECLARE void spatialite_initialize (void);
/**
Finalizes the library
\note you are always expected to explicitly call this function
immediately before exiting the main application.\n
This function will free any memory allocation and will release
any system resource internally used by the library.\n
*/
SPATIALITE_DECLARE void spatialite_shutdown (void);
/** /**
Return the current library version. Return the current library version.
\return the version string.
*/ */
SPATIALITE_DECLARE const char *spatialite_version (void); SPATIALITE_DECLARE const char *spatialite_version (void);
/** /**
Return the target CPU name.
\return the target CPU string.
*/
SPATIALITE_DECLARE const char *spatialite_target_cpu (void);
/**
Initializes the internal memory block supporting each connection Initializes the internal memory block supporting each connection
\sa spatialite_init_ex, spatialite_cleanup_ex \sa spatialite_init_ex, spatialite_cleanup_ex
*/ */
SPATIALITE_DECLARE void *spatialite_alloc_connection (void); SPATIALITE_DECLARE void *spatialite_alloc_connection (void);
/** /**
Initializes the library. Initializes a SpatiaLite connection.
This function is now \b DEPRECATED because is not reentrant (not thread sa fe); This function is now \b DEPRECATED because is not reentrant (not thread sa fe);
use spatialite_init_ex() for all new development. use spatialite_init_ex() for all new development.
\param verbose if TRUE a short start-up message is shown on stderr \param verbose if TRUE a short start-up message is shown on stderr
\sa spatialite_cleanup, spatialite_init_ex \sa spatialite_cleanup, spatialite_init_ex
\note You absolutely must invoke this function before attempting to perfor m \note You absolutely must invoke this function before attempting to perfor m
any other SpatiaLite's call. any other SpatiaLite's call.
*/ */
SPATIALITE_DECLARE void spatialite_init (int verbose); SPATIALITE_DECLARE void spatialite_init (int verbose);
/** /**
Initializes the library. Initializes a SpatiaLite connection.
\param db_handle handle to the current SQLite connection \param db_handle handle to the current SQLite connection
\param ptr a memory pointer returned by spatialite_alloc_connection() \param ptr a memory pointer returned by spatialite_alloc_connection()
\param verbose if TRUE a short start-up message is shown on stderr \param verbose if TRUE a short start-up message is shown on stderr
\sa spatialite_alloc_connection, spatialite_cleanup_ex, spatialite_init \sa spatialite_alloc_connection, spatialite_cleanup_ex, spatialite_init
\note You absolutely must invoke this function before attempting to perfor m \note You absolutely must invoke this function before attempting to perfor m
any other SpatiaLite's call. any other SpatiaLite's call.
*/ */
SPATIALITE_DECLARE void spatialite_init_ex (sqlite3 * db_handle, void * SPATIALITE_DECLARE void spatialite_init_ex (sqlite3 * db_handle,
ptr, const void *ptr, int verbose
int verbose); );
/** /**
Initializes the GEOS library. Initializes the GEOS library.
\note You are never supposed to invoke this function (internally handled). \note You are never supposed to invoke this function (internally handled).
*/ */
SPATIALITE_DECLARE void spatialite_init_geos (void); SPATIALITE_DECLARE void spatialite_init_geos (void);
/** /**
Cleanup spatialite Cleanup a SpatiaLite connection
This function is now \b DEPRECATED; use spatialite_cleanup_ex() for all ne w development. This function is now \b DEPRECATED; use spatialite_cleanup_ex() for all ne w development.
This function performs general cleanup, essentially undoing the effect This function performs general cleanup, essentially undoing the effect
of spatialite_init(). of spatialite_init().
\sa spatialite_init \sa spatialite_init
*/ */
SPATIALITE_DECLARE void spatialite_cleanup (void); SPATIALITE_DECLARE void spatialite_cleanup (void);
/** /**
Cleanup spatialite Cleanup a SpatiaLite connection
This function performs general cleanup, essentially undoing the effect This function performs general cleanup, essentially undoing the effect
of spatialite_init_ex(). of spatialite_init_ex().
\param ptr the same memory pointer passed to the corresponding call to \param ptr the same memory pointer passed to the corresponding call to
spatialite_init_ex() and returned by spatialite_alloc_connection() spatialite_init_ex() and returned by spatialite_alloc_connection()
\sa spatialite_init_ex, spatialite_alloc_connection \sa spatialite_init_ex, spatialite_alloc_connection
*/ */
SPATIALITE_DECLARE void spatialite_cleanup_ex (void *ptr); SPATIALITE_DECLARE void spatialite_cleanup_ex (const void *ptr);
/** /**
Dumps a full geometry-table into an external Shapefile Dumps a full geometry-table into an external Shapefile
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table the name of the table to be exported \param table the name of the table to be exported
\param column the name of the geometry column \param column the name of the geometry column
\param shp_path pathname of the Shapefile to be exported (no suffix) \param shp_path pathname of the Shapefile to be exported (no suffix)
\param charset a valid GNU ICONV charset to be used for DBF text strings \param charset a valid GNU ICONV charset to be used for DBF text strings
\param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL \param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL
skipping to change at line 439 skipping to change at line 472
SPATIALITE_DECLARE void check_duplicated_rows (sqlite3 * sqlite, SPATIALITE_DECLARE void check_duplicated_rows (sqlite3 * sqlite,
char *table, char *table,
int *dupl_count); int *dupl_count);
/** /**
Remove duplicated rows from a table Remove duplicated rows from a table
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table name of the table to be cleaned \param table name of the table to be cleaned
\sa check_duplicated_rows \sa check_duplicated_rows, remove_duplicated_rows_ex
\note when two (or more) duplicated rows exist, only the first occurence \note when two (or more) duplicated rows exist, only the first occurence
will be preserved, then deleting any further occurrence. will be preserved, then deleting any further occurrence.
*/ */
SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite, SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite,
char *table); char *table);
/** /**
Remove duplicated rows from a table
\param sqlite handle to current DB connection
\param table name of the table to be cleaned
\param removed on successful completion will contain the total
count of removed duplicate rows
\sa check_duplicated_rows, remove_duplicated_rows
\note when two (or more) duplicated rows exist, only the first occurence
will be preserved, then deleting any further occurrence.
*/
SPATIALITE_DECLARE void remove_duplicated_rows_ex (sqlite3 * sqlite,
char *table,
int *removed);
/**
Creates a derived table surely containing elementary Geometries Creates a derived table surely containing elementary Geometries
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param inTable name of the input table \param inTable name of the input table
\param geometry name of the Geometry column \param geometry name of the Geometry column
\param outTable name of the output table to be created \param outTable name of the output table to be created
\param pKey name of the Primary Key column in the output table \param pKey name of the Primary Key column in the output table
\param multiId name of the column identifying origins in the output table \param multiId name of the column identifying origins in the output table
\note if the input table contains some kind of complex Geometry \note if the input table contains some kind of complex Geometry
skipping to change at line 513 skipping to change at line 563
entry is expected to be already declared in the GEOMETRY_COLUMNS table. entry is expected to be already declared in the GEOMETRY_COLUMNS table.
These informations will be permanently stored into the LAYER_STATISTICS These informations will be permanently stored into the LAYER_STATISTICS
table; if such table does not yet exists will be implicitly created. table; if such table does not yet exists will be implicitly created.
- if table is NULL, any entry found within GEOMETRY_COLUMNS - if table is NULL, any entry found within GEOMETRY_COLUMNS
will be processed. will be processed.
- if table is not NULL and column is NULL, any geometry - if table is not NULL and column is NULL, any geometry
belonging to the given table will be processed. belonging to the given table will be processed.
- if both table and column are not NULL, then only the - if both table and column are not NULL, then only the
given entry will be processed. given entry will be processed.
\sa gaiaStatisticsInvalidate, gaiaGetLayerExtent, gaiaGetVectorLayersList
\return 0 on failure, the total count of processed entries on success \return 0 on failure, the total count of processed entries on success
*/ */
SPATIALITE_DECLARE int update_layer_statistics (sqlite3 * sqlite, SPATIALITE_DECLARE int update_layer_statistics (sqlite3 * sqlite,
const char *table, const char *table,
const char *column); const char *column);
/** /**
Immediately and unconditionally invalidates the already existing Statistic
s
\param handle SQLite handle to current DB connection.
\param table VectorLayer Table (or View, or VirtualShape).
\param geometry Geometry Column name.
\return 0 on success, any other value on success
\sa update_layer_statistics, gaiaGetLayerExtent, gaiaGetVectorLayersList
\note if the table arg is NULL all Statistics for any VectorLayer defined
within
the DB will be invalidated; otherwise only a single Layer will be affected
d (if existing).
\n By defining the geometry arg (not NULL) you can further restrict your s
election.
*/
SPATIALITE_DECLARE int gaiaStatisticsInvalidate (sqlite3 * handle,
const char *table,
const char *geometry);
/**
Queries the Metadata tables returning the Layer Full Extent Queries the Metadata tables returning the Layer Full Extent
\param handle SQLite handle to current DB connection. \param handle SQLite handle to current DB connection.
\param table VectorLayer Table (or View, or VirtualShape). \param table VectorLayer Table (or View, or VirtualShape).
\param geometry Geometry Column name. \param geometry Geometry Column name.
\param mode if TRUE a PESSIMISTIC statistics update will be implied, \param mode if TRUE a PESSIMISTIC statistics update will be implied,
otherwise OPTIMISTIC. otherwise OPTIMISTIC.
\return the pointer to the newly created Geometry (Envelope): NULL on fail ure \return the pointer to the newly created Geometry (Envelope): NULL on fail ure
\sa update_layer_statistic, gaiaStatisticsInvalidate, gaiaGetVectorLayersL
ist
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry returned by gaiaGetLayerExtent(). Geometry returned by gaiaGetLayerExtent().
\n The geometry arg is optional when the table simply has a single Geometr y Column, \n The geometry arg is optional when the table simply has a single Geometr y Column,
and can be NULL in this case. and can be NULL in this case.
\n When the mode arg is set to FALSE (default) then the returned infos \n When the mode arg is set to FALSE (default) then the returned infos
will be simply retrieved from the staticized statistic tables (faster, bu t could be inaccurate). will be simply retrieved from the staticized statistic tables (faster, bu t could be inaccurate).
\n If the mode arg is set to TRUE a preliminary attempt to update the \n If the mode arg is set to TRUE a preliminary attempt to update the
statistic tables will be always performed (probably slower, but surely ac curate). statistic tables will be always performed (probably slower, but surely ac curate).
\n If the named Layer doesn't exist, or if it's completely empty (not cont aining \n If the named Layer doesn't exist, or if it's completely empty (not cont aining
any valid Geometry) NULL will be returned. any valid Geometry) NULL will be returned.
skipping to change at line 552 skipping to change at line 625
const char *table , const char *table ,
const char *geome try, const char *geome try,
int mode); int mode);
/** /**
Queries the Metadata tables supporting Vector Layers Queries the Metadata tables supporting Vector Layers
\param handle SQLite handle to current DB connection. \param handle SQLite handle to current DB connection.
\param table VectorLayer Table (or View, or VirtualShape). \param table VectorLayer Table (or View, or VirtualShape).
\param geometry Geometry Column name. \param geometry Geometry Column name.
\param mode one of GAIA_VECTORS_LIST_LOOSE or GAIA_VECTORS_LIST_STRICT. \param mode one of GAIA_VECTORS_LIST_OPTIMISTIC or GAIA_VECTORS_LIST_PESSI MISTIC.
\return the pointer to the newly created VectorLayersList object: NULL on failure \return the pointer to the newly created VectorLayersList object: NULL on failure
\sa gaiaFreeVectorLayersList \sa gaiaFreeVectorLayersList, update_layer_statistics, gaiaStatisticsInval
idate,
gaiaGetLayerExtent, gaiaGetVectorLayersList
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
VectorLayersList returned by gaiaGetVectorLayersList(). VectorLayersList returned by gaiaGetVectorLayersList().
\n If the table arg is NULL all VectorLayers defined within the DB will be reported; \n If the table arg is NULL all VectorLayers defined within the DB will be reported;
otherwise only a single Layer will be reported (if existing). otherwise only a single Layer will be reported (if existing).
\n By defining the geometry arg (not NULL) you can further restrict the re turned report. \n By defining the geometry arg (not NULL) you can further restrict the re turned report.
\n When the mode arg is set to GAIA_VECTORS_LIST_FAST (default) then the r eturned infos \n When the mode arg is set to GAIA_VECTORS_LIST_OPTIMISTIC (default) then the returned infos
will be simply retrieved from the staticized statistic tables (faster, bu t could be inaccurate). will be simply retrieved from the staticized statistic tables (faster, bu t could be inaccurate).
\n If the mode arg is set to GAIA_VECTORS_LIST_PRECISE a preliminary attem pt to update the \n If the mode arg is set to GAIA_VECTORS_LIST_PESSIMISTIC a preliminary a ttempt to update the
statistic tables will be always performed (probably slower, but surely ac curate). statistic tables will be always performed (probably slower, but surely ac curate).
*/ */
SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList (sql ite3 SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList (sql ite3
* *
hand le, hand le,
cons t cons t
char char
*tab le, *tab le,
cons t cons t
char char
*geo metry, *geo metry,
int int
mode ); mode );
/** /**
Creates (or re-creates) the "splite_metacatalog" and
"splite_metacalog_statistics" tables.
\param handle SQLite handle to current DB connection.
\return 0 (FALSE) on failure, any other value (TRUE) on success
\sa gaiaUpdateMetaCatalogStatistics, gaiaUpdateMetaCatalogStatisticsFromMa
ster
*/
SPATIALITE_DECLARE int gaiaCreateMetaCatalogTables (sqlite3 * handle);
/**
Updates the "splite_metacatalog_statistics" table.
\param handle SQLite handle to current DB connection.
\param table name of the table to be processed.
\param column name of the column to be processed.
\return 0 (FALSE) on failure, any other value (TRUE) on success
\sa gaiaCreateMetaCatalogTables, gaiaUpdateMetaCatalogStatisticsFromMaster
*/
SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatistics (sqlite3 * handl
e,
const char *tabl
e,
const char *colu
mn);
/**
Updates the "splite_metacatalog_statistics" table (using a Master Table).
\param handle SQLite handle to current DB connection.
\param master_table name of the master-table controlling the whole process
.
\param table_name name of the column into the master-table containing tabl
e-names.
\param column_name name of the column into the master-table containing col
umn-names.
\return 0 (FALSE) on failure, any other value (TRUE) on success
\sa gaiaCreateMetaCatalogTables, gaiaUpdateMetaCatalogStatistics
*/
SPATIALITE_DECLARE int gaiaUpdateMetaCatalogStatisticsFromMaster (sqlit
e3 *
handle
,
const
char
*maste
r_table,
const
char
*table
_name,
const
char
*colum
n_name);
/**
Destroys a VectorLayersList object Destroys a VectorLayersList object
\param ptr pointer to the VectorLayersList object to be destroyed \param ptr pointer to the VectorLayersList object to be destroyed
\sa gaiaGetVectorLayersList \sa gaiaGetVectorLayersList
*/ */
SPATIALITE_DECLARE void gaiaFreeVectorLayersList (gaiaVectorLayersListP tr SPATIALITE_DECLARE void gaiaFreeVectorLayersList (gaiaVectorLayersListP tr
ptr); ptr);
/** /**
skipping to change at line 602 skipping to change at line 724
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table name of the table to be removed \param table name of the table to be removed
\note this function will drop a SpatialTable, SpatialView or VirtualShape being \note this function will drop a SpatialTable, SpatialView or VirtualShape being
properly registered within the Metadata tables. properly registered within the Metadata tables.
\n an eventual Spatial Index will be dropped as well, and any row referrin g the \n an eventual Spatial Index will be dropped as well, and any row referrin g the
selected table will be removed from the Metadata tables. selected table will be removed from the Metadata tables.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\sa gaiaDropTableEx
\note this one simply is a convenience method alway defaulting to
gaiaDropTableEx(sqlite, "main", table);
*/ */
SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *tab le); SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *tab le);
/** /**
Drops a layer-table, removing any related dependency
\param sqlite handle to current DB connection
\param prefix schema prefix identifying the target DB\n
"main" always identifies the main DB (primary, not Attached).
\param table name of the table to be removed
\note this function will drop a SpatialTable, SpatialView or VirtualShape
being
properly registered within the Metadata tables.
\n an eventual Spatial Index will be dropped as well, and any row referrin
g the
selected table will be removed from the Metadata tables.
\return 0 on failure, any other value on success
\sa gaiaDropTable
*/
SPATIALITE_DECLARE int gaiaDropTableEx (sqlite3 * sqlite,
const char *prefix,
const char *table);
/**
Checks a Geometry Column for validity Checks a Geometry Column for validity
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table name of the table \param table name of the table
\param geometry name of the column to be checked \param geometry name of the column to be checked
\param report_path pathname of the report-file \param report_path pathname of the report-file
\param n_rows if this variable is not NULL on successful completion will \param n_rows if this variable is not NULL on successful completion will
contain the total number of rows found into the checkeck table contain the total number of rows found into the checkeck table
\param n_invalids if this variable is not NULL on successful completion wi ll \param n_invalids if this variable is not NULL on successful completion wi ll
contain the total number of invalid Geometries found into the checkeck tab le contain the total number of invalid Geometries found into the checkeck tab le
\param err_msg if this variable is not NULL and the return status is ZERO \param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned (failure), an appropriate error message will be returned
\sa check_geometry_column_r, check_all_geometry_columns,
sanitize_geometry_column, sanitize_all_geometry_columns
\note this function will check a Geometry Column (layer) for validity; \note this function will check a Geometry Column (layer) for validity;
a HTML report will be produced. a HTML report will be produced.
\n an eventual error message returned via err_msg requires to be deallocat ed \n an eventual error message returned via err_msg requires to be deallocat ed
by invoking free() by invoking free()\n
not reentrant and thread unsafe.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
SPATIALITE_DECLARE int check_geometry_column (sqlite3 * sqlite, SPATIALITE_DECLARE int check_geometry_column (sqlite3 * sqlite,
const char *table, const char *table,
const char *geom, const char *geom,
const char *report_path, const char *report_path,
int *n_rows, int *n_invali ds, int *n_rows, int *n_invali ds,
char **err_msg); char **err_msg);
/** /**
Checks a Geometry Column for validity
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param sqlite handle to current DB connection
\param table name of the table
\param geometry name of the column to be checked
\param report_path pathname of the report-file
\param n_rows if this variable is not NULL on successful completion will
contain the total number of rows found into the checkeck table
\param n_invalids if this variable is not NULL on successful completion wi
ll
contain the total number of invalid Geometries found into the checkeck tab
le
\param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned
\sa check_geometry_column, check_all_geometry_columns,
sanitize_geometry_column, sanitize_all_geometry_columns
\note this function will check a Geometry Column (layer) for validity;
a HTML report will be produced.
\n an eventual error message returned via err_msg requires to be deallocat
ed
by invoking free()\n
reentrant and thread-safe.
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int check_geometry_column_r (const void *p_cache,
sqlite3 * sqlite,
const char *table,
const char *geom,
const char *report_path,
int *n_rows,
int *n_invalids,
char **err_msg);
/**
Checks all Geometry Columns for validity Checks all Geometry Columns for validity
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param output_dir pathname of the directory to be created for report-files \param output_dir pathname of the directory to be created for report-files
\param n_invalids if this variable is not NULL on successful completion wi ll \param n_invalids if this variable is not NULL on successful completion wi ll
contain the total number of invalid Geometries found contain the total number of invalid Geometries found
\param err_msg if this variable is not NULL and the return status is ZERO \param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned (failure), an appropriate error message will be returned
\sa check_all_geometry_columns_r, check_geometry_column,
sanitize_geometry_column, sanitize_all_geometry_columns
\note this function will check all Geometry Columns (vector layers) for va lidity; \note this function will check all Geometry Columns (vector layers) for va lidity;
a HTML report will be produced. a HTML report will be produced.
\n an eventual error message returned via err_msg requires to be deallocat ed \n an eventual error message returned via err_msg requires to be deallocat ed
by invoking free() by invoking free()\n
not reentrant and thread unsafe.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
SPATIALITE_DECLARE int check_all_geometry_columns (sqlite3 * sqlite, SPATIALITE_DECLARE int check_all_geometry_columns (sqlite3 * sqlite,
const char *output_di r, const char *output_di r,
int *n_invalids, int *n_invalids,
char **err_msg); char **err_msg);
/** /**
Checks all Geometry Columns for validity
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param sqlite handle to current DB connection
\param output_dir pathname of the directory to be created for report-files
\param n_invalids if this variable is not NULL on successful completion wi
ll
contain the total number of invalid Geometries found
\param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned
\sa check_all_geometry_columns, check_geometry_column,
sanitize_geometry_column, sanitize_all_geometry_columns
\note this function will check all Geometry Columns (vector layers) for va
lidity;
a HTML report will be produced.
\n an eventual error message returned via err_msg requires to be deallocat
ed
by invoking free()\n
reentrant and thread-safe.
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int check_all_geometry_columns_r (const void *p_cach
e,
sqlite3 * sqlite,
const char *output_
dir,
int *n_invalids,
char **err_msg);
/**
Sanitizes a Geometry Column making all invalid geometries to be valid Sanitizes a Geometry Column making all invalid geometries to be valid
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table name of the table \param table name of the table
\param geometry name of the column to be checked \param geometry name of the column to be checked
\param tmp_table name of the temporary table \param tmp_table name of the temporary table
\param report_path pathname of the report-file \param report_path pathname of the report-file
\param n_invalids if this variable is not NULL on successful completion wi ll \param n_invalids if this variable is not NULL on successful completion wi ll
contain the total number of invalid Geometries found into the sanitize tab le contain the total number of invalid Geometries found into the sanitize tab le
\param n_repaired if this variable is not NULL on successful completion wi ll \param n_repaired if this variable is not NULL on successful completion wi ll
contain the total number of repaired Geometries contain the total number of repaired Geometries
\param n_discarded if this variable is not NULL on successful completion w ill \param n_discarded if this variable is not NULL on successful completion w ill
contain the total number of repaired Geometries (by discarding fragments) contain the total number of repaired Geometries (by discarding fragments)
\param n_failures if this variable is not NULL on successful completion wi ll \param n_failures if this variable is not NULL on successful completion wi ll
contain the total number of repair failures (i.e. Geometries beyond possib le repair) contain the total number of repair failures (i.e. Geometries beyond possib le repair)
\param err_msg if this variable is not NULL and the return status is ZERO \param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned (failure), an appropriate error message will be returned
\sa sanitize_geometry_column_r, check_geometry_column,
check_all_geometry_columns, sanitize_all_geometry_columns
\note this function will attempt to make valid all invalid geometries \note this function will attempt to make valid all invalid geometries
found within a Geometry Column (layer); a temporary table is required. found within a Geometry Column (layer); a temporary table is required.
\n if the process has full success the temprary table will be deleted; \n if the process has full success the temprary table will be deleted;
otherwise it will be preserved for further inspection. otherwise it will be preserved for further inspection.
a HTML report will be produced as well. a HTML report will be produced as well.
\n an eventual error message returned via err_msg requires to be deallocat ed \n an eventual error message returned via err_msg requires to be deallocat ed
by invoking free() by invoking free()\n
not reentrant and thread unsafe.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
SPATIALITE_DECLARE int sanitize_geometry_column (sqlite3 * sqlite, SPATIALITE_DECLARE int sanitize_geometry_column (sqlite3 * sqlite,
const char *table, const char *table,
const char *geom, const char *geom,
const char *tmp_table, const char *tmp_table,
const char *report_path , const char *report_path ,
int *n_invalids, int *n_invalids,
int *n_repaired, int *n_repaired,
int *n_discarded, int *n_discarded,
int *n_failures, int *n_failures,
char **err_msg); char **err_msg);
/** /**
Sanitizes a Geometry Column making all invalid geometries to be valid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param sqlite handle to current DB connection
\param table name of the table
\param geometry name of the column to be checked
\param tmp_table name of the temporary table
\param report_path pathname of the report-file
\param n_invalids if this variable is not NULL on successful completion wi
ll
contain the total number of invalid Geometries found into the sanitize tab
le
\param n_repaired if this variable is not NULL on successful completion wi
ll
contain the total number of repaired Geometries
\param n_discarded if this variable is not NULL on successful completion w
ill
contain the total number of repaired Geometries (by discarding fragments)
\param n_failures if this variable is not NULL on successful completion wi
ll
contain the total number of repair failures (i.e. Geometries beyond possib
le repair)
\param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned
\sa sanitize_geometry_column, check_geometry_column,
check_all_geometry_columns, sanitize_all_geometry_columns
\note this function will attempt to make valid all invalid geometries
found within a Geometry Column (layer); a temporary table is required.
\n if the process has full success the temprary table will be deleted;
otherwise it will be preserved for further inspection.
a HTML report will be produced as well.
\n an eventual error message returned via err_msg requires to be deallocat
ed
by invoking free()\n
reentrant and thread-safe.
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int sanitize_geometry_column_r (const void *p_cache,
sqlite3 * sqlite,
const char *table,
const char *geom,
const char *tmp_table
,
const char *report_pa
th,
int *n_invalids,
int *n_repaired,
int *n_discarded,
int *n_failures,
char **err_msg);
/**
Sanitizes all Geometry Columns making all invalid geometries to be valid Sanitizes all Geometry Columns making all invalid geometries to be valid
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param tmp_prefix name-prefix for temporary tables \param tmp_prefix name-prefix for temporary tables
\param output_dir pathname of the directory to be created for report-files \param output_dir pathname of the directory to be created for report-files
\param not_repaired if this variable is not NULL on successful completion will \param not_repaired if this variable is not NULL on successful completion will
contain the total count of repair failures (i.e. Geometries beyond possibl e repair) contain the total count of repair failures (i.e. Geometries beyond possibl e repair)
\param err_msg if this variable is not NULL and the return status is ZERO \param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned (failure), an appropriate error message will be returned
\sa sanitize_all_geometry_columns_r, check_geometry_column,
check_all_geometry_columns, sanitize_geometry_column
\note this function will attempt to make valid all invalid geometries \note this function will attempt to make valid all invalid geometries
found within all Geometry Columns (vector layers); a temporary table is found within all Geometry Columns (vector layers); a temporary table is
required so to support each input table. required so to support each input table.
\n if the process has full success the temprary table will be deleted; \n if the process has full success the temprary table will be deleted;
otherwise it will be preserved for further inspection. otherwise it will be preserved for further inspection.
a HTML report will be produced as well. a HTML report will be produced as well.
\n an eventual error message returned via err_msg requires to be deallocat ed \n an eventual error message returned via err_msg requires to be deallocat ed
by invoking free() by invoking free()\n
not reentrant and thread unsafe.
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
SPATIALITE_DECLARE int sanitize_all_geometry_columns (sqlite3 * sqlite, SPATIALITE_DECLARE int sanitize_all_geometry_columns (sqlite3 * sqlite,
const char const char
*tmp_prefix, *tmp_prefix,
const char const char
*output_dir, *output_dir,
int *not_repaired, int *not_repaired,
char **err_msg); char **err_msg);
/**
Sanitizes all Geometry Columns making all invalid geometries to be valid
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param sqlite handle to current DB connection
\param tmp_prefix name-prefix for temporary tables
\param output_dir pathname of the directory to be created for report-files
\param not_repaired if this variable is not NULL on successful completion
will
contain the total count of repair failures (i.e. Geometries beyond possibl
e repair)
\param err_msg if this variable is not NULL and the return status is ZERO
(failure), an appropriate error message will be returned
\sa sanitize_all_geometry_columns, check_geometry_column,
check_all_geometry_columns, sanitize_geometry_column
\note this function will attempt to make valid all invalid geometries
found within all Geometry Columns (vector layers); a temporary table is
required so to support each input table.
\n if the process has full success the temprary table will be deleted;
otherwise it will be preserved for further inspection.
a HTML report will be produced as well.
\n an eventual error message returned via err_msg requires to be deallocat
ed
by invoking free()\n
reentrant and thread-safe.
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int sanitize_all_geometry_columns_r (const void *p_c
ache,
sqlite3 * sqlite
,
const char
*tmp_prefix,
const char
*output_dir,
int *not_repaire
d,
char **err_msg);
SPATIALITE_DECLARE int gaiaGPKG2Spatialite (sqlite3 * handle_in,
const char *gpkg_in_path,
sqlite3 * handle_out,
const char *splite_out_path)
;
SPATIALITE_DECLARE int gaiaSpatialite2GPKG (sqlite3 * handle_in,
const char *splite_in_path,
sqlite3 * handle_out,
const char *gpkg_out_path);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SPATIALITE_H */ #endif /* _SPATIALITE_H */
 End of changes. 34 change blocks. 
18 lines changed or deleted 383 lines changed or added


 sqlite.h   sqlite.h 
/* /*
sqlite.h -- supporting SQLite headers in a flexible way sqlite.h -- supporting SQLite headers in a flexible way
version 4.1, 2013 May 8 version 4.2, 2014 July 25
Author: Sandro Furieri a.furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/