gaiaaux.h   gaiaaux.h 
/* /*
gaiaaux.h -- Gaia common utility functions gaiaaux.h -- Gaia common utility functions
version 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 74 skipping to change at line 74
extern "C" extern "C"
{ {
#endif #endif
/* constants */ /* constants */
/** SQL single quoted string (text constant) */ /** SQL single quoted string (text constant) */
#define GAIA_SQL_SINGLE_QUOTE 1001 #define GAIA_SQL_SINGLE_QUOTE 1001
/** SQL double quoted string (SQL name) */ /** SQL double quoted string (SQL name) */
#define GAIA_SQL_DOUBLE_QUOTE 1002 #define GAIA_SQL_DOUBLE_QUOTE 1002
/* function prototipes */ /* function prototypes */
/** /**
Retrieves the Locale Charset Retrieves the Locale Charset
\return the GNU ICONV name identifying the locale charset \return the GNU ICONV name identifying the locale charset
*/ */
GAIAAUX_DECLARE const char *gaiaGetLocaleCharset (void); GAIAAUX_DECLARE const char *gaiaGetLocaleCharset (void);
/** /**
Converts a text string from one charset to another Converts a text string from one charset to another
skipping to change at line 183 skipping to change at line 183
*/ */
GAIAAUX_DECLARE int gaiaIllegalSqlName (const char *name); GAIAAUX_DECLARE int gaiaIllegalSqlName (const char *name);
/** /**
Properly formats an SQL text constant Properly formats an SQL text constant
\param value the text string to be formatted \param value the text string to be formatted
\return the formatted string: NULL on failure \return the formatted string: NULL on failure
\sa gaiaQuotedSql \sa gaiaQuotedSql, gaiaDequotedSql
\note this function simply is a convenience method corresponding to: \note this function simply is a convenience method corresponding to:
gaiaQuotedSQL(value, GAIA_SQL_SINGLE_QUOTE); gaiaQuotedSQL(value, GAIA_SQL_SINGLE_QUOTE);
\remark passing a string like "Sant'Andrea" will return 'Sant''Andrea' \remark passing a string like "Sant'Andrea" will return 'Sant''Andrea'
*/ */
GAIAAUX_DECLARE char *gaiaSingleQuotedSql (const char *value); GAIAAUX_DECLARE char *gaiaSingleQuotedSql (const char *value);
/** /**
Properly formats an SQL name Properly formats an SQL name
\param value the SQL name to be formatted \param value the SQL name to be formatted
\return the formatted string: NULL on failure \return the formatted string: NULL on failure
\sa gaiaQuotedSql \sa gaiaQuotedSql, gaiaDequotedSql
\note this function simply is a convenience method corresponding to: \note this function simply is a convenience method corresponding to:
gaiaQuotedSQL(value, GAIA_SQL_DOUBLE_QUOTE); gaiaQuotedSQL(value, GAIA_SQL_DOUBLE_QUOTE);
\remark passing a string like "Sant\"Andrea" will return "Sant""Andrea" \remark passing a string like "Sant\"Andrea" will return "Sant""Andrea"
*/ */
GAIAAUX_DECLARE char *gaiaDoubleQuotedSql (const char *value); GAIAAUX_DECLARE char *gaiaDoubleQuotedSql (const char *value);
/** /**
Properly formats an SQL generic string Properly formats an SQL generic string
\param value the string to be formatted \param value the string to be formatted
\param quote GAIA_SQL_SINGLE_QUOTE or GAIA_SQL_DOUBLE_QUOTE \param quote GAIA_SQL_SINGLE_QUOTE or GAIA_SQL_DOUBLE_QUOTE
\return the formatted string: NULL on failure \return the formatted string: NULL on failure
\sa gaiaSingleQuotedSql, gaiaDoubleQuotedSql \sa gaiaSingleQuotedSql, gaiaDoubleQuotedSql, gaiaDequotedSql
\note this function can safely handle strings of arbitrary length, \note this function can safely handle strings of arbitrary length,
and will return the formatted string into a dynamically allocated buffer and will return the formatted string into a dynamically allocated buffer
created by malloc(). created by malloc().
You are required to explicitly free() any string returned by this function . You are required to explicitly free() any string returned by this function .
*/ */
GAIAAUX_DECLARE char *gaiaQuotedSql (const char *value, int quote); GAIAAUX_DECLARE char *gaiaQuotedSql (const char *value, int quote);
/**
Properly formats an SQL generic string (dequoting)
\param value the string to be dequoted
\return the formatted string: NULL on failure
\sa gaiaSingleQuotedSql, gaiaDoubleQuotedSql, gaiaQuotedSql
\note this function can safely handle strings of arbitrary length,
and will return the formatted string into a dynamically allocated buffer
created by malloc().
You are required to explicitly free() any string returned by this function
.
*/
GAIAAUX_DECLARE char *gaiaDequotedSql (const char *value);
/* /*
/ DEPRECATED FUNCTION: gaiaCleanSqlString() / DEPRECATED FUNCTION: gaiaCleanSqlString()
/ this function must not be used for any new project / this function must not be used for any new project
/ it's still maintained for backward compatibility, / it's still maintained for backward compatibility,
/ but will be probably removed in future versions / but will be probably removed in future versions
*/ */
/** /**
deprecated function deprecated function
skipping to change at line 246 skipping to change at line 262
\sa gaiaQuotedSql \sa gaiaQuotedSql
\note this function is still supported simply for backward compatibility. \note this function is still supported simply for backward compatibility.
it's intrinsically unsafe (passing huge strings potentially leads to it's intrinsically unsafe (passing huge strings potentially leads to
buffer overflows) and you are strongly encouraged to use gaiaQuotedSql() buffer overflows) and you are strongly encouraged to use gaiaQuotedSql()
as a safest replacement. as a safest replacement.
*/ */
GAIAAUX_DECLARE void gaiaCleanSqlString (char *value); GAIAAUX_DECLARE void gaiaCleanSqlString (char *value);
/**
SQL log: statement start
\param sqlite handle of the current DB connection
\param user_agent name of the invoking application, e.g. "spatialite_gui"
or "spatialite CLI"
\param utf8Sql the SQL statement bein executed
\param sqllog_pk after completion this variable will contain the value
of the Primary Key identifying the corresponding Log event
\sa gaiaUpdateSqlLog
\note this function inserts an \i event into the SQL Log, and
is expected to be invoked immediately \b before executing the SQL
statement itself.
*/
GAIAAUX_DECLARE void gaiaInsertIntoSqlLog(sqlite3 *sqlite, const char *
user_agent, const char *utf8Sql, sqlite3_int64 *sqllog_pk);
/**
SQL log: statement start
\param sqlite handle of the current DB connection
\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()
\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.
\sa gaiaInsertIntoSqlLog
\note this function completes an \i event inserted into the SQL Log, and
is expected to be invoked immediately \b after executing the SQL
statement itself.
*/
GAIAAUX_DECLARE void gaiaUpdateSqlLog(sqlite3 *sqlite, sqlite3_int64 sq
llog_pk, int success, const char *errMsg);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GAIAAUX_H */ #endif /* _GAIAAUX_H */
 End of changes. 8 change blocks. 
