debug.h   debug.h 
/* /*
debug.h -- abstract defs for standard output functions debug.h -- abstract defs for standard output functions
version 4.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2012 Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com> Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
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
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 gaiaaux.h   gaiaaux.h 
/* /*
gaiaaux.h -- Gaia common utility functions gaiaaux.h -- Gaia common utility functions
version 4.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 273 skipping to change at line 273
SQL log: statement start SQL log: statement start
\param sqlite handle of the current DB connection \param sqlite handle of the current DB connection
\param user_agent name of the invoking application, e.g. "spatialite_gui" or "spatialite CLI" \param user_agent name of the invoking application, e.g. "spatialite_gui" or "spatialite CLI"
\param utf8Sql the SQL statement bein executed \param utf8Sql the SQL statement bein executed
\param sqllog_pk after completion this variable will contain the value \param sqllog_pk after completion this variable will contain the value
of the Primary Key identifying the corresponding Log event of the Primary Key identifying the corresponding Log event
\sa gaiaUpdateSqlLog \sa gaiaUpdateSqlLog
\note this function inserts an \i event into the SQL Log, and \note this function inserts an \b event into the SQL Log, and
is expected to be invoked immediately \b before executing the SQL is expected to be invoked immediately \b before executing the SQL
statement itself. statement itself.
*/ */
GAIAAUX_DECLARE void gaiaInsertIntoSqlLog(sqlite3 *sqlite, const char * GAIAAUX_DECLARE void gaiaInsertIntoSqlLog (sqlite3 * sqlite,
user_agent, const char *utf8Sql, sqlite3_int64 *sqllog_pk); const char *user_agent,
const char *utf8Sql,
sqlite3_int64 * sqllog_pk);
/** /**
SQL log: statement start SQL log: statement start
\param sqlite handle of the current DB connection \param sqlite handle of the current DB connection
\param sqllog_pk the Primary Key identifying the corresponding Log event. \param sqllog_pk the Primary Key identifying the corresponding Log event.
\n expected to be exactely the same returned by the most recent call to ga iaInsertIntoSqlLog() \n expected to be exactely the same returned by the most recent call to ga iaInsertIntoSqlLog()
\param success expected to be TRUE if the SQL statement was succesfully ex ecuted. \param success expected to be TRUE if the SQL statement was succesfully ex ecuted.
\param errMsg expected to be the error message returned by SQLite on failu re, NULL on success. \param errMsg expected to be the error message returned by SQLite on failu re, NULL on success.
\sa gaiaInsertIntoSqlLog \sa gaiaInsertIntoSqlLog
\note this function completes an \i event inserted into the SQL Log, and \note this function completes an \b event inserted into the SQL Log, and
is expected to be invoked immediately \b after executing the SQL is expected to be invoked immediately \b after executing the SQL
statement itself. statement itself.
*/ */
GAIAAUX_DECLARE void gaiaUpdateSqlLog(sqlite3 *sqlite, sqlite3_int64 sq GAIAAUX_DECLARE void gaiaUpdateSqlLog (sqlite3 * sqlite,
llog_pk, int success, const char *errMsg); sqlite3_int64 sqllog_pk, int succ
ess,
const char *errMsg);
/**
Creates a persistent MD5 checksum object
\return the handle of an MD5 checksum object, or NULL on failure
\sa gaiaFreeMD5Checksum, gaiaUpdateMD5Checksum, gaiaFinalizeMD5Checksum
\note you must properly destroy the MD5 object
when it isn't any longer used.
*/
GAIAAUX_DECLARE void *gaiaCreateMD5Checksum (void);
/**
Destroys an MD5 checksum object
\param md5 the handle of the MD5 checksum object (returned by
a previous call to gaiaCreateMD5Checksum).
\sa gaiaCreateMD5Checksum
*/
GAIAAUX_DECLARE void gaiaFreeMD5Checksum (void *md5);
/**
Updates an MD5 checksum object
\param md5 the handle of the MD5 checksum object (returned by
a previous call to gaiaCreateMD5Checksum).
\param blob an arbitrary sequence of binary data
\param blob_size the length (in bytes) of the binary data
\sa gaiaCreateMD5Checksum, gaiaFreeMD5Checksum, gaiaFinalizeMD5Checksum
\note you can repeatedly invoke gaiaUpdateMD5Checksum more than a single
time and always using the same MD5 object.
In this case the final MD5 checksum returned by gaiaGetMD5Checsum will be
the total checksum for any data processed by the MD5 object since its
initialization.
*/
GAIAAUX_DECLARE void gaiaUpdateMD5Checksum (void *md5,
const unsigned char *blob,
int blob_len);
/**
Return an MD5 checksum value
\param md5 the handle of the MD5 checksum object (returned by
a previous call to gaiaCreateMD5Checksum).
\return an hexadecimal text string representing the MD checksum:
NULL on failure
\sa gaiaCreateMD5Checksum, gaiaUpdateMD5Checksum, gaiaFreeMD5Checksum
\note this function will return the MD5 checksum into a dynamically alloca
ted
buffer created by malloc().
You are required to explicitly free() any string returned by this function
.
\note gaiaFinalizeMD5Checksum will implicitly reset the MD5 object to its
initial state.
*/
GAIAAUX_DECLARE char *gaiaFinalizeMD5Checksum (void *md5);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GAIAAUX_H */ #endif /* _GAIAAUX_H */
 End of changes. 6 change blocks. 
