SpatiaLite
3.0.0-stable
|
00001 /* 00002 gg_advanced.h -- Gaia common support for geometries: advanced 00003 00004 version 3.0, 2011 July 20 00005 00006 Author: Sandro Furieri a.furieri@lqt.it 00007 00008 ------------------------------------------------------------------------------ 00009 00010 Version: MPL 1.1/GPL 2.0/LGPL 2.1 00011 00012 The contents of this file are subject to the Mozilla Public License Version 00013 1.1 (the "License"); you may not use this file except in compliance with 00014 the License. You may obtain a copy of the License at 00015 http://www.mozilla.org/MPL/ 00016 00017 Software distributed under the License is distributed on an "AS IS" basis, 00018 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00019 for the specific language governing rights and limitations under the 00020 License. 00021 00022 The Original Code is the SpatiaLite library 00023 00024 The Initial Developer of the Original Code is Alessandro Furieri 00025 00026 Portions created by the Initial Developer are Copyright (C) 2008 00027 the Initial Developer. All Rights Reserved. 00028 00029 Contributor(s): 00030 00031 00032 Alternatively, the contents of this file may be used under the terms of 00033 either the GNU General Public License Version 2 or later (the "GPL"), or 00034 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00035 in which case the provisions of the GPL or the LGPL are applicable instead 00036 of those above. If you wish to allow use of your version of this file only 00037 under the terms of either the GPL or the LGPL, and not to allow others to 00038 use your version of this file under the terms of the MPL, indicate your 00039 decision by deleting the provisions above and replace them with the notice 00040 and other provisions required by the GPL or the LGPL. If you do not delete 00041 the provisions above, a recipient may use your version of this file under 00042 the terms of any one of the MPL, the GPL or the LGPL. 00043 00044 */ 00045 00046 00053 #ifndef _GG_ADVANCED_H 00054 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00055 #define _GG_ADVANCED_H 00056 #endif 00057 00058 #ifdef __cplusplus 00059 extern "C" 00060 { 00061 #endif 00062 00063 #ifndef OMIT_PROJ /* including PROJ.4 */ 00064 00075 GAIAGEO_DECLARE double gaiaRadsToDegs (double rads); 00076 00087 GAIAGEO_DECLARE double gaiaDegsToRads (double degs); 00088 00106 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org, 00107 char *proj_from, 00108 char *proj_to); 00109 00110 #endif /* end including PROJ.4 */ 00111 00112 #ifndef OMIT_GEOS /* including GEOS */ 00113 00122 GAIAGEO_DECLARE void gaiaResetGeosMsg (void); 00123 00135 GAIAGEO_DECLARE const char *gaiaGetGeosErrorMsg (void); 00136 00148 GAIAGEO_DECLARE const char *gaiaGetGeosWarningMsg (void); 00149 00160 GAIAGEO_DECLARE void gaiaSetGeosErrorMsg (const char *msg); 00161 00172 GAIAGEO_DECLARE void gaiaSetGeosWarningMsg (const char *msg); 00173 00185 GAIAGEO_DECLARE void *gaiaToGeos (const gaiaGeomCollPtr gaia); 00186 00201 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XY (const void *geos); 00202 00217 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZ (const void *geos); 00218 00233 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYM (const void *geos); 00234 00249 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromGeos_XYZM (const void *geos); 00250 00262 GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom); 00263 00275 GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line); 00276 00288 GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line); 00289 00301 GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom); 00302 00315 GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom, 00316 double *length); 00329 GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *area); 00330 00331 00349 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize (gaiaGeomCollPtr geom, 00350 int force_multi); 00365 GAIAGEO_DECLARE int gaiaGeomCollEquals (gaiaGeomCollPtr geom1, 00366 gaiaGeomCollPtr geom2); 00367 00382 GAIAGEO_DECLARE int gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, 00383 gaiaGeomCollPtr geom2); 00384 00399 GAIAGEO_DECLARE int gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, 00400 gaiaGeomCollPtr geom2); 00401 00416 GAIAGEO_DECLARE int gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, 00417 gaiaGeomCollPtr geom2); 00418 00433 GAIAGEO_DECLARE int gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, 00434 gaiaGeomCollPtr geom2); 00435 00450 GAIAGEO_DECLARE int gaiaGeomCollContains (gaiaGeomCollPtr geom1, 00451 gaiaGeomCollPtr geom2); 00452 00467 GAIAGEO_DECLARE int gaiaGeomCollWithin (gaiaGeomCollPtr geom1, 00468 gaiaGeomCollPtr geom2); 00469 00484 GAIAGEO_DECLARE int gaiaGeomCollTouches (gaiaGeomCollPtr geom1, 00485 gaiaGeomCollPtr geom2); 00486 00502 GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1, 00503 gaiaGeomCollPtr geom2, 00504 const char *pattern); 00505 00517 GAIAGEO_DECLARE int gaiaGeomCollDistance (gaiaGeomCollPtr geom1, 00518 gaiaGeomCollPtr geom2, 00519 double *dist); 00520 00538 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryIntersection (gaiaGeomCollPtr 00539 geom1, 00540 gaiaGeomCollPtr 00541 geom2); 00542 00559 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion (gaiaGeomCollPtr geom1, 00560 gaiaGeomCollPtr geom2); 00561 00578 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryDifference (gaiaGeomCollPtr 00579 geom1, 00580 gaiaGeomCollPtr 00581 geom2); 00582 00599 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometrySymDifference (gaiaGeomCollPtr 00600 geom1, 00601 gaiaGeomCollPtr 00602 geom2); 00603 00619 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBoundary (gaiaGeomCollPtr geom); 00620 00634 GAIAGEO_DECLARE int gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double *x, 00635 double *y); 00636 00648 GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, 00649 double *y); 00650 00667 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr geom, 00668 double tolerance); 00669 00686 GAIAGEO_DECLARE gaiaGeomCollPtr 00687 gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, 00688 double tolerance); 00689 00705 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom); 00706 00725 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geom, 00726 double radius, 00727 int points); 00728 00729 #ifndef DOXYGEN_SHOULD_IGNORE_THIS 00730 #ifdef GEOS_ADVANCED 00731 #endif 00732 00745 GAIAGEO_DECLARE int gaiaHausdorffDistance (gaiaGeomCollPtr geom1, 00746 gaiaGeomCollPtr geom2, 00747 double *dist); 00748 00769 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom, 00770 double radius, int points, 00771 int left_right); 00772 00793 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr geom, 00794 double radius, 00795 int points, 00796 int left_right); 00797 00814 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSharedPaths (gaiaGeomCollPtr geom1, 00815 gaiaGeomCollPtr geom2); 00816 00834 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineInterpolatePoint (gaiaGeomCollPtr 00835 ln_geom, 00836 double fraction); 00837 00858 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr ln_geom, 00859 double start_fraction, 00860 double end_fraction); 00861 00880 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaShortestLine (gaiaGeomCollPtr geom1, 00881 gaiaGeomCollPtr geom2); 00882 00901 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSnap (gaiaGeomCollPtr geom1, 00902 gaiaGeomCollPtr geom2, 00903 double tolerance); 00904 00920 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineMerge (gaiaGeomCollPtr geom); 00921 00939 GAIAGEO_DECLARE gaiaGeomCollPtr gaiaUnaryUnion (gaiaGeomCollPtr geom); 00940 00954 GAIAGEO_DECLARE double gaiaLineLocatePoint (gaiaGeomCollPtr ln_geom, 00955 gaiaGeomCollPtr pt_geom); 00956 00969 GAIAGEO_DECLARE int gaiaGeomCollCovers (gaiaGeomCollPtr geom1, 00970 gaiaGeomCollPtr geom2); 00971 00985 GAIAGEO_DECLARE int gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, 00986 gaiaGeomCollPtr geom2); 00987 00988 #endif /* end GEOS advanced and experimental features */ 00989 00990 #endif /* end including GEOS */ 00991 00992 #ifdef __cplusplus 00993 } 00994 #endif 00995 00996 #endif /* _GG_ADVANCED_H */