6 lines changed or deleted 63 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 90 skipping to change at line 90
/** this BLOB does actually contain a JPEG-EXIF image including GPS data */ /** this BLOB does actually contain a JPEG-EXIF image including GPS data */
#define GAIA_EXIF_GPS_BLOB 5 #define GAIA_EXIF_GPS_BLOB 5
/** 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 */
#define GAIA_WEBP_BLOB 10
/* 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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
use your version of this file under the terms of the MPL, indicate your use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL. the terms of any one of the MPL, the GPL or the LGPL.
*/ */
/*
CREDITS:
this module has been partly funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(wrapping liblwgeom APIs)
*/
/** /**
\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
#define GAIA2GEOS_ALL 0
#define GAIA2GEOS_ONLY_POINTS 1
#define GAIA2GEOS_ONLY_LINESTRINGS 2
#define GAIA2GEOS_ONLY_POLYGONS 3
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#ifndef OMIT_PROJ /* including PROJ.4 */ #ifndef OMIT_PROJ /* including PROJ.4 */
/** /**
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.
skipping to change at line 179 skipping to change at line 194
*/ */
GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (const char *msg); GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (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
\note convenience method, simply defaulting to gaiaToGeos(geom, GAIA2GEOS_
ALL)
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE void *gaiaToGeos (const gaiaGeomCollPtr gaia); GAIAGEO_DECLARE void *gaiaToGeos (const gaiaGeomCollPtr gaia);
/** /**
Converts a Geometry object into a GEOS Geometry
\param gaia pointer to Geometry object
\param mode one of GAIA2GEOS_ALL, GAIA2GEOS_ONLY_POINTS,
GAIA2GEOS_ONLY_LINESTRINGS or GAIA2GEOS_ONLY_POLYGONS
\return handle to GEOS Geometry
\sa gaiaFromGeos_XY, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
\note if the mode argument is not GAIA2GEOS_ALL only elementary geometries
of the selected type will be passed to GEOS, ignoring any other.
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE void *gaiaToGeosSelective (const gaiaGeomCollPtr gaia,
int mode);
/**
Converts a GEOS Geometry into a Geometry object [XY dims] Converts a GEOS Geometry into a Geometry object [XY dims]
\param geos handle to GEOS Geometry \param geos handle to GEOS Geometry
\return the pointer to the newly created Geometry object \return the pointer to the newly created Geometry object
\sa gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM \sa gaiaToGeos, gaiaFromGeos_XYZ, gaiaFromGeos_XYM, gaiaFromGeos_XYZM
\note you are responsible to destroy (before or after) any allocated \note you are responsible to destroy (before or after) any allocated
Geometry, this including any Geometry returned by gaiaFromGeos_XY() Geometry, this including any Geometry returned by gaiaFromGeos_XY()
skipping to change at line 265 skipping to change at line 302
\sa gaiaIsClosed, gaiaIsRing, gaiaIsValid \sa gaiaIsClosed, gaiaIsRing, gaiaIsValid
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom);
/** /**
Checks if a Linestring object represents an OGC Closed Geometry Checks if a Linestring object represents an OGC Closed Geometry
\param line pointer to Geometry object. This function only works on a single linestring - if you pass in a multi-l
ine
linestring geometry, it will return 0 (false). See gaiaIsClosedGeom for an
alternative.
\param line pointer to Linestring object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsRing, gaiaIsValid \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
\param line pointer to Geometry object.
\return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsRing, gaiaIsValid, gaiaIsClosed
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaIsClosedGeom (gaiaGeomCollPtr geom);
/**
Checks if a Linestring object represents an OGC Ring Geometry Checks if a Linestring object represents an OGC Ring Geometry
\param line pointer to Geometry object. \param line pointer to Geometry object.
\return 0 if false; any other value if true \return 0 if false; any other value if true
\sa gaiaIsSimple, gaiaIsClosed, gaiaIsValid \sa gaiaIsSimple, gaiaIsClosed, gaiaIsValid
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
skipping to change at line 309 skipping to change at line 363
GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom);
/** /**
Measures the total Length for a Geometry object Measures the total Length for a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param length on completion this variable will contain the measured length \param length on completion this variable will contain the measured length
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollArea, gaiaMeasureLength \sa gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLengthOrPerimeter
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom, GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom,
double *length); double *length);
/**
Measures the total Length or Perimeter for a Geometry object
\param geom pointer to Geometry object
\param perimeter if TRUE only Polygons will be considered, ignoring any Li
nesting
\n the opposite if FALSE (considering only Linestrings and ignoring any Po
lygon)
\param length on completion this variable will contain the measured length
or perimeter
\return 0 on failure: any other value on success
\sa gaiaGeomCollArea, gaiaMeasureLength, gaiaGeomCollLength
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE int gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom
,
int perimeter,
double *length);
/** /**
Measures the total Area for a Geometry object Measures the total Area for a Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\param area on completion this variable will contain the measured area \param area on completion this variable will contain the measured area
\return 0 on failure: any other value on success \return 0 on failure: any other value on success
\sa gaiaGeomCollLength, gaiaMeasureArea \sa gaiaGeomCollLength, gaiaMeasureArea
skipping to change at line 504 skipping to change at line 577
gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains, gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
gaiaGeomCollWithin, gaiaGeomCollTouches gaiaGeomCollWithin, gaiaGeomCollTouches
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
const char *pattern); const char *pattern);
/** /**
Calculates the minimum distance intercurring between two Geometry objects Calculates the maximum distance intercurring between two Geometry objects
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan ce \param dist on completion this variable will contain the calculated distan ce
\return 0 on failuer: any other value on success. \return 0 on failure: any other value on success.
\sa gaia3DDistance, gaiaMaxDistance, gaia3DMaxDistance
\note this function always computes the 2D cartesian distance.
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1, GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, gaiaGeomCollPtr geom2,
double *dist); double *dist);
/** /**
Spatial operator: Intersection Spatial operator: Intersection
skipping to change at line 549 skipping to change at line 626
/** /**
Spatial operator: Union Spatial operator: Union
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry Union of both input Geometries: NULL on failure. geometry Union of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl, gaiaUnaryUnion \sa gaiaFreeGeomColl, gaiaUnaryUnion, gaiaUnionCascaded
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaGeometryUnion() this including any Geometry returned by gaiaGeometryUnion()
\remark \b GEOS support required. \remark \b GEOS support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom 1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom 1,
gaiaGeomCollPtr geom2 ); gaiaGeomCollPtr geom2 );
/** /**
Spatial operator: Union Cascaded
\param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function is similar to gaiaUnaryUnion, but it only accepts Polygon
s and
MultiPolygons and it's now deprecated; anyway it's supported on older GEOS
versions.
NULL on failure.
\sa gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionUnion
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaUnionCascaded()
\remark \b GEOS support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnionCascaded (gaiaGeomCollPtr geom
);
/**
Spatial operator: Difference Spatial operator: Difference
\param geom1 the first Geometry object \param geom1 the first Geometry object
\param geom2 the second Geometry object \param geom2 the second Geometry object
\return the pointer to newly created Geometry object representing the \return the pointer to newly created Geometry object representing the
geometry Difference of both input Geometries: NULL on failure. geometry Difference of both input Geometries: NULL on failure.
\sa gaiaFreeGeomColl \sa gaiaFreeGeomColl
skipping to change at line 824 skipping to change at line 920
/** /**
Spatial operator: Line Interpolate Point Spatial operator: Line Interpolate Point
\param ln_geom the input Geometry object [expected to be of lineal type] \param ln_geom the input Geometry object [expected to be of lineal type]
\param fraction total length fraction [in the range 0.0 / 1.0] \param fraction total length fraction [in the range 0.0 / 1.0]
\return the pointer to newly created Geometry object representing a Point \return the pointer to newly created Geometry object representing a Point
laying on the input Geometry and positioned at the given length fraction: laying on the input Geometry and positioned at the given length fraction:
NULL on failure. NULL on failure.
\sa gaiaLineInterpolateEquidistantPoints
\sa gaiaFreeGeomColl \sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineInterpolatePoint() this including any Geometry returned by gaiaLineInterpolatePoint()
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollP tr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollP tr
ln_geom, ln_geom,
double fractio n); double fractio n);
/** /**
Spatial operator: Line Interpolate Equidistant Points
\param ln_geom the input Geometry object [expected to be of lineal type]
\param distance regular distance between interpolated points
\return the pointer to newly created Geometry object representing a MultiP
oint;
such MultiPoint always supports the M coordinate (the corresponding value
representing the progressive distance for each interpolated Point).
individual Points will be regularly spaced by the given distance:
NULL on failure.
\sa gaiaLineInterpolatePoint
\sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLineInterpolateEquidistantPoin
ts()
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr ln_geom,
double distance);
/**
Spatial operator: Line Substring Spatial operator: Line Substring
\param ln_geom the input Geometry object [expected to be of lineal type] \param ln_geom the input Geometry object [expected to be of lineal type]
\param start_fraction substring start, expressed as total length fraction \param start_fraction substring start, expressed as total length fraction
[in the range 0.0 / 1.0] [in the range 0.0 / 1.0]
\param end_fraction substring end, expressed as total length fraction \param end_fraction substring end, expressed as total length fraction
\return the pointer to newly created Geometry object representing a Linest ring \return the pointer to newly created Geometry object representing a Linest ring
laying on the input Geometry. laying on the input Geometry.
\n this Linestring will begin (and stop) at given total length fractions. \n this Linestring will begin (and stop) at given total length fractions.
skipping to change at line 920 skipping to change at line 1041
\sa gaiaFreeGeomColl \sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaLineMerge() this including any Geometry returned by gaiaLineMerge()
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom);
/** /**
Spatial operator: Line Cut At Nodes
\param geom1 pointer to input Geometry object [Linestring or MultiLinestri
ng].
\param geom2 pointer to input Geometry object [Point or MultiPoint].
\return the pointer to newly created Geometry object; NULL on failure.
\n if possible, any input Linestring will be split accordingly to given No
de(s):
no point will be interpolated, existing Linestring Vertices will be evalua
ted.
\sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaLinesCutAtNodes()
\remark \b GEOS-ADVANCED support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes (gaiaGeomCollPtr ge
om1,
gaiaGeomCollPtr geo
m2);
/**
Spatial operator: Unary Union Spatial operator: Unary Union
\param geom the input Geometry object. \param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\n this function is the same as gaiaGeometryUnion, except in that this \n this function is the same as gaiaGeometryUnion, except in that this
works internally to the input Geometry itself. works internally to the input Geometry itself.
NULL on failure. NULL on failure.
\sa gaiaFreeGeomColl, gaiaGeometryUnion \sa gaiaFreeGeomColl, gaiaGeometryUnion, gaiaUnionCascaded
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry returned by gaiaUnaryUnion() this including any Geometry returned by gaiaUnaryUnion()
\remark \b GEOS-ADVANCED support required. \remark \b GEOS-ADVANCED support required.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom);
/** /**
Determines the location of the closest Point on Linestring to the given Po int Determines the location of the closest Point on Linestring to the given Po int
skipping to change at line 985 skipping to change at line 1126
\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);
#endif /* end GEOS advanced and experimental featur /**
es */ Utility function: SquareGrid
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing square POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSquareGrid()
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom,
double origin_x,
double origin_y,
double size,
int only_edges);
/**
Utility function: TriangularGrid
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaTriangularGrid()
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geo
m,
double origin_x,
double origin_y,
double size,
int only_edges);
/**
Utility function: HexagonalGrid
\param geom the Geometry to be covered by the Grid.
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size the Grid cell-side size.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing hexagonal POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will always return a MultiPolygon
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaHexagonalGrid()
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom
,
double origin_x,
double origin_y,
double size,
int only_edges);
#endif /* end GEOS advanced features */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_TRUNK
#endif
/**
Delaunay Triangulation
\param geom pointer to input Geometry object.
\param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON containing triangular POLYGONs.
\return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaVoronojDiagram, gaiaConcaveHull
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaDelaunayTriangulation()
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomColl
Ptr
geom,
double tolera
nce,
int only_edge
s);
/**
Voronoj Diagram
\param geom pointer to input Geometry object.
\param extra_frame_size percent factor expanding the BBOX of input Geometr
y
\param tolerance optional snapping tolerance.
\param only_edges if non-zero will return a MULTILINESTRING, otherwise it
will
return a MULTIPOLYGON.
\return the pointer to newly created Geometry object: NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaVoronojDiagram()
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geo
m,
double extra_frame_s
ize,
double tolerance,
int only_edges);
/**
Concave Hull
\param geom pointer to input Geometry object.
\param factor multiplier used for filtering Delaunay triangles: please rea
d the note.
\param tolerance optional snapping tolerance.
\param allow_hows if FALSE any interior hole will be suppressed.
\return the pointer to newly created Geometry object (always of the Polygo
n type):
NULL on failure.
\n NULL will be returned if any argument is invalid.
\sa gaiaFreeGeomColl, gaiaDelaunayTriangulation
\note This function will first create the Delauany Triangulation correspon
ding
to input Geometry, determining at the same time the \b standard \b deviat
ion
for all edge's lengths.
\n Then in a second pass all Delaunay's triangles will be filtered, and al
l
triangles presenting at least one edge longer than \b standard \b deviatio
n
\b * \b factor will be discarded.
\n All filtered triangles will then be merged altogether so to create the
Concave Hull.
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaConcaveHull()
\remark \b GEOS-TRUNK support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConcaveHull (gaiaGeomCollPtr geom,
double factor,
double tolerance,
int allow_holes);
#endif /* end GEOS experimental features */
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LWGEOM
#endif
/**
Utility function: MakeValid
\param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will attempt to create a valid representation of a given
invalid geometry without loosing any of the input vertices.
\n Already-valid geometries are returned without further intervention.
\n NULL will be returned if the passed argument is invalid.
\sa gaiaFreeGeomColl, gaiaMakeValidDiscarded
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaMakeValid()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid (gaiaGeomCollPtr geom);
/**
Utility function: MakeValidDiscarded
\param geom the input Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will attempt to collect any invalid item (offending
geometries) discarded by gaiaMakeValid while building a valid Geometry.
\n Saving any discarded item could be useful for a finer (manual) adjustme
nt.
\n NULL will be returned if gaiaMakeValid hasn't identified any offending
item
to be discarded during the validation.
\sa gaiaFreeGeomColl, gaiaMakeValid
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaMakeValidDiscarded()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded (gaiaGeomCollPtr
geom);
/**
Utility function: Segmentize
\param geom the input Geometry object.
\param dist the meximum segment length.
\return the pointer to newly created Geometry object: NULL on failure.
\n this function will return a modified geometry having no segment longer
than the given distance.
\n Distance computation is performed in 2d only.
\n all Points or segments shorter than 'dist' will be returned without fur
ther intervention.
\n NULL will be returned if the passed argument is invalid.
\sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSegmentize()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (gaiaGeomCollPtr geom,
double dist);
/**
Utility function: Azimuth
\param xa the X ccordinate of PointA.
\param ya the Y coordinate of PointA.
\param xb the X ccordinate of PointB.
\param yb the Y coordinate of PointB.
\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
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaiaAzimuth (double xa, double ya, double xb,
double yb, double *azimuth);
/**
Utility function: GeoHash
\param geom the input geometry.
\param precision the expected precision: if <= 0 will be automatically det
ermined.
\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
by gaiaGeoHash()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE char *gaiaGeoHash (gaiaGeomCollPtr geom, int precision)
;
/**
Utility function: AsX3D
\param geom the input geometry.
\param srs the WKT SRS definition.
\param precision the expected precision (coord decimal digits).
\param options
\param refid the X3D namespace
\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
by gaiaAsX3D()
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE char *gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs,
int precision, int options,
const char *defid);
/**
Calculates the minimum 3D distance intercurring between two Geometry objec
ts
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan
ce
\return 0 on failure: any other value on success.
\sa gaiaGeomCollDistance, gaiaMaxDistance, gaia3DMaxDisance
\note this function computes the 3D cartesian distance (if Z is supported)
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaia3DDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, double *dist)
;
/**
Calculates the maximum 2D distance intercurring between two Geometry objec
ts
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan
ce
\return 0 on failure: any other value on success.
\sa gaiaGeomCollDistance, gaia3DDistance, gaia3DMaxDistance
\note this function computes the 2D maximum cartesian distance (Z is alway
s ignored)
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaiaMaxDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, double *dist
);
/**
Calculates the maximum 3D distance intercurring between two Geometry objec
ts
\param geom1 the first Geometry object
\param geom2 the second Geometry object
\param dist on completion this variable will contain the calculated distan
ce
\return 0 on failure: any other value on success.
\sa gaiaGeomCollDistance, gaia3DDistance, gaiaMaxDistance
\note this function computes the 3D maximum cartesian distance (if Z is su
pported)
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE int gaia3DMaxDistance (gaiaGeomCollPtr geom1,
gaiaGeomCollPtr geom2, double *di
st);
/**
Utility function: Split
\param input the input Geometry object.
\param blade the blade Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n The function supports splitting a line by point, a line by line, a poly
gon by line.
\sa gaiaFreeGeomColl, gaiaSplitLeft, gaiaSplitRight
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSplit()
\note gaiaSplit will return both the \b left and the \b right split halves
at the same time.
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit (gaiaGeomCollPtr input,
gaiaGeomCollPtr blade);
/**
Utility function: SplitLeft
\param input the input Geometry object.
\param blade the blade Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n The function supports splitting a line by point, a line by line, a poly
gon by line.
\sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitRight
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSplitLeft()
\note gaiaSplitLeft will only return the \b left split half; NULL may be e
ventually
returned if empty.
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft (gaiaGeomCollPtr input,
gaiaGeomCollPtr blade);
/**
Utility function: SplitRight
\param input the input Geometry object.
\param blade the blade Geometry object.
\return the pointer to newly created Geometry object: NULL on failure.
\n The function supports splitting a line by point, a line by line, a poly
gon by line.
\sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitLeft
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSplitRight()
\note gaiaSplitLeft will only return the \b right split half; NULL may be
eventually
returned if empty.
\remark \b LWGEOM support required.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (gaiaGeomCollPtr input,
gaiaGeomCollPtr blade);
#endif /* end LWGEOM support */
#endif /* end including GEOS */ #endif /* end including GEOS */
/**
Utility function: SnapToGrid
\param origin_x the X ccordinate identifying the Grid Origin.
\param origin_y the Y coordinate identifiying the Grid Origin.
\param size_x Grid cell size (X axis).
\param size_y Grid cell size (Y axis).
\param size_z Grid cell size (Z axis).
\param size_m Grid cell size (M axis).
\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
defined by its origin and cell size.
\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 Collapsed geometries in a collection are stripped from it.
\n Specify 0 as size for any dimension you don't want to snap to a grid.
\n NULL will be returned if the passed argument is invalid.
\sa gaiaFreeGeomColl
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry returned by gaiaSnapToGrid()
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnapToGrid (gaiaGeomCollPtr geom,
double origin_x,
double origin_y,
double origin_z,
double origin_m,
double size_x,
double size_y,
double size_z,
double size_m);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GG_ADVANCED_H */ #endif /* _GG_ADVANCED_H */
 End of changes. 21 change blocks. 