8 lines changed or deleted 76 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 92 skipping to change at line 92
/** this BLOB does actually contain a ZIP compressed file */ /** this BLOB does actually contain a ZIP compressed file */
#define GAIA_ZIP_BLOB 6 #define GAIA_ZIP_BLOB 6
/** 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 */
#define GAIA_XML_BLOB 11
/* 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
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added


 gaiageo.h   gaiageo.h 
/* /*
gaiageo.h -- Gaia common support for geometries gaiageo.h -- Gaia common support for geometries
version 4.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Klaus Foerster klaus.foerster@svg.cc Klaus Foerster klaus.foerster@svg.cc
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
skipping to change at line 74 skipping to change at line 74
#define _GAIAGEO_H #define _GAIAGEO_H
#endif #endif
#include "gg_const.h" #include "gg_const.h"
#include "gg_structs.h" #include "gg_structs.h"
#include "gg_core.h" #include "gg_core.h"
#include "gg_mbr.h" #include "gg_mbr.h"
#include "gg_formats.h" #include "gg_formats.h"
#include "gg_dynamic.h" #include "gg_dynamic.h"
#include "gg_advanced.h" #include "gg_advanced.h"
#include "gg_xml.h"
#endif /* _GAIAGEO_H */ #endif /* _GAIAGEO_H */
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 66 skipping to change at line 66
\file gg_advanced.h \file gg_advanced.h
Geometry handling functions: advanced Geometry handling functions: advanced
*/ */
#ifndef _GG_ADVANCED_H #ifndef _GG_ADVANCED_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GG_ADVANCED_H #define _GG_ADVANCED_H
#endif #endif
/** Gaia-to-GEOS: all geometries */
#define GAIA2GEOS_ALL 0 #define GAIA2GEOS_ALL 0
/** Gaia-to-GEOS: only geometries of the Point type */
#define GAIA2GEOS_ONLY_POINTS 1 #define GAIA2GEOS_ONLY_POINTS 1
/** Gaia-to-GEOS: only geometries of the Linestring type */
#define GAIA2GEOS_ONLY_LINESTRINGS 2 #define GAIA2GEOS_ONLY_LINESTRINGS 2
/** Gaia-to-GEOS: only geometries of the Polygon type */
#define GAIA2GEOS_ONLY_POLYGONS 3 #define GAIA2GEOS_ONLY_POLYGONS 3
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifndef OMIT_PROJ /* including PROJ.4 */ #ifndef OMIT_PROJ /* including PROJ.4 */
#endif
/** /**
Converts and angle from Radians into Degrees Converts and angle from Radians into Degrees
\param rads the angle measured in Radians. \param rads the angle measured in Radians.
\return the angle measured in Degrees. \return the angle measured in Degrees.
\sa gaiaDegsToRads \sa gaiaDegsToRads
\remark \b PROJ.4 support required \remark \b PROJ.4 support required
skipping to change at line 130 skipping to change at line 139
char *proj_from, char *proj_from,
char *proj_to); 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, gaiaSetGeosErrorMsg, \sa gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg, gaiaGeosAuxErrorMsg,
gaiaSetGeosWarningMsg gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void gaiaResetGeosMsg (void); GAIAGEO_DECLARE void gaiaResetGeosMsg (void);
/** /**
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, gaiaSetGeosErrorMsg, \sa gaiaResetGeosMsg, gaiaGetGeosWarningMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosWarningMsg gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\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 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, gaiaSetGeosErrorMsg, \sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosAuxErrorMsg,
gaiaSetGeosWarningMsg gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\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 (auxiliary) error message (if any)
\return the latest GEOS (auxiliary) error message: an empty string if no
error was previoysly found.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE const char *gaiaGetGeosAuxErrorMsg (void);
/**
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 gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosWarningMsg gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosAuxErrorMsg
\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 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 gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaSetGeosErrorMsg gaiaGetGeosAuxErrorMsg, gaiaSetGeosErrorMsg, gaiaSetGeosAuxErrorMsg
\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 (auxiliary) error message
\param msg the error message to be set.
\sa gaiaResetGeosMsg, gaiaGetGeosErrorMsg, gaiaGetGeosWarningMsg,
gaiaGetGeosAuxErrorMsg, gaiaSetGeosWarningMsg, gaiaSetGeosErrorMsg
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void gaiaSetGeosAuxErrorMsg (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 gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM ,
gaiaToGeosSelective gaiaToGeosSelective
\note convenience method, simply defaulting to gaiaToGeos(geom, GAIA2GEOS_ ALL) \note convenience method, simply defaulting to gaiaToGeos(geom, GAIA2GEOS_ ALL)
skipping to change at line 319 skipping to change at line 353
\sa gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosedGeom \sa gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosedGeom
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
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 line 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 gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom);
/** /**
skipping to change at line 396 skipping to change at line 430
int perimeter, int perimeter,
double *length); 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 \sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeodesicArea
\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);
/** /**
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
skipping to change at line 431 skipping to change at line 465
/** /**
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 gaiaGeomCollDisjoint, gaiaGeomCollIntersects, gaiaGeomCollOverlaps,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedDisjoint
\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: Disjoint Spatial relationship evalution: Disjoint
\param geom1 the first Geometry object to be evaluated \param geom1 the first Geometry object to be evaluated
skipping to change at line 456 skipping to change at line 490
\sa gaiaGeomCollEquals, gaiaGeomCollIntersects, gaiaGeomCollOverlaps, \sa gaiaGeomCollEquals, gaiaGeomCollIntersects, gaiaGeomCollOverlaps,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate
\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 (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollDisjoint
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedDisjoint (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollOverlaps,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedIntersects
\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)
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollIntersects
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedIntersects (void *p_cache,
gaiaGeomCollPtr geom
1,
unsigned char *blob1
,
int size1,
gaiaGeomCollPtr geom
2,
unsigned char *blob2
,
int size2);
/** /**
Spatial relationship evalution: Overlaps Spatial relationship evalution: Overlaps
\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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedOverlaps
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2); gaiaGeomCollPtr geom2);
/** /**
Spatial relationship evalution: Overlaps (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollOverlaps
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedOverlaps (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollContains, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollCrosses
\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 (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollCrosses
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedCrosses (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollWithin,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollPreparedContains
\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 (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollContains
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedContains (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollTouches, gaiaGeomCollRelate gaiaGeomCollTouches, gaiaGeomCollRelate, gaiaGeomCollWithin
\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 (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollPrepared
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedWithin (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollRelate gaiaGeomCollWithin, gaiaGeomCollRelate, gaiaGeomCollPreparedTouches
\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 (GEOSPreparedGeometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 the first Geometry object to be evaluated
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 the second Geometry object to be evaluated
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false: any other value if true
\sa gaiaGeomCollTouches
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedTouches (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
int size2);
/**
Spatial relationship evalution: Relate Spatial relationship evalution: Relate
\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 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects,
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
skipping to change at line 1111 skipping to change at line 1319
\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 gaiaGeomCollCoveredBy
\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 (GEOSPreparedGeometr
y)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object.
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 pointer to second input Geometry object.
\param blob2 the BLOB corresponding to the second Geometry
\param size2 the size (in bytes) of the second BLOB
\return 0 if false; any other value if geom1 \e spatially \e covers geom2.
\sa gaiaGeomCollCovers
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedCovers (void *p_cache,
gaiaGeomCollPtr geom1,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2,
unsigned char *blob2,
int size2);
/**
Topology check: test if a Geometry is covered by another one 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 gaiaGeomCollCovers
\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 (GEOSPrepared
Geometry)
\param p_cache a memory pointer returned by spatialite_alloc_connection()
\param geom1 pointer to first input Geometry object.
\param blob1 the BLOB corresponding to the first Geometry
\param size1 the size (in bytes) of the first BLOB
\param geom2 pointer to second input Geometry object.
\param blob2 the BLOB corresponding to the second Geometry
\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
geom1.
\sa gaiaGeomCollCovers
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollPreparedCoveredBy (void *p_cache,
gaiaGeomCollPtr geom1
,
unsigned char *blob1,
int size1,
gaiaGeomCollPtr geom2
,
unsigned char *blob2,
int size2);
/**
Utility function: SquareGrid Utility function: SquareGrid
\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 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.
skipping to change at line 1263 skipping to change at line 1522
double extra_frame_s ize, double extra_frame_s ize,
double tolerance, double tolerance,
int only_edges); 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_hows 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 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.
skipping to change at line 1296 skipping to change at line 1555
double tolerance, double tolerance,
int allow_holes); 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
\sa gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE void gaiaResetLwGeomMsg (void);
/**
Return the latest LWGEOM error message (if any)
\return the latest LWGEOM error message: an empty string if no error was
previoysly found.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE const char *gaiaGetLwGeomErrorMsg (void);
/**
Return the latest LWGEOM warning message (if any)
\return the latest LWGEOM warning message: an empty string if no warning w
as
previoysly found.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaSetLwGeomErrorMsg,
gaiaSetLwGeomWarningMsg
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE const char *gaiaGetLwGeomWarningMsg (void);
/**
Set the current LWGEOM error message
\param msg the error message to be set.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
gaiaSetLwGeomWarningMsg
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg (const char *msg);
/**
Set the current LWGEOM warning message
\param msg the warning message to be set.
\sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
gaiaSetLwGeomErrorMsg
\remark \b LWGEOM support required.
*/
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.
\n this function will attempt to create a valid representation of a given \n this function will attempt to create a valid representation of a given
invalid geometry without loosing any of the input vertices. invalid geometry without loosing any of the input vertices.
\n Already-valid geometries are returned without further intervention. \n Already-valid geometries are returned without further intervention.
\n NULL will be returned if the passed argument is invalid. \n NULL will be returned if the passed argument is invalid.
skipping to change at line 1362 skipping to change at line 1681
this including any Geometry returned by gaiaSegmentize() this including any Geometry returned by gaiaSegmentize()
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (gaiaGeomCollPtr geom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (gaiaGeomCollPtr geom,
double dist); double dist);
/** /**
Utility function: Azimuth Utility function: Azimuth
\param xa the X ccordinate of PointA. \param xa the X coordinate of PointA.
\param ya the Y coordinate of PointA. \param ya the Y coordinate of PointA.
\param xb the X ccordinate of PointB. \param xb the X ccordinate of PointB.
\param yb the Y coordinate of PointB. \param yb the Y coordinate of PointB.
\param azimuth on completion this variable will contain the angle in radia ns from \param azimuth on completion this variable will contain the angle in radia ns from
the horizontal of the vector defined by pointA and pointB. the horizontal of the vector defined by pointA and pointB.
\n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2 ; 6=PI; 9=3PI/2. \n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2 ; 6=PI; 9=3PI/2.
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaProjectedPoint
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE int gaiaAzimuth (double xa, double ya, double xb, GAIAGEO_DECLARE int gaiaAzimuth (double xa, double ya, double xb,
double yb, double *azimuth); double yb, double *azimuth);
/** /**
Utility function: EllipsoidAzimuth
\param xa the X coordinate of PointA.
\param ya the Y coordinate of PointA.
\param xb the X ccordinate of PointB.
\param yb the Y coordinate of PointB.
\param a major axis of the reference spheroid.
\param b minor axis of the reference spheroid.
\param azimuth on completion this variable will contain the angle in radia
ns from
the horizontal of the vector defined by pointA and pointB.
\n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2
; 6=PI; 9=3PI/2.
\return 0 on failure: any other value on success
\sa gaiaAzimuth
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaiaEllipsoidAzimuth (double xa, double ya, double
xb,
double yb, double a, double b,
double *azimuth);
/**
Utility function: ProjectedPoint
\param x1 the X coordinate of the Start Point.
\param y1 the Y coordinate of the Start Point.
\param a major axis of the reference spheroid.
\param b minor axis of the reference spheroid.
\param distance a distance expressed in Meters
\param azimuth (aka bearing aka heading) expressed in radians;
on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
\param x2 on completion this variable will contain the the X coordinate
of the Projected Point.
\param y2 on completion this variable will contain the the Y coordinate
of the Projected Point.
\return 0 on failure: any other value on success
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaiaProjectedPoint (double x1, double y1, double a,
double b, double distance,
double azimuth, double *x2,
double *y2);
/**
Utility function: GeoHash Utility function: GeoHash
\param geom the input geometry. \param geom the input geometry.
\param precision the expected precision: if <= 0 will be automatically det ermined. \param precision the expected precision: if <= 0 will be automatically det ermined.
\return NULL on failure: a null-terminated text string on success \return NULL on failure: a null-terminated text string on success
\note you are responsible to free (before or after) any text string return ed \note you are responsible to free (before or after) any text string return ed
by gaiaGeoHash() by gaiaGeoHash()
skipping to change at line 1410 skipping to change at line 1778
\return NULL on failure: a null-terminated text string on success \return NULL on failure: a null-terminated text string on success
\note you are responsible to free (before or after) any text string return ed \note you are responsible to free (before or after) any text string return ed
by gaiaAsX3D() by gaiaAsX3D()
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE char *gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs, GAIAGEO_DECLARE char *gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs,
int precision, int options, int precision, int options,
const char *defid); const char *refid);
/** /**
Calculates the minimum 3D distance intercurring between two Geometry objec ts Calculates the minimum 3D distance intercurring between two Geometry objec ts
\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.
skipping to change at line 1531 skipping to change at line 1899
this including any Geometry returned by gaiaSplitRight() this including any Geometry returned by gaiaSplitRight()
\note gaiaSplitLeft will only return the \b right split half; NULL may be eventually \note gaiaSplitLeft will only return the \b right split half; NULL may be eventually
returned if empty. returned if empty.
\remark \b LWGEOM support required. \remark \b LWGEOM support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (gaiaGeomCollPtr input, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (gaiaGeomCollPtr input,
gaiaGeomCollPtr blade); gaiaGeomCollPtr blade);
/**
Measures the total Area for a Geometry object (geodesic)
\param geom pointer to Geometry object
\param a major axis of the reference spheroid.
\param b minor axis of the reference spheroid.
\param use_ellipsoid if TRUE will measure the Area on the Ellipsoid,
otherwise on the Sphere
\param area on completion this variable will contain the measured area
\return 0 on failure: any other value on success
\sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaiaGeodesicArea (gaiaGeomCollPtr geom, double a,
double b, int use_ellipsoid,
double *area);
#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 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 origin_z the Z ccordinate identifying the Grid Origin.
\param origin_m the M coordinate identifiying the Grid Origin.
\param size_x Grid cell size (X axis). \param size_x Grid cell size (X axis).
\param size_y Grid cell size (Y axis). \param size_y Grid cell size (Y axis).
\param size_z Grid cell size (Z axis). \param size_z Grid cell size (Z axis).
\param size_m Grid cell size (M axis). \param size_m Grid cell size (M axis).
\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 return a modified geometry having all points snapped to a regular Grid \n this function will return a modified geometry having all points snapped to a regular Grid
defined by its origin and cell size. defined by its origin and cell size.
\n Consecutive points falling on the same cell will be removed, eventually returning NULL if \n Consecutive points falling on the same cell will be removed, eventually returning NULL if
\n output points are not enough to define a geometry of the given type. \n output points are not enough to define a geometry of the given type.
 End of changes. 43 change blocks. 
22 lines changed or deleted 426 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Klaus Foerster klaus.foerster@svg.cc Klaus Foerster klaus.foerster@svg.cc
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
skipping to change at line 154 skipping to change at line 154
/** BLOB-Geometry CLASS: LINESTRING */ /** BLOB-Geometry CLASS: LINESTRING */
#define GAIA_LINESTRING 2 #define GAIA_LINESTRING 2
/** BLOB-Geometry CLASS: POLYGON */ /** BLOB-Geometry CLASS: POLYGON */
#define GAIA_POLYGON 3 #define GAIA_POLYGON 3
/** BLOB-Geometry CLASS: MULTIPOINT */ /** BLOB-Geometry CLASS: MULTIPOINT */
#define GAIA_MULTIPOINT 4 #define GAIA_MULTIPOINT 4
/** BLOB-Geometry CLASS: MULTILINESTRING */ /** BLOB-Geometry CLASS: MULTILINESTRING */
#define GAIA_MULTILINESTRING 5 #define GAIA_MULTILINESTRING 5
/** BLOB-Geometry CLASS: MULTIPOLYGON */ /** BLOB-Geometry CLASS: MULTIPOLYGON */
#define GAIA_MULTIPOLYGON 6 #define GAIA_MULTIPOLYGON 6
#define GAIA_MULTIPOLYGON 6
/** BLOB-Geometry CLASS: GEOMETRYCOLLECTION */ /** BLOB-Geometry CLASS: GEOMETRYCOLLECTION */
#define GAIA_GEOMETRYCOLLECTION 7 #define GAIA_GEOMETRYCOLLECTION 7
/** BLOB-Geometry CLASS: POINT Z */ /** BLOB-Geometry CLASS: POINT Z */
#define GAIA_POINTZ 1001 #define GAIA_POINTZ 1001
/** BLOB-Geometry CLASS: LINESTRING Z */ /** BLOB-Geometry CLASS: LINESTRING Z */
#define GAIA_LINESTRINGZ 1002 #define GAIA_LINESTRINGZ 1002
/** BLOB-Geometry CLASS: POLYGON Z */ /** BLOB-Geometry CLASS: POLYGON Z */
#define GAIA_POLYGONZ 1003 #define GAIA_POLYGONZ 1003
/** BLOB-Geometry CLASS: MULTIPOINT Z */ /** BLOB-Geometry CLASS: MULTIPOINT Z */
#define GAIA_MULTIPOINTZ 1004 #define GAIA_MULTIPOINTZ 1004
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 1550 skipping to change at line 1550
the International Date Line. the International Date Line.
*/ */
GAIAGEO_DECLARE void gaiaShiftLongitude (gaiaGeomCollPtr geom); GAIAGEO_DECLARE void gaiaShiftLongitude (gaiaGeomCollPtr geom);
/** /**
Shifts any coordinate to within the "normal range" of longitude and Shifts any coordinate to within the "normal range" of longitude and
latitude values (-180.0 to 180.0 longitude and -90.0 to 90.0 latitude). latitude values (-180.0 to 180.0 longitude and -90.0 to 90.0 latitude).
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\param shift_x X axis shift factor.
\param shift_y Y axis shift factor.
\sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords, \sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords,
gaiaShiftCoords3D, gaiaShiftLongitude gaiaShiftCoords3D, gaiaShiftLongitude
*/ */
GAIAGEO_DECLARE void gaiaNormalizeLonLat (gaiaGeomCollPtr geom); GAIAGEO_DECLARE void gaiaNormalizeLonLat (gaiaGeomCollPtr geom);
/** /**
Scales any coordinate within a Geometry object Scales any coordinate within a Geometry object
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
skipping to change at line 1773 skipping to change at line 1771
measure. measure.
\note supported Measu Units are: GAIA_KM, GAIA_M, GAIA_DM, GAIA_CM, GAIA_M M, \note supported Measu Units are: GAIA_KM, GAIA_M, GAIA_DM, GAIA_CM, GAIA_M M,
GAIA_KMI, GAIA_IN, GAIA_FT, GAIA_YD, GAIA_MI, GAIA_FATH, GAIC_CH, GAIA_LIN K, GAIA_KMI, GAIA_IN, GAIA_FT, GAIA_YD, GAIA_MI, GAIA_FATH, GAIC_CH, GAIA_LIN K,
GAIA_US_IN, GAIA_US_FT, GAIA_US_YD, GAIA_US_CH, GAIA_US_MI, GAIA_IND_YD, GAIA_US_IN, GAIA_US_FT, GAIA_US_YD, GAIA_US_CH, GAIA_US_MI, GAIA_IND_YD,
GAIA_IND_FT, GAIA_IND_CH GAIA_IND_FT, GAIA_IND_CH
*/ */
GAIAGEO_DECLARE int gaiaConvertLength (double value, int unit_from, GAIAGEO_DECLARE int gaiaConvertLength (double value, int unit_from,
int unit_to, double *cvt); int unit_to, double *cvt);
/**
Creates a Circle (Linestring) Geometry
\param center_x center point X coordinate.
\param center_y center point Y coordinate.
\param radius the circle's radius.
\param step angular distance (in degrees) between points on the circumfere
nce.
\sa gaiaMakeArc, gaiaMakeEllipse, gaiaMakeEllipticArc
\note simply a convenience method defaulting to gaiaMakeEllipse
with both axes set to radius value
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeCircle (double center_x,
double center_y,
double radius, double st
ep);
/**
Creates an Ellipse (Linestring) Geometry
\param center_x center point X coordinate.
\param center_y center point Y coordinate.
\param x_axis the ellipses's X axis.
\param y_axis the ellipses's Y axis.
\param step angular distance (in degrees) between points on the ellipse.
\sa gaiaMakeEllipticArc, gaiaMakeCircle, gaiaMakeArc
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeEllipse (double center_x,
double center_y,
double x_axis,
double y_axis,
double step);
/**
Creates a Circular Arc (Linestring) Geometry
\param center_x center point X coordinate.
\param center_y center point Y coordinate.
\param radius the circle's radius.
\param start the start angle (in degrees).
\param start the stop angle (in degrees).
\param step angular distance (in degrees) between points on the circumfere
nce.
\sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc
\note simply a convenience method defaulting to gaiaMakeEllipticArc
with both axes set to radius value
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeArc (double center_x,
double center_y, double rad
ius,
double start, double stop,
double step);
/**
Creates an Elliptic Arc (Linestring) Geometry
\param center_x center point X coordinate.
\param center_y center point Y coordinate.
\param x_axis the ellipses's X axis.
\param y_axis the ellipses's Y axis.
\param start the start angle (in degrees).
\param start the stop angle (in degrees).
\param step angular distance (in degrees) between points on the ellipse.
\sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeEllipticArc (double center_x,
double center_y,
double x_axis,
double y_axis,
double start,
double stop,
double step);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GG_CORE_H */ #endif /* _GG_CORE_H */
 End of changes. 4 change blocks. 
4 lines changed or deleted 81 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Klaus Foerster klaus.foerster@svg.cc Klaus Foerster klaus.foerster@svg.cc
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
skipping to change at line 109 skipping to change at line 109
\sa gaiaEndianArch, gaiaExport32 \sa gaiaEndianArch, gaiaExport32
\note you are expected to pass an input buffer corresponding to an \note you are expected to pass an input buffer corresponding to an
allocation size of (at least) 4 bytes. allocation size of (at least) 4 bytes.
*/ */
GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_en dian, GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_en dian,
int little_endian_arch); int little_endian_arch);
/** /**
Import an UINT-32 value in endian-aware fashion
\param p endian-dependent representation (input buffer).
\param little_endian 0 if the input buffer is big-endian: any other value
for little-endian.
\param little_endian_arch the value returned by gaiaEndianArch()
\return the internal UINT value
\sa gaiaEndianArch, gaiaExportU32
\note you are expected to pass an input buffer corresponding to an
allocation size of (at least) 4 bytes.
*/
GAIAGEO_DECLARE unsigned int gaiaImportU32 (const unsigned char *p,
int little_endian,
int little_endian_arch);
/**
Import a FLOAT-32 value in endian-aware fashion Import a FLOAT-32 value in endian-aware fashion
\param p endian-dependent representation (input buffer). \param p endian-dependent representation (input buffer).
\param little_endian 0 if the input buffer is big-endian: any other value \param little_endian 0 if the input buffer is big-endian: any other value
for little-endian. for little-endian.
\param little_endian_arch the value returned by gaiaEndianArch() \param little_endian_arch the value returned by gaiaEndianArch()
\return the internal FLOAT value \return the internal FLOAT value
\sa gaiaEndianArch, gaiaExportF32 \sa gaiaEndianArch, gaiaExportF32
skipping to change at line 202 skipping to change at line 221
\sa gaiaEndianArch, gaiaImport32 \sa gaiaEndianArch, gaiaImport32
\note you are expected to pass an output buffer corresponding to an \note you are expected to pass an output buffer corresponding to an
allocation size of (at least) 4 bytes. allocation size of (at least) 4 bytes.
*/ */
GAIAGEO_DECLARE void gaiaExport32 (unsigned char *p, int value, GAIAGEO_DECLARE void gaiaExport32 (unsigned char *p, int value,
int little_endian, int little_endian,
int little_endian_arch); int little_endian_arch);
/** /**
Export an UINT-32 value in endian-aware fashion
\param p endian-dependent representation (output buffer).
\param value the internal value to be exported.
\param little_endian 0 if the output buffer has to be big-endian: any othe
r value
for little-endian.
\param little_endian_arch the value returned by gaiaEndianArch()
\sa gaiaEndianArch, gaiaImportU32
\note you are expected to pass an output buffer corresponding to an
allocation size of (at least) 4 bytes.
*/
GAIAGEO_DECLARE void gaiaExportU32 (unsigned char *p, unsigned int valu
e,
int little_endian,
int little_endian_arch);
/**
Export a FLOAT-32 value in endian-aware fashion Export a FLOAT-32 value in endian-aware fashion
\param p endian-dependent representation (output buffer). \param p endian-dependent representation (output buffer).
\param value the internal value to be exported. \param value the internal value to be exported.
\param little_endian 0 if the output buffer has to be big-endian: any othe r value \param little_endian 0 if the output buffer has to be big-endian: any othe r value
for little-endian. for little-endian.
\param little_endian_arch the value returned by gaiaEndianArch() \param little_endian_arch the value returned by gaiaEndianArch()
\sa gaiaEndianArch, gaiaImportF32 \sa gaiaEndianArch, gaiaImportF32
skipping to change at line 571 skipping to change at line 608
/** /**
Attempts to decode a Point from within an EWKB binary buffer Attempts to decode a Point from within an EWKB binary buffer
\param geom pointer to an existing Geometry object; if succesfull the pars ed Point \param geom pointer to an existing Geometry object; if succesfull the pars ed Point
will be inserted into this Geometry will be inserted into this Geometry
\param blob pointer to EWKB input buffer \param blob pointer to EWKB input buffer
\param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start. \param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start.
\param blob_size lenght (in bytes) of the input buffer. \param blob_size lenght (in bytes) of the input buffer.
\param endian (boolean) states if the EWKB input buffer is little- or big- endian encode. \param endian (boolean) states if the EWKB input buffer is little- or big- endian encode.
\param endiam_arch (boolean) states if the target CPU has a little- or big -endian architecture. \param endian_arch (boolean) states if the target CPU has a little- or big -endian architecture.
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M
\return -1 on failure; otherwise the offset where the next object starts. \return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetLinestring, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry \sa gaiaEwkbGetLinestring, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
\note these functions are mainly intended for internal usage. \note these functions are mainly intended for internal usage.
*/ */
GAIAGEO_DECLARE int GAIAGEO_DECLARE int
gaiaEwkbGetPoint (gaiaGeomCollPtr geom, unsigned char *blob, gaiaEwkbGetPoint (gaiaGeomCollPtr geom, unsigned char *blob,
skipping to change at line 594 skipping to change at line 631
/** /**
Attempts to decode a Point from within an EWKB binary buffer Attempts to decode a Point from within an EWKB binary buffer
\param geom pointer to an existing Geometry object; if succesfull the pars ed Linestring \param geom pointer to an existing Geometry object; if succesfull the pars ed Linestring
will be inserted into this Geometry will be inserted into this Geometry
\param blob pointer to EWKB input buffer \param blob pointer to EWKB input buffer
\param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start. \param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start.
\param blob_size lenght (in bytes) of the input buffer. \param blob_size lenght (in bytes) of the input buffer.
\param endian (boolean) states if the EWKB input buffer is little- or big- endian encode. \param endian (boolean) states if the EWKB input buffer is little- or big- endian encode.
\param endiam_arch (boolean) states if the target CPU has a little- or big -endian architecture. \param endian_arch (boolean) states if the target CPU has a little- or big -endian architecture.
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M
\return -1 on failure; otherwise the offset where the next object starts. \return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry \sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
\note these functions are mainly intended for internal usage. \note these functions are mainly intended for internal usage.
*/ */
GAIAGEO_DECLARE int GAIAGEO_DECLARE int
gaiaEwkbGetLinestring (gaiaGeomCollPtr geom, unsigned char *blob, gaiaEwkbGetLinestring (gaiaGeomCollPtr geom, unsigned char *blob,
skipping to change at line 617 skipping to change at line 654
/** /**
Attempts to decode a Polygon from within an EWKB binary buffer Attempts to decode a Polygon from within an EWKB binary buffer
\param geom pointer to an existing Geometry object; if succesfull the pars ed Polygon \param geom pointer to an existing Geometry object; if succesfull the pars ed Polygon
will be inserted into this Geometry will be inserted into this Geometry
\param blob pointer to EWKB input buffer \param blob pointer to EWKB input buffer
\param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start. \param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start.
\param blob_size lenght (in bytes) of the input buffer. \param blob_size lenght (in bytes) of the input buffer.
\param endian (boolean) states if the EWKB input buffer is little- or big- endian encode. \param endian (boolean) states if the EWKB input buffer is little- or big- endian encode.
\param endiam_arch (boolean) states if the target CPU has a little- or big -endian architecture. \param endian_arch (boolean) states if the target CPU has a little- or big -endian architecture.
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M
\return -1 on failure; otherwise the offset where the next object starts. \return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry \sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
*/ */
GAIAGEO_DECLARE int GAIAGEO_DECLARE int
gaiaEwkbGetPolygon (gaiaGeomCollPtr geom, unsigned char *blob, gaiaEwkbGetPolygon (gaiaGeomCollPtr geom, unsigned char *blob,
int offset, int blob_size, int endian, int offset, int blob_size, int endian,
int endian_arch, int dims); int endian_arch, int dims);
/** /**
Attempts to decode a MultiGeometry from within an EWKB binary buffer Attempts to decode a MultiGeometry from within an EWKB binary buffer
\param geom pointer to an existing Geometry object; if succesfull the pars ed MultiGeometry \param geom pointer to an existing Geometry object; if succesfull the pars ed MultiGeometry
will be inserted into this Geometry will be inserted into this Geometry
\param blob pointer to EWKB input buffer \param blob pointer to EWKB input buffer
\param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start. \param offset the offset (in bytes) on the input buffer where the Point de finition is expected to start.
\param blob_size lenght (in bytes) of the input buffer. \param blob_size lenght (in bytes) of the input buffer.
\param endian (boolean) states if the EWKB input buffer is little- or big- endian encode. \param endian (boolean) states if the EWKB input buffer is little- or big- endian encode.
\param endiam_arch (boolean) states if the target CPU has a little- or big -endian architecture. \param endian_arch (boolean) states if the target CPU has a little- or big -endian architecture.
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_Z_ M
\return -1 on failure; otherwise the offset where the next object starts. \return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetLinestring, gaiaEwkbGetPolygon \sa gaiaEwkbGetPoint, gaiaEwkbGetLinestring, gaiaEwkbGetPolygon
\note these functions are mainly intended for internal usage. \note these functions are mainly intended for internal usage.
*/ */
GAIAGEO_DECLARE int GAIAGEO_DECLARE int
gaiaEwkbGetMultiGeometry (gaiaGeomCollPtr geom, unsigned char *blob, gaiaEwkbGetMultiGeometry (gaiaGeomCollPtr geom, unsigned char *blob,
 End of changes. 8 change blocks. 
6 lines changed or deleted 45 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 309 skipping to change at line 309
Typedef for variant (multi-type) value structure Typedef for variant (multi-type) value structure
*/ */
typedef gaiaValue *gaiaValuePtr; typedef gaiaValue *gaiaValuePtr;
/** /**
Container for DBF field Container for DBF field
*/ */
typedef struct gaiaDbfFieldStruct typedef struct gaiaDbfFieldStruct
{ {
/* a DBF field definition - shapefile attribute */ /* a DBF field definition - shapefile attribute */
/** field name [max. 10 char] */ /** field name */
char *Name; /* field name */ char *Name; /* field name */
/** DBF data type */ /** DBF data type */
unsigned char Type; /* field type */ unsigned char Type; /* field type */
/** DBF buffer offset [where the field value starts] */ /** DBF buffer offset [where the field value starts] */
int Offset; /* buffer offset [this field begins at *buff er+offset* and extends for *length* bytes */ int Offset; /* buffer offset [this field begins at *buff er+offset* and extends for *length* bytes */
/** total DBF buffer field length (in bytes) */ /** total DBF buffer field length (in bytes) */
unsigned char Length; /* field total length [in bytes] */ unsigned char Length; /* field total length [in bytes] */
/** precision (decimal digits) */ /** precision (decimal digits) */
unsigned char Decimals; /* decimal positions */ unsigned char Decimals; /* decimal positions */
/** current variant [multi-type] value */ /** current variant [multi-type] value */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 spatialite.h   spatialite.h 
/* /*
spatialite.h -- Gaia spatial support for SQLite spatialite.h -- Gaia spatial support for SQLite
version 4.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008-2012 Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
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
skipping to change at line 80 skipping to change at line 80
#endif #endif
#include <spatialite/gaiageo.h> #include <spatialite/gaiageo.h>
/** /**
Return the current library version. Return the current library version.
*/ */
SPATIALITE_DECLARE const char *spatialite_version (void); SPATIALITE_DECLARE const char *spatialite_version (void);
/** /**
Initializes the internal memory block supporting each connection
\sa spatialite_init_ex, spatialite_cleanup_ex
*/
SPATIALITE_DECLARE void *spatialite_alloc_connection (void);
/**
Initializes the library. Initializes the library.
This function is now \b DEPRECATED because is not reentrant (not thread sa
fe);
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
\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.
\param db_handle handle to the current SQLite connection
\param ptr a memory pointer returned by spatialite_alloc_connection()
\param verbose if TRUE a short start-up message is shown on stderr
\sa spatialite_alloc_connection, spatialite_cleanup_ex, spatialite_init
\note You absolutely must invoke this function before attempting to perfor
m
any other SpatiaLite's call.
*/
SPATIALITE_DECLARE void spatialite_init_ex (sqlite3 * db_handle, void *
ptr,
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 spatialite
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
This function performs general cleanup, essentially undoing the effect
of spatialite_init_ex().
\param ptr the same memory pointer passed to the corresponding call to
spatialite_init_ex() and returned by spatialite_alloc_connection()
\sa spatialite_init_ex, spatialite_alloc_connection
*/
SPATIALITE_DECLARE void spatialite_cleanup_ex (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
\param verbose if TRUE a short report is shown on stderr \param verbose if TRUE a short report is shown on stderr
\param rows on completion will contain the total number of actually export ed rows \param rows on completion will contain the total number of actually export ed rows
skipping to change at line 476 skipping to change at line 520
- 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.
\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);
/** /**
Queries the Metadata tables returning the Layer Full Extent
\param handle SQLite handle to current DB connection.
\param table VectorLayer Table (or View, or VirtualShape).
\param geometry Geometry Column name.
\param mode if TRUE a PESSIMISTIC statistics update will be implied,
otherwise OPTIMISTIC.
\return the pointer to the newly created Geometry (Envelope): NULL on fail
ure
\note you are responsible to destroy (before or after) any allocated
Geometry returned by gaiaGetLayerExtent().
\n The geometry arg is optional when the table simply has a single Geometr
y Column,
and can be NULL in this case.
\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).
\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).
\n If the named Layer doesn't exist, or if it's completely empty (not cont
aining
any valid Geometry) NULL will be returned.
*/
SPATIALITE_DECLARE gaiaGeomCollPtr gaiaGetLayerExtent (sqlite3 * handle
,
const char *table
,
const char *geome
try,
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_LOOSE or GAIA_VECTORS_LIST_STRICT.
\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
skipping to change at line 497 skipping to change at line 568
\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_FAST (default) then the r eturned 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_PRECISE a preliminary attem pt 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 SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList (sql
ite3 * ite3
handle, *
const char *table, const char *geometry, int mode); hand
le,
cons
t
char
*tab
le,
cons
t
char
*geo
metry,
int
mode
);
/** /**
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 SPATIALITE_DECLARE void gaiaFreeVectorLayersList (gaiaVectorLayersListP
tr ptr); tr
ptr);
/** /**
Drops a layer-table, removing any related dependency Drops a layer-table, removing any related dependency
\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
*/ */
SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *tab le); SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *tab le);
/**
Checks a Geometry Column for validity
\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
\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()
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int check_geometry_column (sqlite3 * sqlite,
const char *table,
const char *geom,
const char *report_path,
int *n_rows, int *n_invali
ds,
char **err_msg);
/**
Checks all Geometry Columns for validity
\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
\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()
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int check_all_geometry_columns (sqlite3 * sqlite,
const char *output_di
r,
int *n_invalids,
char **err_msg);
/**
Sanitizes a Geometry Column making all invalid geometries to be valid
\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
\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()
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int sanitize_geometry_column (sqlite3 * sqlite,
const char *table,
const char *geom,
const char *tmp_table,
const char *report_path
,
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
\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
\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()
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int sanitize_all_geometry_columns (sqlite3 * sqlite,
const char
*tmp_prefix,
const char
*output_dir,
int *not_repaired,
char **err_msg);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SPATIALITE_H */ #endif /* _SPATIALITE_H */
 End of changes. 12 change blocks. 
8 lines changed or deleted 245 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.0, 2012 August 6 version 4.1, 2013 May 8
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 26 skipping to change at line 26
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 the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2012 Portions created by the Initial Developer are Copyright (C) 2013
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com> Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
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
skipping to change at line 49 skipping to change at line 49
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.
*/ */
#ifndef _SPATIALITE_SQLITE_H #ifndef _SPATIALITE_SQLITE_H
#define _SPATIALITE_SQLITE_H #define _SPATIALITE_SQLITE_H
#ifdef LOADABLE_EXTENSION /* loadable-extension only */
#ifdef SPL_AMALGAMATION /* spatialite-amalgamation */ #ifdef SPL_AMALGAMATION /* spatialite-amalgamation */
#include <spatialite/sqlite3ext.h> #include <spatialite/sqlite3ext.h>
#else #else
#include <sqlite3ext.h> #include <sqlite3ext.h>
#endif
/* We can't use SQLITE_EXTENSION_INIT1 as this is an intializer in recent /* We can't use SQLITE_EXTENSION_INIT1 as this is an intializer in recent v
version of sqlite */ ersion of sqlite */
extern const sqlite3_api_routines *sqlite3_api; extern const sqlite3_api_routines *sqlite3_api;
#else /* ordinary lib */
#ifdef SPL_AMALGAMATION /* spatialite-amalgamation */
#include <spatialite/sqlite3.h>
#else
#include <sqlite3.h>
#endif
#endif #endif
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 12 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/