12 lines changed or deleted 673 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 62 skipping to change at line 62
#ifndef _GG_CONST_H #ifndef _GG_CONST_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GG_CONST_H #define _GG_CONST_H
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* constant values for getVectorLayersList modes */
/** mode: FAST */
#define GAIA_VECTORS_LIST_FAST 0
/** mode: OPTIMISTIC */
#define GAIA_VECTORS_LIST_OPTIMISTIC 1
/** mode: PESSIMISTIC */
#define GAIA_VECTORS_LIST_PESSIMISTIC 2
/* constant values for Vector Layer Types */
/** Vector Layer: unknown type */
#define GAIA_VECTOR_UNKNOWN -1
/** Vector Layer: Spatial Table */
#define GAIA_VECTOR_TABLE 1
/** Vector Layer: Spatial View */
#define GAIA_VECTOR_VIEW 2
/** Vector Layer: Virtual Shape */
#define GAIA_VECTOR_VIRTUAL 3
/* constant values for Vector Layer Geometry Types */
/** Vector Layer Geometry: Geometry */
#define GAIA_VECTOR_GEOMETRY 0
/** Vector Layer Geometry: Point */
#define GAIA_VECTOR_POINT 1
/** Vector Layer Geometry: Linestring */
#define GAIA_VECTOR_LINESTRING 2
/** Vector Layer Geometry: Polygon */
#define GAIA_VECTOR_POLYGON 3
/** Vector Layer Geometry: MultiPoint */
#define GAIA_VECTOR_MULTIPOINT 4
/** Vector Layer Geometry: MultiLinestring */
#define GAIA_VECTOR_MULTILINESTRING 5
/** Vector Layer Geometry: MultiPolygon */
#define GAIA_VECTOR_MULTIPOLYGON 6
/** Vector Layer Geometry: GeometryCollection */
#define GAIA_VECTOR_GEOMETRYCOLLECTION 7
/* constant values for Spatial Index */
/** Vector Layer: no Spatial Index */
#define GAIA_SPATIAL_INDEX_NONE 0
/** Vector Layer: Spatial Index RTree */
#define GAIA_SPATIAL_INDEX_RTREE 1
/** Vector Layer: Spatial Index MbrCache */
#define GAIA_SPATIAL_INDEX_MBRCACHE 2
/* constant values for generic geometry classes */ /* constant values for generic geometry classes */
/** WKT parser: unknown Geometry type */ /** WKT parser: unknown Geometry type */
#define GAIA_TYPE_NONE 0 #define GAIA_TYPE_NONE 0
/** WKT parser: Point Geometry type */ /** WKT parser: Point Geometry type */
#define GAIA_TYPE_POINT 1 #define GAIA_TYPE_POINT 1
/** WKT parser: Linestring Geometry type */ /** WKT parser: Linestring Geometry type */
#define GAIA_TYPE_LINESTRING 2 #define GAIA_TYPE_LINESTRING 2
/** WKT parser: Polygon Geometry type */ /** WKT parser: Polygon Geometry type */
#define GAIA_TYPE_POLYGON 3 #define GAIA_TYPE_POLYGON 3
skipping to change at line 356 skipping to change at line 406
#define GAIA_SHP_MULTIPOINTZ 18 #define GAIA_SHP_MULTIPOINTZ 18
/** SHP shape: POINT M */ /** SHP shape: POINT M */
#define GAIA_SHP_POINTM 21 #define GAIA_SHP_POINTM 21
/** SHP shape: POLYLINE M */ /** SHP shape: POLYLINE M */
#define GAIA_SHP_POLYLINEM 23 #define GAIA_SHP_POLYLINEM 23
/** SHP shape: POLYGON M */ /** SHP shape: POLYGON M */
#define GAIA_SHP_POLYGONM 25 #define GAIA_SHP_POLYGONM 25
/** SHP shape: MULTIPOINT M */ /** SHP shape: MULTIPOINT M */
#define GAIA_SHP_MULTIPOINTM 28 #define GAIA_SHP_MULTIPOINTM 28
/* constants used for Clone Special modes */
/** Clone Special Mode: Same Order as input */
#define GAIA_SAME_ORDER 0
/** Clone Special Mode: Reversed Order */
#define GAIA_REVERSE_ORDER -1
/** Clone Special Mode: apply Left Handle Rule to Polygon Rings */
#define GAIA_LHR_ORDER -2
/* macros */ /* macros */
/** /**
macro extracting XY coordinates macro extracting XY coordinates
\param xy pointer [const void *] to COORD mem-array \param xy pointer [const void *] to COORD mem-array
\param v [int] point index [first point has index 0] \param v [int] point index [first point has index 0]
\param x [double *] X coordinate \param x [double *] X coordinate
\param y [double *] Y coordinate \param y [double *] Y coordinate
\sa gaiaLineGetPoint, gaiaRingGetPoint \sa gaiaLineGetPoint, gaiaRingGetPoint
 End of changes. 4 change blocks. 
2 lines changed or deleted 60 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* function prototypes */ /* function prototypes */
/** /**
Safely frees any dynamic memory block allocated by the library itself Safely frees any dynamic memory block allocated by the library itself
\param ptr pointer to dynamicly allocated memory \param ptr pointer to dynamically allocated memory
\note on some platforms (most notably, Microsoft Windows) many different \note on some platforms (most notably, Microsoft Windows) many different
runtime libraries may actually support the same process. runtime libraries may actually support the same process.
\n attempting to free() a memory block allocated by a different runtime \n attempting to free() a memory block allocated by a different runtime
module may easily cause fatal memory corruption. module may easily cause fatal memory corruption.
*/ */
GAIAGEO_DECLARE void gaiaFree (void *ptr); GAIAGEO_DECLARE void gaiaFree (void *ptr);
/** /**
Allocates a 2D POINT [XY] Allocates a 2D POINT [XY]
skipping to change at line 157 skipping to change at line 157
GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPointXYZM (double x, double y, GAIAGEO_DECLARE gaiaPointPtr gaiaAllocPointXYZM (double x, double y,
double z, double m); double z, double m);
/** /**
Destroys a POINT object Destroys a POINT object
\param ptr pointer to the POINT object to be destroyed \param ptr pointer to the POINT object to be destroyed
\sa gaiaAllocPoint, gaiaAllocPointXYZ, gaiaAllocPointXYM, gaiaAllocPointXY ZM \sa gaiaAllocPoint, gaiaAllocPointXYZ, gaiaAllocPointXYM, gaiaAllocPointXY ZM
\note attempting to destroy any POINT object whose ownnership has already \note attempting to destroy any POINT object whose ownership has already
been transferred to some other (higher order) object is a serious been transferred to some other (higher order) object is a serious
error, and will easily cause severe memory corruption. error, and will easily cause severe memory corruption.
*/ */
GAIAGEO_DECLARE void gaiaFreePoint (gaiaPointPtr ptr); GAIAGEO_DECLARE void gaiaFreePoint (gaiaPointPtr ptr);
/** /**
Allocates a 2D LINESTRING [XY] Allocates a 2D LINESTRING [XY]
\param vert number of points [aka vertices] into the Linestring \param vert number of points [aka vertices] into the Linestring
skipping to change at line 251 skipping to change at line 251
error, and will easily cause severe memory corruption. error, and will easily cause severe memory corruption.
*/ */
GAIAGEO_DECLARE void gaiaFreeLinestring (gaiaLinestringPtr ptr); GAIAGEO_DECLARE void gaiaFreeLinestring (gaiaLinestringPtr ptr);
/** /**
Copies coordinates between two LINESTRING objects Copies coordinates between two LINESTRING objects
\param dst destination LINESTRING [output] \param dst destination LINESTRING [output]
\param src origin LINESTRING [input] \param src origin LINESTRING [input]
\sa gaiaCopyLinestringCoordsReverse
\note both LINESTRING objects must have exactly the same number of points: \note both LINESTRING objects must have exactly the same number of points:
if dimensions aren't the same for both objects, then the appropriate if dimensions aren't the same for both objects, then the appropriate
conversion will be silently applied. conversion will be silently applied.
*/ */
GAIAGEO_DECLARE void gaiaCopyLinestringCoords (gaiaLinestringPtr dst, GAIAGEO_DECLARE void gaiaCopyLinestringCoords (gaiaLinestringPtr dst,
gaiaLinestringPtr src); gaiaLinestringPtr src);
/** /**
Copies coordinates between two LINESTRING objects in reverse order
\param dst destination LINESTRING [output]
\param src origin LINESTRING [input]
\sa gaiaCopyLinestringCoords
\note both LINESTRING objects must have exactly the same number of points:
if dimensions aren't the same for both objects, then the appropriate
conversion will be silently applied.
*/
GAIAGEO_DECLARE void gaiaCopyLinestringCoordsReverse (gaiaLinestringPtr
dst,
gaiaLinestringPtr
src);
/**
Allocates a 2D RING [XY] Allocates a 2D RING [XY]
\param vert number of points [aka vertices] into the Ring \param vert number of points [aka vertices] into the Ring
\return the pointer to newly created RING object: NULL on failure \return the pointer to newly created RING object: NULL on failure
\sa gaiaFreeRing, gaiaRingSetPoint, gaiaRingGetPoint, gaiaSetPoint, \sa gaiaFreeRing, gaiaRingSetPoint, gaiaRingGetPoint, gaiaSetPoint,
gaiaGetPoint gaiaGetPoint
\note you are responsible to destroy (before or after) any allocated RING, \note you are responsible to destroy (before or after) any allocated RING,
skipping to change at line 334 skipping to change at line 352
GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRingXYZM (int vert); GAIAGEO_DECLARE gaiaRingPtr gaiaAllocRingXYZM (int vert);
/** /**
Destroys a RING object Destroys a RING object
\param ptr pointer to the RING object to be destroyed \param ptr pointer to the RING object to be destroyed
\sa gaiaAllocRing, gaiaAllocRingXYZ, gaiaAllocRingXYM, \sa gaiaAllocRing, gaiaAllocRingXYZ, gaiaAllocRingXYM,
gaiaAllocRingXYZM gaiaAllocRingXYZM
\note attempting to destroy any RING object whose ownnership has already \note attempting to destroy any RING object whose ownership has already
been transferred to some other (higher order) object is a serious been transferred to some other (higher order) object is a serious
error, and will easily cause severe memory corruption. error, and will easily cause severe memory corruption.
*/ */
GAIAGEO_DECLARE void gaiaFreeRing (gaiaRingPtr ptr); GAIAGEO_DECLARE void gaiaFreeRing (gaiaRingPtr ptr);
/** /**
Copies coordinates betwee two RING objects Copies coordinates between two RING objects
\param dst destination RING [output] \param dst destination RING [output]
\param src origin RING [input] \param src origin RING [input]
\sa gaiaCopyRingCoordsReverse
\note both RING objects must have exactly the same number of points: \note both RING objects must have exactly the same number of points:
if dimensions aren't the same for both objects, then the appropriate if dimensions aren't the same for both objects, then the appropriate
conversion will be silently applied. conversion will be silently applied.
*/ */
GAIAGEO_DECLARE void gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr s rc); GAIAGEO_DECLARE void gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr s rc);
/** /**
Copies coordinates between two RING objects in reverse order
\param dst destination RING [output]
\param src origin RING [input]
\sa gaiaCopyRingCoords
\note both RING objects must have exactly the same number of points:
if dimensions aren't the same for both objects, then the appropriate
conversion will be silently applied.
*/
GAIAGEO_DECLARE void gaiaCopyRingCoordsReverse (gaiaRingPtr dst,
gaiaRingPtr src);
/**
Allocates a 2D POLYGON [XY] Allocates a 2D POLYGON [XY]
\param vert number of points [aka vertices] into the Exterior Ring. \param vert number of points [aka vertices] into the Exterior Ring.
\param holes number of Interior Rings [0, if no Interior Ring is required] . \param holes number of Interior Rings [0, if no Interior Ring is required] .
\return the pointer to newly created POLYGON object: NULL on failure \return the pointer to newly created POLYGON object: NULL on failure
\sa gaiaFreePolygon \sa gaiaFreePolygon
\note you are responsible to destroy (before or after) any allocated POLYG ON, \note you are responsible to destroy (before or after) any allocated POLYG ON,
skipping to change at line 448 skipping to change at line 483
GAIAGEO_DECLARE gaiaPolygonPtr gaiaCreatePolygon (gaiaRingPtr ring); GAIAGEO_DECLARE gaiaPolygonPtr gaiaCreatePolygon (gaiaRingPtr ring);
/** /**
Destroys a POLYGON object Destroys a POLYGON object
\param polyg pointer to the POLYGON object to be destroyed \param polyg pointer to the POLYGON object to be destroyed
\sa gaiaAllocPolygon, gaiaAllocPolygonXYZ, gaiaAllocPolygonXYM, \sa gaiaAllocPolygon, gaiaAllocPolygonXYZ, gaiaAllocPolygonXYM,
gaiaAllocPolygonXYZM, gaiaCreatePolygon gaiaAllocPolygonXYZM, gaiaCreatePolygon
\note attempting to destroy any POLYGON object whose ownnership has alread y \note attempting to destroy any POLYGON object whose ownership has already
been transferred to some other (higher order) object is a serious been transferred to some other (higher order) object is a serious
error, and will easily cause severe memory corruption. error, and will easily cause severe memory corruption.
\n Ownerhip of each RING object referenced by a POLYGON object alway belon gs \n Ownership of each RING object referenced by a POLYGON object always bel ongs
to the POLYGON itself, so destroying the POLYGON will surely destroy to the POLYGON itself, so destroying the POLYGON will surely destroy
any related RING as well. any related RING as well.
*/ */
GAIAGEO_DECLARE void gaiaFreePolygon (gaiaPolygonPtr polyg); GAIAGEO_DECLARE void gaiaFreePolygon (gaiaPolygonPtr polyg);
/** /**
Allocates a 2D Geometry [XY] Allocates a 2D Geometry [XY]
\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 521 skipping to change at line 556
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomCollXYZM (void); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaAllocGeomCollXYZM (void);
/** /**
Destroys a Geometry object Destroys a Geometry object
\param geom pointer to the Geometry object to be destroyed \param geom pointer to the Geometry object to be destroyed
\sa gaiaAllocGeomColl, gaiaAllocGeomCollXYZ, gaiaAllocGeomCollXYM, \sa gaiaAllocGeomColl, gaiaAllocGeomCollXYZ, gaiaAllocGeomCollXYM,
gaiaAllocGeomCollXYZM gaiaAllocGeomCollXYZM
\note attempting to destroy any Geometry object whose ownnership has alrea dy \note attempting to destroy any Geometry object whose ownership has alread y
been transferred to some other (higher order) object is a serious been transferred to some other (higher order) object is a serious
error, and will easily cause severe memory corruption. error, and will easily cause severe memory corruption.
\n Ownerhip of each POINT, LINESTRING or POLYGON object referenced by a \n Ownership of each POINT, LINESTRING or POLYGON object referenced by a
Geometry object alway belongs to the Geometry itself, so destroying the Geometry object always belongs to the Geometry itself, so destroying the
Geometry will surely destroy any related elementary geometry item as well. Geometry will surely destroy any related elementary geometry item as well.
*/ */
GAIAGEO_DECLARE void gaiaFreeGeomColl (gaiaGeomCollPtr geom); GAIAGEO_DECLARE void gaiaFreeGeomColl (gaiaGeomCollPtr geom);
/** /**
Creates a new 2D Point [XY] object into a Geometry object Creates a new 2D Point [XY] object into a Geometry object
\param p pointer to the Geometry object \param p pointer to the Geometry object
\param x X coordinate of the Point to be created \param x X coordinate of the Point to be created
\param y X coordinate of the Point to be created \param y X coordinate of the Point to be created
skipping to change at line 691 skipping to change at line 726
gaiaRingPtr ring); gaiaRingPtr ring);
/** /**
Inserts an already existing Ring object into a Polygon object Inserts an already existing Ring object into a Polygon object
\param polyg pointer to the Polygon object \param polyg pointer to the Polygon object
\param ring pointer to the Ring object \param ring pointer to the Ring object
\sa gaiaInsertInteriorRing \sa gaiaInsertInteriorRing
\note ownership of the Ring object will be tranferred to the Polygon objec t. \note ownership of the Ring object will be transferred to the Polygon obje ct.
\n the newly created Polygon will have the same dimensions as the Ring has . \n the newly created Polygon will have the same dimensions as the Ring has .
\n if required the Polygon's Interior Rings count could be increased. \n if required the Polygon's Interior Rings count could be increased.
*/ */
GAIAGEO_DECLARE void gaiaAddRingToPolyg (gaiaPolygonPtr polyg, GAIAGEO_DECLARE void gaiaAddRingToPolyg (gaiaPolygonPtr polyg,
gaiaRingPtr ring); gaiaRingPtr ring);
/** /**
Duplicates a Linestring object Duplicates a Linestring object
\param line pointer to Linestring object [origin]. \param line pointer to Linestring object [origin].
\return the pointer to newly created Linestring object: NULL on failure. \return the pointer to newly created Linestring object: NULL on failure.
\sa gaiaCloneRing, gaiaClonePolygon, gaiaCloneGeomColl, \sa gaiaCloneRing, gaiaClonePolygon, gaiaCloneGeomColl,
gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings, gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings,
gaiaCloneGeomCollPolygons gaiaCloneGeomCollPolygons, gaiaCloneLinestringSpecial
\note the newly created object is an exact copy of the original one. \note the newly created object is an exact copy of the original one.
*/ */
GAIAGEO_DECLARE gaiaLinestringPtr gaiaCloneLinestring (gaiaLinestringPt r GAIAGEO_DECLARE gaiaLinestringPtr gaiaCloneLinestring (gaiaLinestringPt r
line); line);
/**
Duplicates a Linestring object (special)
\param line pointer to Linestring object [origin].
\param mode one of GAIA_SAME_ORDER or GAIA_REVERSE_ORDER.
\return the pointer to newly created Linestring object: NULL on failure.
\sa gaiaCloneLinestring, gaiaCloneGeomCollSpecial
\note if GAIA_REVERSE_ORDER is specified, then any vertex into the newly c
reated
object will be in reverse order [first vertex will be last one, and last
vertex
will be the first one]. In any other case this function will simply defau
lt to
gaiaCloneLinestring.
*/
GAIAGEO_DECLARE gaiaLinestringPtr
gaiaCloneLinestringSpecial (gaiaLinestringPtr line, int mode);
/** /**
Duplicates a Ring object Duplicates a Ring object
\param ring pointer to Ring object [origin]. \param ring pointer to Ring object [origin].
\return the pointer to newly created Ring object: NULL on failure. \return the pointer to newly created Ring object: NULL on failure.
\sa gaiaCloneLinestring, gaiaClonePolygon, gaiaCloneGeomColl, \sa gaiaCloneLinestring, gaiaClonePolygon, gaiaCloneGeomColl,
gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings, gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings,
gaiaCloneGeomCollPolygons gaiaCloneGeomCollPolygons, gaiaCloneRingSpecial
\note the newly created object is an exact copy of the original one. \note the newly created object is an exact copy of the original one.
*/ */
GAIAGEO_DECLARE gaiaRingPtr gaiaCloneRing (gaiaRingPtr ring); GAIAGEO_DECLARE gaiaRingPtr gaiaCloneRing (gaiaRingPtr ring);
/** /**
Duplicates a Ring object (special)
\param ring pointer to Ring object [origin].
\param mode one of GAIA_SAME_ORDER or GAIA_REVERSE_ORDER.
\return the pointer to newly created Ring object: NULL on failure.
\sa gaiaCloneRing, gaiaClonePolygonSpecial
\note if GAIA_REVERSE_ORDER is specified, then any vertex into the newly c
reated
object will be in reverse order [first vertex will be last one, and last
vertex
will be the first one]. In any other case this function will simply defau
lt to
gaiaCloneRing.
*/
GAIAGEO_DECLARE gaiaRingPtr gaiaCloneRingSpecial (gaiaRingPtr ring,
int mode);
/**
Duplicates a Polygon object Duplicates a Polygon object
\param polyg pointer to Polygon object [origin]. \param polyg pointer to Polygon object [origin].
\return the pointer to newly created Polygon object: NULL on failure. \return the pointer to newly created Polygon object: NULL on failure.
\sa gaiaCloneLinestring, gaiaCloneRing, gaiaCloneGeomColl, \sa gaiaCloneLinestring, gaiaCloneRing, gaiaCloneGeomColl,
gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings, gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings,
gaiaCloneGeomCollPolygons gaiaCloneGeomCollPolygons, gaiaClonePolygonSpecial
\note the newly created object is an exact copy of the original one. \note the newly created object is an exact copy of the original one.
*/ */
GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygon (gaiaPolygonPtr polyg); GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygon (gaiaPolygonPtr polyg);
/** /**
Duplicates a Polygon object (special)
\param polyg pointer to Polygon object [origin].
\param mode one of GAIA_SAME_ORDER, GAIA_REVERSE_ORDER or GAIA_LHR_ORDER.
\return the pointer to newly created Polygon object: NULL on failure.
\sa gaiaClonePolygon, gaiaCloneGeomCollSpecial
\note if GAIA_REVERSE_ORDER is specified, then any Ring into the newly cre
ated
object will be in reverse order. If GAIA_LHR_ORDER is specified instead,
any
Exterior Ring will have clockwise orientation, and any Interior Ring will
have
counter-clockwise orientation. In any other case this function will simpl
y
default to gaiaClonePolygon.
*/
GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygonSpecial (gaiaPolygonPtr
polyg, int mode)
;
/**
Duplicates a Geometry object Duplicates a Geometry object
\param geom pointer to Geometry object [origin]. \param geom pointer to Geometry object [origin].
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneLinestring, gaiaCloneRing, gaiaClonePolygon, \sa gaiaCloneLinestring, gaiaCloneRing, gaiaClonePolygon,
gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings, gaiaCloneGeomCollPoints, gaiaCloneGeomCollLinestrings,
gaiaCloneGeomCollPolygons, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ, gaiaCloneGeomCollPolygons, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM, gaiaExtractPointsFromGeomCo ll, gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM, gaiaExtractPointsFromGeomCo ll,
gaiaExtractLinestringsFromGeomColl, gaiaExtractPolygonsFromGeomColl, gaiaExtractLinestringsFromGeomColl, gaiaExtractPolygonsFromGeomColl,
gaiaMergeGeometries gaiaMergeGeometries, gaiaCloneGeomCollSpecial
\note the newly created object is an exact copy of the original one. \note the newly created object is an exact copy of the original one.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomColl (gaiaGeomCollPtr geom ); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomColl (gaiaGeomCollPtr geom );
/** /**
Duplicates a Geometry object (special)
\param geom pointer to Geometry object [origin].
\param mode one of GAIA_SAME_ORDER, GAIA_REVERSE_ORDER or GAIA_LHR_ORDER.
\return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneLinestringSpecial, gaiaCloneRingSpecial, gaiaClonePolygonSpec
ial,
gaiaCloneGeomColl
\note if GAIA_REVERSE_ORDER is specified, then any Linestring and/or Ring
into
the newly created object will be in reverse order. If GAIA_LHR_ORDER is sp
ecified
instead, any Polygong will have the Exterior Ring in clockwise orientatio
n, and any
Interior Ring int counter-clockwise orientation. In any other case this f
unction will
simply default to gaiaCloneGeomColl.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCloneGeomCollSpecial (gaiaGeomCollP
tr
geom, int mode
);
/**
Duplicates a Geometry object [Points only] Duplicates a Geometry object [Points only]
\param geom pointer to Geometry object [origin]. \param geom pointer to Geometry object [origin].
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneLinestring, gaiaCloneRing, gaiaClonePolygon, gaiaCloneGeomCol l, \sa gaiaCloneLinestring, gaiaCloneRing, gaiaClonePolygon, gaiaCloneGeomCol l,
gaiaCloneGeomCollLinestrings, gaiaCloneGeomCollLinestrings,
gaiaCloneGeomCollPolygons gaiaCloneGeomCollPolygons
skipping to change at line 840 skipping to change at line 949
Duplicates a Geometry object [casting dimensions to 3D XYZ] Duplicates a Geometry object [casting dimensions to 3D XYZ]
\param geom pointer to Geometry object [origin]. \param geom pointer to Geometry object [origin].
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY,
gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM
\note the newly created object is an exact copy of the original one; excep t \note the newly created object is an exact copy of the original one; excep t
in that any elementary item will be casted to 3D [XYZ] dimensions. in that any elementary item will be cast to 3D [XYZ] dimensions.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZ (gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZ (gaiaGeomCollPtr
geom); geom);
/** /**
Duplicates a Geometry object [casting dimensions to 2D XYM] Duplicates a Geometry object [casting dimensions to 2D XYM]
\param geom pointer to Geometry object [origin]. \param geom pointer to Geometry object [origin].
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ, \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
gaiaCastGeomCollToXYZM gaiaCastGeomCollToXYZM
\note the newly created object is an exact copy of the original one; excep t \note the newly created object is an exact copy of the original one; excep t
in that any elementary item will be casted to 2D [XYM] dimensions. in that any elementary item will be cast to 2D [XYM] dimensions.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYM (gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYM (gaiaGeomCollPtr
geom); geom);
/** /**
Duplicates a Geometry object [casting dimensions to 3D XYZM] Duplicates a Geometry object [casting dimensions to 3D XYZM]
\param geom pointer to Geometry object [origin]. \param geom pointer to Geometry object [origin].
\return the pointer to newly created Geometry object: NULL on failure. \return the pointer to newly created Geometry object: NULL on failure.
\sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ, \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
gaiaCastGeomCollToXYM gaiaCastGeomCollToXYM
\note the newly created object is an exact copy of the original one; excep t \note the newly created object is an exact copy of the original one; excep t
in that any elementary item will be casted to 3D [XYZM] dimensions. in that any elementary item will be cast to 3D [XYZM] dimensions.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZM (gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZM (gaiaGeomCollPtr
geom); geom);
/** /**
Gets coodinates from a Linestring's Point Gets coodinates from a Linestring's Point
\param ln pointer to Linestring object. \param ln pointer to Linestring object.
\param v relative position of Point: first Point has index 0 \param v relative position of Point: first Point has index 0
\param x on completion this variable will contain the Point X coordinate. \param x on completion this variable will contain the Point X coordinate.
skipping to change at line 906 skipping to change at line 1015
intrinsically safest, because misused macros can easily cause severe intrinsically safest, because misused macros can easily cause severe
memory corruption. memory corruption.
\n gaiaLineGetPoint() instead will always ensure that the appropriate \n gaiaLineGetPoint() instead will always ensure that the appropriate
dimensions (as declared by the Linestring object) will be correctly used. dimensions (as declared by the Linestring object) will be correctly used.
*/ */
GAIAGEO_DECLARE int gaiaLineGetPoint (gaiaLinestringPtr ln, int v, GAIAGEO_DECLARE int gaiaLineGetPoint (gaiaLinestringPtr ln, int v,
double *x, double *y, double *z, double *x, double *y, double *z,
double *m); double *m);
/** /**
Sets coodinates for a Linestring's Point Sets coordinates for a Linestring's Point
\param ln pointer to Linestring object. \param ln pointer to Linestring object.
\param v relative position of Point: first Point has index 0 \param v relative position of Point: first Point has index 0
\param x the Point's X coordinate. \param x the Point's X coordinate.
\param y the Point's Y coordinate. \param y the Point's Y coordinate.
\param z the Point's Z coordinate. \param z the Point's Z coordinate.
\param m the Point's M measure. \param m the Point's M measure.
\return 0 on failure: any other different value on success. \return 0 on failure: any other different value on success.
skipping to change at line 933 skipping to change at line 1042
\n using the gaiaLineSetPoint() function is a little bit slower but is \n using the gaiaLineSetPoint() function is a little bit slower but is
intrinsically safest, because misused macros can easily cause severe intrinsically safest, because misused macros can easily cause severe
memory corruption. memory corruption.
\n gaiaLineSetPoint() instead will always ensure that the appropriate \n gaiaLineSetPoint() instead will always ensure that the appropriate
dimensions (as declared by the Linestring object) will be correctly used. dimensions (as declared by the Linestring object) will be correctly used.
*/ */
GAIAGEO_DECLARE int gaiaLineSetPoint (gaiaLinestringPtr ln, int v, doub le x, GAIAGEO_DECLARE int gaiaLineSetPoint (gaiaLinestringPtr ln, int v, doub le x,
double y, double z, double m); double y, double z, double m);
/** /**
Gets coodinates from a Ring's Point Gets coordinates from a Ring's Point
\param rng pointer to Ring object. \param rng pointer to Ring object.
\param v relative position of Point: first Point has index 0 \param v relative position of Point: first Point has index 0
\param x on completion this variable will contain the Point X coordinate. \param x on completion this variable will contain the Point X coordinate.
\param y on completion this variable will contain the Point Y coordinate. \param y on completion this variable will contain the Point Y coordinate.
\param z on completion this variable will contain the Point Z coordinate. \param z on completion this variable will contain the Point Z coordinate.
\param m on completion this variable will contain the Point M measure. \param m on completion this variable will contain the Point M measure.
\return 0 on failure: any other different value on success. \return 0 on failure: any other different value on success.
skipping to change at line 1061 skipping to change at line 1170
/** /**
Checks for toxic Geometry object Checks for toxic Geometry object
\param geom pointer to Geometry object \param geom pointer to Geometry object
\return 0 if the Geometry is not toxic: otherwise any other different valu e. \return 0 if the Geometry is not toxic: otherwise any other different valu e.
\sa gaiaSanitize \sa gaiaSanitize
\note a \b toxic Geometry is a Geometry containing severely malformed \note a \b toxic Geometry is a Geometry containing severely malformed
Polygons: i.e. containing less than 4 Points, unclosed Rings and so on. Polygons: i.e. containing less than 4 Points.
\n Or containing severely malformed Linestrings: i.e. containing less
than 2 Points.
\n Attempting to pass any toxic Geometry to GEOS supported functions \n Attempting to pass any toxic Geometry to GEOS supported functions
will easily cause a crash. will easily cause a crash.
*/ */
GAIAGEO_DECLARE int gaiaIsToxic (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsToxic (gaiaGeomCollPtr geom);
/** /**
Checks for not-closed Rings
\param ring pointer to Ring object
\return 0 if the Ring in unclosed: otherwise any other different value.
\sa gaiaIsToxic, gaiaIsNotClosedGeomColl
\note unclosed Rings cause GEOS supported functions to crash.
\n SpatiaLite will always carefully check any Ring before passing it
to GEOS, eventually silently inserting a further point required so
to properly close the figure.
\n This function allows to explicitly identify any unclosed Ring.
*/
GAIAGEO_DECLARE int gaiaIsNotClosedRing (gaiaRingPtr ring);
/**
Checks for not-closed Rings in a Geometry object
\param geom pointer to Geometry object
\return 0 if the Geometry has no unclosed Rings: otherwise any other diffe
rent value.
\sa gaiaIsToxic, gaiaIsNotClosedRing
\note This function allows to explicitly identify any Geometry containing
at least one unclosed Ring.
*/
GAIAGEO_DECLARE int gaiaIsNotClosedGeomColl (gaiaGeomCollPtr geom);
/**
Attempts to sanitize a possibly malformed Geometry object Attempts to sanitize a possibly malformed Geometry object
\param org pointer to Geometry object. \param org pointer to Geometry object.
\return the pointer to newly created Geometry: NULL on failure. \return the pointer to newly created Geometry: NULL on failure.
\sa gaiaIsToxic \sa gaiaIsToxic
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry created by gaiaSanitize() this including any Geometry created by gaiaSanitize()
skipping to change at line 1218 skipping to change at line 1360
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
this including any Geometry created by gaiaMergeGeometries() this including any Geometry created by gaiaMergeGeometries()
\n the newly created Geometry will contain any Point, Linestring and/or \n the newly created Geometry will contain any Point, Linestring and/or
Polygon contained in both input Geometries. Polygon contained in both input Geometries.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr ge om1, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr ge om1,
gaiaGeomCollPtr geo m2); gaiaGeomCollPtr geo m2);
/** /**
Return a GeometryCollection containing elements matching the specified ran
ge of measures
\param geom pointer to Geometry object
\param m_start range of measures: start value
\param m_end range of measures: end value
\return the pointer to newly created Geometry: NULL on failure.
\note you are responsible to destroy (before or after) any allocated Geome
try,
this including any Geometry created by gaiaLocateBetweenMeasures()
\n the newly created Geometry will contain Points and/or Linestrings.
\n if the input Geometry has no M dimension then NULL will be returned.
\n if the input Geometry doesn't contains any point/vertex corresponding t
o the
required range of measures then NULL will be returned.
\n if the input Geometry contains any Polygon (or is a GeometryCollection)
then
NULL will be returned.
*/
GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLocateBetweenMeasures (gaiaGeomCollPtr geom, double m_start,
double m_end);
/**
Measures the geometric length for a Linestring or Ring Measures the geometric length for a Linestring or Ring
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
\param coords pointed to COORD mem-array \param coords pointed to COORD mem-array
\param vert number of Points (aka Vertices) within the COORD mem-array \param vert number of Points (aka Vertices) within the COORD mem-array
\return the calculated geometric length \return the calculated geometric length
\sa gaiaGeomCollLength \sa gaiaGeomCollLength
skipping to change at line 1299 skipping to change at line 1463
\param polyg pointer to Polygon object \param polyg pointer to Polygon object
\param x Point X coordinate \param x Point X coordinate
\param y Point Y coordinate \param y Point Y coordinate
\return 0 if false: any other value if true \return 0 if false: any other value if true
*/ */
GAIAGEO_DECLARE int gaiaIsPointOnPolygonSurface (gaiaPolygonPtr polyg, GAIAGEO_DECLARE int gaiaIsPointOnPolygonSurface (gaiaPolygonPtr polyg,
double x, double y); double x, double y);
/** /**
Computes the minimum distance intercurring from a Point and a Linestring o r Ring Computes the minimum distance between a Point and a Linestring or Ring
\param x0 Point X coordinate \param x0 Point X coordinate
\param y0 Point Y coordinate \param y0 Point Y coordinate
\param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
\param coords pointed to COORD mem-array \param coords pointed to COORD mem-array
\param vert number of Points (aka Vertices) within the COORD mem-array \param vert number of Points (aka Vertices) within the COORD mem-array
\return the calculated minumum distance. \return the calculated minumum distance.
\note \b dims, \b coords and \b vert are usually expected to correspond to \note \b dims, \b coords and \b vert are usually expected to correspond to
skipping to change at line 1345 skipping to change at line 1509
double x3, double y3, double x4, double x3, double y3, double x4,
double y4); double y4);
/** /**
Shifts any coordinate within a Geometry object Shifts any coordinate within a Geometry object
\param geom pointer to Geometry object. \param geom pointer to Geometry object.
\param shift_x X axis shift factor. \param shift_x X axis shift factor.
\param shift_y Y axis shift factor. \param shift_y Y axis shift factor.
\sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords \sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords,
gaiaShiftCoords3D, gaiaShiftLongitude
*/ */
GAIAGEO_DECLARE void gaiaShiftCoords (gaiaGeomCollPtr geom, double shif t_x, GAIAGEO_DECLARE void gaiaShiftCoords (gaiaGeomCollPtr geom, double shif t_x,
double shift_y); double shift_y);
/** /**
Shifts any coordinate within a 3D Geometry object
\param geom pointer to Geometry object.
\param shift_x X axis shift factor.
\param shift_y Y axis shift factor.
\param shift_z Z axis shift factor.
\sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords,
gaiaShiftCoords, gaiaShiftLongitude, gaiaNormalizeLonLat
*/
GAIAGEO_DECLARE void gaiaShiftCoords3D (gaiaGeomCollPtr geom,
double shift_x, double shift_y,
double shift_z);
/**
Shifts negative longitudes
\param geom pointer to Geometry object.
\sa gaiaShiftCoords, gaiaShiftCoords3D, gaiaNormalizeLonLat
\note only intended for geographic (longitude/latitude) coordinates.
Negative longitudes (-180/0) will be shifted by 360, thus allowing
to represent longitudes in the 0/360 range and effectively crossing
the International Date Line.
*/
GAIAGEO_DECLARE void gaiaShiftLongitude (gaiaGeomCollPtr geom);
/**
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).
\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,
gaiaShiftCoords3D, gaiaShiftLongitude
*/
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.
\param scale_x X axis scale factor. \param scale_x X axis scale factor.
\param scale_y Y axis scale factor. \param scale_y Y axis scale factor.
\sa gaiaShiftCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords \sa gaiaShiftCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords
*/ */
GAIAGEO_DECLARE void gaiaScaleCoords (gaiaGeomCollPtr geom, double scal e_x, GAIAGEO_DECLARE void gaiaScaleCoords (gaiaGeomCollPtr geom, double scal e_x,
double scale_y); double scale_y);
skipping to change at line 1455 skipping to change at line 1663
\note supported Ellipsoid definitions are: \b MERIT, \b SGS85, \b GRS80, \note supported Ellipsoid definitions are: \b MERIT, \b SGS85, \b GRS80,
\b IAU76, \b airy, \b APL4.9, \b NWL9D, \b mod_airy, \b andrae, \b aust_SA , \b IAU76, \b airy, \b APL4.9, \b NWL9D, \b mod_airy, \b andrae, \b aust_SA ,
\b GRS67, \b bessel, \b bess_nam, \b clrk66, \b clrk80, \b CPM, \b delmbr, \b GRS67, \b bessel, \b bess_nam, \b clrk66, \b clrk80, \b CPM, \b delmbr,
\b engelis, \b evrst30, \b evrst48, \b evrst56, \b evrst69, \b evrstSS, \b engelis, \b evrst30, \b evrst48, \b evrst56, \b evrst69, \b evrstSS,
\b fschr60 \b fschr60
*/ */
GAIAGEO_DECLARE int gaiaEllipseParams (const char *name, double *a, GAIAGEO_DECLARE int gaiaEllipseParams (const char *name, double *a,
double *b, double *rf); double *b, double *rf);
/** /**
Calculates the Great Circle Distance intercurring between two Points Calculates the Great Circle Distance between between two Points
\param a first geodesic parameter. \param a first geodesic parameter.
\param b second geodesic parameter. \param b second geodesic parameter.
\param lat1 Latitude of first Point. \param lat1 Latitude of first Point.
\param lon1 Longitude of first Point. \param lon1 Longitude of first Point.
\param lat2 Latitude of second Point. \param lat2 Latitude of second Point.
\param lon2 Longitude of second Point. \param lon2 Longitude of second Point.
\return the calculated Great Circle Distance. \return the calculated Great Circle Distance.
skipping to change at line 1477 skipping to change at line 1685
gaiaGreatCircleTotalLength, gaiaGeodesicTotalLength gaiaGreatCircleTotalLength, gaiaGeodesicTotalLength
\note the returned distance is expressed in Kilometers. \note the returned distance is expressed in Kilometers.
\n the Great Circle method is less accurate but fastest to be calculated. \n the Great Circle method is less accurate but fastest to be calculated.
*/ */
GAIAGEO_DECLARE double gaiaGreatCircleDistance (double a, double b, GAIAGEO_DECLARE double gaiaGreatCircleDistance (double a, double b,
double lat1, double lon1 , double lat1, double lon1 ,
double lat2, double lon2 ); double lat2, double lon2 );
/** /**
Calculates the Geodesic Distance intercurring between two Points Calculates the Geodesic Distance between between two Points
\param a first geodesic parameter. \param a first geodesic parameter.
\param b second geodesic parameter. \param b second geodesic parameter.
\param rf third geodesic parameter. \param rf third geodesic parameter.
\param lat1 Latitude of first Point. \param lat1 Latitude of first Point.
\param lon1 Longitude of first Point. \param lon1 Longitude of first Point.
\param lat2 Latitude of second Point. \param lat2 Latitude of second Point.
\param lon2 Longitude of second Point. \param lon2 Longitude of second Point.
\return the calculated Geodesic Distance. \return the calculated Geodesic Distance.
 End of changes. 36 change blocks. 
26 lines changed or deleted 258 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 321 skipping to change at line 321
\sa gaiaFromSpatiaLiteBlobWkb \sa gaiaFromSpatiaLiteBlobWkb
\note the BLOB buffer corresponds to dynamically allocated memory: \note the BLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding]. of memory cleanup via buffer binding].
*/ */
GAIAGEO_DECLARE void gaiaMakePoint (double x, double y, int srid, GAIAGEO_DECLARE void gaiaMakePoint (double x, double y, int srid,
unsigned char **result, int *size); unsigned char **result, int *size);
/** /**
Creates a BLOB-Geometry representing a PointZ
\param x Point X coordinate.
\param y Point Y coordinate.
\param z Point Z coordinate.
\param srid the SRID to be set for the Point.
\param result on completion will containt a pointer to BLOB-Geometry:
NULL on failure.
\param size on completion this variable will contain the BLOB's size (in b
ytes)
\sa gaiaFromSpatiaLiteBlobWkb
\note the BLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding].
*/
GAIAGEO_DECLARE void gaiaMakePointZ (double x, double y, double z, int
srid,
unsigned char **result, int *size);
/**
Creates a BLOB-Geometry representing a PointM
\param x Point X coordinate.
\param y Point Y coordinate.
\param m Point M coordinate.
\param srid the SRID to be set for the Point.
\param result on completion will containt a pointer to BLOB-Geometry:
NULL on failure.
\param size on completion this variable will contain the BLOB's size (in b
ytes)
\sa gaiaFromSpatiaLiteBlobWkb
\note the BLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding].
*/
GAIAGEO_DECLARE void gaiaMakePointM (double x, double y, double m, int
srid,
unsigned char **result, int *size);
/**
Creates a BLOB-Geometry representing a PointZM
\param x Point X coordinate.
\param y Point Y coordinate.
\param z Point Z coordinate.
\param m Point M coordinate.
\param srid the SRID to be set for the Point.
\param result on completion will containt a pointer to BLOB-Geometry:
NULL on failure.
\param size on completion this variable will contain the BLOB's size (in b
ytes)
\sa gaiaFromSpatiaLiteBlobWkb
\note the BLOB buffer corresponds to dynamically allocated memory:
so you are responsible to free() it [unless SQLite will take care
of memory cleanup via buffer binding].
*/
GAIAGEO_DECLARE void gaiaMakePointZM (double x, double y, double z,
double m, int srid,
unsigned char **result, int *size)
;
/**
Creates a BLOB-Geometry representing a Segment (2-Points Linestring) Creates a BLOB-Geometry representing a Segment (2-Points Linestring)
\param geom1 pointer to first Geometry object (expected to represent a Poi nt). \param geom1 pointer to first Geometry object (expected to represent a Poi nt).
\param geom2 pointer to second Geometry object (expected to represent a Po int). \param geom2 pointer to second Geometry object (expected to represent a Po int).
\param result on completion will containt a pointer to BLOB-Geometry: \param result on completion will containt a pointer to BLOB-Geometry:
NULL on failure. NULL on failure.
\param size on completion this variable will contain the BLOB's size (in b ytes) \param size on completion this variable will contain the BLOB's size (in b ytes)
\sa gaiaFromSpatiaLiteBlobWkb \sa gaiaFromSpatiaLiteBlobWkb
skipping to change at line 472 skipping to change at line 534
GAIAGEO_DECLARE void gaiaToEWKB (gaiaOutBufferPtr out_buf, GAIAGEO_DECLARE void gaiaToEWKB (gaiaOutBufferPtr out_buf,
gaiaGeomCollPtr geom); gaiaGeomCollPtr geom);
/** /**
Creates a Geometry object from EWKB notation Creates a Geometry object from EWKB notation
\param in_buffer pointer to EWKB buffer \param in_buffer pointer to EWKB buffer
\return the pointer to the newly created Geometry object: NULL on failure. \return the pointer to the newly created Geometry object: NULL on failure.
\sa gaiaToWkb, gaiaToHexWkb, gaiaFromEWKB, gaiaToEWKB \sa gaiaToWkb, gaiaToHexWkb, gaiaParseHexEWKB, gaiaToEWKB, gaiaEwkbGetPoin
t,
gaiaEwkbGetLinestring, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
unless you've passed ownership of the Geometry object to some further obje ct: unless you've passed ownership of the Geometry object to some further obje ct:
in this case destroying the higher order object will implicitly destroy an y in this case destroying the higher order object will implicitly destroy an y
contained child object. contained child object.
*/ */
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromEWKB (const unsigned char GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromEWKB (const unsigned char
*in_buffer); *in_buffer);
/** /**
Translates an EWKB notation from hexadecimal into binary
\param blob_hex pointer to EWKB input buffer (hexadecimal text string)
\param blob_size lenght (in bytes) of the input buffer; if succesfull will
contain the lenght of the returned output buffer.
\return the pointer to the newly created EWKB binary buffer: NULL on failu
re.
\sa gaiaToWkb, gaiaToHexWkb, gaiaFromEWKB, gaiaToEWKB
\note you are responsible to destroy (before or after) any buffer allocate
d by
gaiaParseHexEWKB()
*/
GAIAGEO_DECLARE unsigned char *gaiaParseHexEWKB (const unsigned char
*blob_hex, int *blob_si
ze);
/**
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
will be inserted into this Geometry
\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 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 endiam_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
\return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetLinestring, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
\note these functions are mainly intended for internal usage.
*/
GAIAGEO_DECLARE int
gaiaEwkbGetPoint (gaiaGeomCollPtr geom, unsigned char *blob,
int offset, int blob_size, int endian,
int endian_arch, int dims);
/**
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
will be inserted into this Geometry
\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 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 endiam_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
\return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
\note these functions are mainly intended for internal usage.
*/
GAIAGEO_DECLARE int
gaiaEwkbGetLinestring (gaiaGeomCollPtr geom, unsigned char *blob,
int offset, int blob_size, int endian,
int endian_arch, int dims);
/**
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
will be inserted into this Geometry
\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 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 endiam_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
\return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetPolygon, gaiaEwkbGetMultiGeometry
*/
GAIAGEO_DECLARE int
gaiaEwkbGetPolygon (gaiaGeomCollPtr geom, unsigned char *blob,
int offset, int blob_size, int endian,
int endian_arch, int dims);
/**
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
will be inserted into this Geometry
\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 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 endiam_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
\return -1 on failure; otherwise the offset where the next object starts.
\sa gaiaEwkbGetPoint, gaiaEwkbGetLinestring, gaiaEwkbGetPolygon
\note these functions are mainly intended for internal usage.
*/
GAIAGEO_DECLARE int
gaiaEwkbGetMultiGeometry (gaiaGeomCollPtr geom, unsigned char *blob,
int offset, int blob_size, int endian,
int endian_arch, int dims);
/**
Creates a Geometry object from FGF notation Creates a Geometry object from FGF notation
\param blob pointer to FGF buffer \param blob pointer to FGF buffer
\param size the BLOB's size (in bytes) \param size the BLOB's size (in bytes)
\return the pointer to the newly created Geometry object: NULL on failure. \return the pointer to the newly created Geometry object: NULL on failure.
\sa gaiaToFgf \sa gaiaToFgf
\note you are responsible to destroy (before or after) any allocated Geome try, \note you are responsible to destroy (before or after) any allocated Geome try,
 End of changes. 5 change blocks. 
3 lines changed or deleted 203 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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 56 skipping to change at line 56
\file gg_structs.h \file gg_structs.h
Geometry structures Geometry structures
*/ */
#ifndef _GG_STRUCTS_H #ifndef _GG_STRUCTS_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GG_STRUCTS_H #define _GG_STRUCTS_H
#endif #endif
#include <sys/types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** /**
Container for OGC POINT Geometry Container for OGC POINT Geometry
*/ */
typedef struct gaiaPointStruct typedef struct gaiaPointStruct
{ {
skipping to change at line 618 skipping to change at line 620
} gaiaTextReader; } gaiaTextReader;
/** /**
Typedef for Virtual Text file handling structure Typedef for Virtual Text file handling structure
\sa gaiaTextReader \sa gaiaTextReader
*/ */
typedef gaiaTextReader *gaiaTextReaderPtr; typedef gaiaTextReader *gaiaTextReaderPtr;
#endif /* end ICONV (text reader) */ #endif /* end ICONV (text reader) */
/**
Layer Extent infos
*/
typedef struct gaiaLayerExtentInfos
{
/** row count (aka feature count) */
int Count;
/** Extent: min X */
double MinX; /* MBR - BBOX */
/** Extent: min Y */
double MinY; /* MBR - BBOX */
/** Extent: max X */
double MaxX; /* MBR - BBOX */
/** Extent: max Y */
double MaxY; /* MBR - BBOX */
} gaiaLayerExtent;
/**
Typedef for Layer Extent infos
\sa gaiaLayerExtent
*/
typedef gaiaLayerExtent *gaiaLayerExtentPtr;
/**
Layer Auth infos
*/
typedef struct gaiaLayerAuthInfos
{
/** Read-Only layer: TRUE or FALSE */
int IsReadOnly;
/** Hidden layer: TRUE or FALSE */
int IsHidden;
} gaiaLayerAuth;
/**
Typedef for Layer Auth infos
\sa gaiaLayerAuth
*/
typedef gaiaLayerAuth *gaiaLayerAuthPtr;
/**
Attribute/Field MaxSize/Length infos
*/
typedef struct gaiaAttributeFieldMaxSizeInfos
{
/** MaxSize / MaxLength */
int MaxSize;
} gaiaAttributeFieldMaxSize;
/**
Typedef for Attribute/Field MaxSize/Length infos
\sa gaiaAttributeFieldMaxSize
*/
typedef gaiaAttributeFieldMaxSize *gaiaAttributeFieldMaxSizePtr;
/**
Attribute/Field Integer range infos
*/
typedef struct gaiaAttributeFieldIntRangeInfos
{
/** Minimum value */
sqlite3_int64 MinValue;
/** Maximum value */
sqlite3_int64 MaxValue;
} gaiaAttributeFieldIntRange;
/**
Typedef for Attribute/Field Integer range infos
\sa gaiaAttributeFieldIntRange
*/
typedef gaiaAttributeFieldIntRange *gaiaAttributeFieldIntRangePtr;
/**
Attribute/Field Double range infos
*/
typedef struct gaiaAttributeFieldDoubleRangeInfos
{
/** Minimum value */
double MinValue;
/** Maximum value */
double MaxValue;
} gaiaAttributeFieldDoubleRange;
/**
Typedef for Attribute/Field Double range infos
\sa gaiaAttributeFieldDoubleRange
*/
typedef gaiaAttributeFieldDoubleRange *gaiaAttributeFieldDoubleRangePtr
;
/**
LayerAttributeField infos
*/
typedef struct gaiaLayerAttributeFieldInfos
{
/** ordinal position */
int Ordinal;
/** SQL name of the corresponding column */
char *AttributeFieldName;
/** total count of NULL values */
int NullValuesCount;
/** total count of INTEGER values */
int IntegerValuesCount;
/** total count of DOUBLE values */
int DoubleValuesCount;
/** total count of TEXT values */
int TextValuesCount;
/** total count of BLOB values */
int BlobValuesCount;
/** pointer to MaxSize/Length infos (may be NULL) */
gaiaAttributeFieldMaxSizePtr MaxSize;
/** pointer to range of Integer values infos (may be NULL) */
gaiaAttributeFieldIntRangePtr IntRange;
/** pointer to range of Double values infos (may be NULL) */
gaiaAttributeFieldDoubleRangePtr DoubleRange;
/** pointer to next item (linked list) */
struct gaiaLayerAttributeFieldInfos *Next;
} gaiaLayerAttributeField;
/**
Typedef for Layer AttributeField infos
\sa gaiaLayerAttributeField
*/
typedef gaiaLayerAttributeField *gaiaLayerAttributeFieldPtr;
/**
Vector Layer item
*/
typedef struct gaiaVectorLayerItem
{
/** one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_TABLE, GAIA_VECTOR_VIEW,
GAIA_VECTOR_VIRTUAL */
int LayerType;
/** SQL name of the corresponding table */
char *TableName;
/** SQL name of the corresponding Geometry column */
char *GeometryName;
/** SRID value */
int Srid;
/** one of GAIA_VECTOR_UNKNOWN, GAIA_VECTOR_POINT, GAIA_VECTOR_LINESTRING,
GAIA_VECTOR_POLYGON, GAIA_VECTOR_MULTIPOINT, GAIA_VECTOR_MULTILINESTRIN
G,
GAIA_VECTOR_MULTIPOLYGON, GAIA_VECTOR_GEOMETRYCOLLECTION, GAIA_VECTOR_G
EOMETRY
*/
int GeometryType;
/** one of GAIA_VECTOR_UNKNOWN, GAIA_XY, GAIA_XY_Z, GAIA_XY_M, GAIA_XY_ZM *
/
int Dimensions;
/** one of GAIA_VECTOR_UNKNOWN, GAIA_SPATIAL_INDEX_NONE, GAIA_SPATIAL_INDEX
_RTREE,
GAIA_SPATIAL_INDEX_MBRCACHE
*/
int SpatialIndex;
/** pointer to Extent infos (may be NULL) */
gaiaLayerExtentPtr ExtentInfos;
/** pointer to Auth infos (may be NULL) */
gaiaLayerAuthPtr AuthInfos;
/** pointer to first Field/Attribute (linked list) */
gaiaLayerAttributeFieldPtr First;
/** pointer to last Field/Attribute (linked list) */
gaiaLayerAttributeFieldPtr Last;
/** pointer to next item (linked list) */
struct gaiaVectorLayerItem *Next;
} gaiaVectorLayer;
/**
Typedef for Vector Layer item
\sa gaiaVectorLayer
*/
typedef gaiaVectorLayer *gaiaVectorLayerPtr;
/**
Container for Vector Layers List
*/
typedef struct gaiaVectorLayersListStr
{
/** pointer to first vector layer (linked list) */
gaiaVectorLayerPtr First;
/** pointer to last vector layer (linked list) */
gaiaVectorLayerPtr Last;
/** pointer to currently set vector layer */
gaiaVectorLayerPtr Current;
} gaiaVectorLayersList;
/**
Typedef for Vector Layers List
\sa gaiaVectorLayersList
*/
typedef gaiaVectorLayersList *gaiaVectorLayersListPtr;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GG_STRUCTS_H */ #endif /* _GG_STRUCTS_H */
 End of changes. 4 change blocks. 
2 lines changed or deleted 203 lines changed or added


 spatialite.h   spatialite.h 
/* /*
spatialite.h -- Gaia spatial support for SQLite spatialite.h -- Gaia spatial support for SQLite
version 3.0, 2011 July 20 version 4.0, 2012 August 6
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 Portions created by the Initial Developer are Copyright (C) 2008-2012
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 51 skipping to change at line 51
the terms of any one of the MPL, the GPL or the LGPL. the terms of any one of the MPL, the GPL or the LGPL.
*/ */
/** /**
\file spatialite.h \file spatialite.h
Main SpatiaLite header file Main SpatiaLite header file
*/ */
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
#ifdef DLL_EXPORT #ifdef DLL_EXPORT
#define SPATIALITE_DECLARE __declspec(dllexport) #define SPATIALITE_DECLARE __declspec(dllexport)
#else #else
#define SPATIALITE_DECLARE extern #define SPATIALITE_DECLARE extern
#endif #endif
#else
#define SPATIALITE_DECLARE __attribute__ ((visibility("default")))
#endif
#endif #endif
#ifndef _SPATIALITE_H #ifndef _SPATIALITE_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _SPATIALITE_H #define _SPATIALITE_H
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#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 library. Initializes the library.
\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
\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);
/** /**
Cleanup spatialite Initializes the GEOS library.
This function performs general cleanup, essentially undoing the effect \note You are never supposed to invoke this function (internally handled).
of spatialite_init().
\sa spatialite_init */
*/ SPATIALITE_DECLARE void spatialite_init_geos (void);
SPATIALITE_DECLARE void spatialite_cleanup ();
/**
Cleanup spatialite
This function performs general cleanup, essentially undoing the effect
of spatialite_init().
\sa spatialite_init
*/
SPATIALITE_DECLARE void spatialite_cleanup (void);
/** /**
Dumps a full geometry-table into an external Shapefile Dumps a full geometry-table into an external Shapefile
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table the name of the table to be exported \param table the name of the table to be exported
\param column the name of the geometry column \param column the name of the geometry column
\param shp_path pathname of the Shapefile to be exported (no suffix) \param shp_path pathname of the Shapefile to be exported (no suffix)
\param charset a valid GNU ICONV charset to be used for DBF text strings \param charset a valid GNU ICONV charset to be used for DBF text strings
\param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL \param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL
skipping to change at line 132 skipping to change at line 146
\param srid the SRID to be set for Geometries \param srid the SRID to be set for Geometries
\param column the name of the geometry column \param column the name of the geometry column
\param coerce2d if TRUE any Geometry will be casted to 2D [XY] \param coerce2d if TRUE any Geometry will be casted to 2D [XY]
\param compressed if TRUE compressed Geometries will be created \param compressed if TRUE compressed Geometries will be created
\param verbose if TRUE a short report is shown on stderr \param verbose if TRUE a short report is shown on stderr
\param spatial_index if TRUE an R*Tree Spatial Index will be created \param spatial_index if TRUE an R*Tree Spatial Index will be created
\param rows on completion will contain the total number of actually export ed rows \param rows on completion will contain the total number of actually export ed rows
\param err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\sa load_shapefile_ex
\note this function simply calls load_shapefile_ex by passing
implicit gype="AUTO" and pk_column=NULL arguments
*/ */
SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path , SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path ,
char *table, char *charset, int s rid, char *table, char *charset, int s rid,
char *column, int coerce2d, char *column, int coerce2d,
int compressed, int verbose, int compressed, int verbose,
int spatial_index, int *rows, int spatial_index, int *rows,
char *err_msg); char *err_msg);
/** /**
Loads an external Shapefile into a newly created table
\param sqlite handle to current DB connection
\param shp_path pathname of the Shapefile to be imported (no suffix)
\param table the name of the table to be created
\param charset a valid GNU ICONV charset to be used for DBF text strings
\param srid the SRID to be set for Geometries
\param geo_column the name of the geometry column
\param gtype expected to be one of: "LINESTRING", "LINESTRINGZ",
"LINESTRINGM", "LINESTRINGZM", "MULTILINESTRING", "MULTILINESTRINGZ",
"MULTILINESTRINGM", "MULTILINESTRINGZM", "POLYGON", "POLYGONZ", "POLYGONM
",
"POLYGONZM", "MULTIPOLYGON", "MULTIPOLYGONZ", "MULTIPOLYGONM",
"MULTIPOLYGONZM" or "AUTO".
\param pk_column name of the Primary Key column; if NULL or mismatching
then "PK_UID" will be assumed by default.
\param coerce2d if TRUE any Geometry will be casted to 2D [XY]
\param compressed if TRUE compressed Geometries will be created
\param verbose if TRUE a short report is shown on stderr
\param spatial_index if TRUE an R*Tree Spatial Index will be created
\param rows on completion will contain the total number of actually export
ed rows
\param err_msg on completion will contain an error message (if any)
\return 0 on failure, any other value on success
\sa load_shapefile
\note the Shapefile format doesn't supports any distinction between
LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
as does not allows to clearly distinguish if the M-measure is required.
\n So a first preliminary scan of the Shapefile is required in order to
correctly identify the actual payload (gtype = "AUTO", default case).
\n By explicitly specifying some expected geometry type this first scan
will be skipped at all thus introducing a noticeable performance gain.
\n Anyway, declaring a mismatching geometry type will surely cause a failu
re.
*/
SPATIALITE_DECLARE int load_shapefile_ex (sqlite3 * sqlite, char *shp_p
ath,
char *table, char *charset,
int srid, char *geo_column,
char *gtype, char *pk_column,
int coerce2d, int compressed,
int verbose, int spatial_index
,
int *rows, char *err_msg);
/**
Loads an external DBF file into a newly created table Loads an external DBF file into a newly created table
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param dbf_path pathname of the DBF file to be imported \param dbf_path pathname of the DBF file to be imported
\param table the name of the table to be created \param table the name of the table to be created
\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 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
\param err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\sa load_dbf_ex
\note this function simply calls load_dbf_ex by passing an
implicit pk_column=NULL argument
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path, SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path,
char *table, char *charset, int verbose , char *table, char *charset, int verbose ,
int *rows, char *err_msg); int *rows, char *err_msg);
/** /**
Loads an external DBF file into a newly created table
\param sqlite handle to current DB connection
\param dbf_path pathname of the DBF file to be imported
\param table the name of the table to be created
\param pk_column name of the Primary Key column; if NULL or mismatching
then "PK_UID" will be assumed by default.
\param charset a valid GNU ICONV charset to be used for DBF text strings
\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 err_msg on completion will contain an error message (if any)
\sa load_shapefile
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int load_dbf_ex (sqlite3 * sqlite, char *dbf_path,
char *table, char *pk_column,
char *charset, int verbose, int *row
s,
char *err_msg);
/**
Dumps a full table into an external DBF file Dumps a full table into an external DBF file
\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 dbf_path pathname of the DBF to be exported \param dbf_path pathname of the DBF to be exported
\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 err_msg on completion will contain an error message (if any) \param err_msg on completion will contain an error message (if any)
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
*/ */
skipping to change at line 217 skipping to change at line 307
SPATIALITE_DECLARE sqlite3_int64 math_llabs (sqlite3_int64 value); SPATIALITE_DECLARE sqlite3_int64 math_llabs (sqlite3_int64 value);
/** /**
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table Inserts the inlined EPSG dataset into the "spatial_ref_sys" table
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param verbose if TRUE a short report is shown on stderr \param verbose if TRUE a short report is shown on stderr
\return 0 on failure, any other value on success \return 0 on failure, any other value on success
\sa spatial_ref_sys_init2
\note this function is internally invoked by the SQL function \note this function is internally invoked by the SQL function
InitSpatialMetadata(), and is not usually intended for direct use. InitSpatialMetadata(), and is not usually intended for direct use.
This functions is now deprecated, and will simply call
spatial_ref_sys_init2(sqlite, GAIA_EPSG_ANY, verbose).
*/ */
SPATIALITE_DECLARE int spatial_ref_sys_init (sqlite3 * sqlite, int verb ose); SPATIALITE_DECLARE int spatial_ref_sys_init (sqlite3 * sqlite, int verb ose);
/** /**
Inserts the inlined EPSG dataset into the "spatial_ref_sys" table
\param sqlite handle to current DB connection
\param mode can be one of GAIA_EPSG_ANY, GAIA_EPSG_NONE or GAIA_EPSG_WGS84
_ONLY
\param verbose if TRUE a short report is shown on stderr
\return 0 on failure, any other value on success
\note this function is internally invoked by the SQL function
InitSpatialMetadata(), and is not usually intended for direct use.
*/
SPATIALITE_DECLARE int spatial_ref_sys_init2 (sqlite3 * sqlite, int mod
e,
int verbose);
/**
Inserts some inlined EPSG definition into the "spatial_ref_sys" table
\param sqlite handle to current DB connection
\param srid the SRID value uniquely identifying the required EPSG definiti
on
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int insert_epsg_srid (sqlite3 * sqlite, int srid);
/**
Checks if a column is actually defined into the given table Checks if a column is actually defined into the given table
\param sqlite handle to current DB connection \param sqlite handle to current DB connection
\param table the table to be checked \param table the table to be checked
\param column the column to be checked \param column the column to be checked
\return 0 on success, any other value on success \return 0 on success, any other value on success
\note internally used to detect if some KML attribute defaults to a consta nt value \note internally used to detect if some KML attribute defaults to a consta nt value
*/ */
skipping to change at line 356 skipping to change at line 475
belonging to the given table will be processed. belonging to the given table will be processed.
- if both table and column are not NULL, then only the - if both table and column are not NULL, then only the
given entry will be processed. given entry will be processed.
\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 supporting Vector Layers
\param handle SQLite handle to current DB connection.
\param table VectorLayer Table (or View, or VirtualShape).
\param geometry Geometry Column name.
\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
\sa gaiaFreeVectorLayersList
\note you are responsible to destroy (before or after) any allocated
VectorLayersList returned by gaiaGetVectorLayersList().
\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).
\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
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
statistic tables will be always performed (probably slower, but surely ac
curate).
*/
SPATIALITE_DECLARE gaiaVectorLayersListPtr gaiaGetVectorLayersList (sql
ite3 *
handle,
const char *table, const char *geometry, int mode);
/**
Destroys a VectorLayersList object
\param ptr pointer to the VectorLayersList object to be destroyed
\sa gaiaGetVectorLayersList
*/
SPATIALITE_DECLARE void gaiaFreeVectorLayersList (gaiaVectorLayersListP
tr ptr);
/**
Drops a layer-table, removing any related dependency
\param sqlite handle to current DB connection
\param table name of the table to be removed
\note this function will drop a SpatialTable, SpatialView or VirtualShape
being
properly registered within the Metadata tables.
\n an eventual Spatial Index will be dropped as well, and any row referrin
g the
selected table will be removed from the Metadata tables.
\return 0 on failure, any other value on success
*/
SPATIALITE_DECLARE int gaiaDropTable (sqlite3 * sqlite, const char *tab
le);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SPATIALITE_H */ #endif /* _SPATIALITE_H */
 End of changes. 16 change blocks. 
9 lines changed or deleted 200 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/