GEOS: geos_c.h Source File

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# geos_c.h

    00001 /************************************************************************
    00002  *
    00003  * $Id: geos_c.h.in 3658 2012-05-30 06:42:49Z strk $
    00004  *
    00005  * C-Wrapper for GEOS library
    00006  *
    00007  * Copyright (C) 2010 2011 Sandro Santilli <strk@keybit.net>
    00008  * Copyright (C) 2005 Refractions Research Inc.
    00009  *
    00010  * This is free software; you can redistribute and/or modify it under
    00011  * the terms of the GNU Lesser General Public Licence as published
    00012  * by the Free Software Foundation.
    00013  * See the COPYING file for more information.
    00014  *
    00015  * Author: Sandro Santilli <strk@refractions.net>
    00016  *
    00017  ***********************************************************************
    00018  *
    00019  * GENERAL NOTES:
    00020  *
    00021  *      - Remember to call initGEOS() before any use of this library's
    00022  *        functions, and call finishGEOS() when done.
    00023  *
    00024  *      - Currently you have to explicitly GEOSGeom_destroy() all
    00025  *        GEOSGeom objects to avoid memory leaks, and to GEOSFree()
    00026  *        all returned char * (unless const).
    00027  *
    00028  ***********************************************************************/
    00029
    00030 #ifndef GEOS_C_H_INCLUDED
    00031 #define GEOS_C_H_INCLUDED
    00032
    00033 #ifndef __cplusplus
    00034 # include <stddef.h> /* for size_t definition */
    00035 #else
    00036 # include <cstddef>
    00037 using std::size_t;
    00038 #endif
    00039
    00040 #ifdef __cplusplus
    00041 extern "C" {
    00042 #endif
    00043
    00044 /************************************************************************
    00045  *
    00046  * Version
    00047  *
    00048  ***********************************************************************/
    00049
    00050 /*
    00051  * Following 'ifdef' hack fixes problem with generating geos_c.h on Windows,
    00052  * when building with Visual C++ compiler.
    00053  *
    00054  */
    00055 #if defined(_MSC_VER)
    00056 #include <geos/version.h>
    00057 #define GEOS_CAPI_VERSION_MAJOR 1
    00058 #define GEOS_CAPI_VERSION_MINOR 7
    00059 #define GEOS_CAPI_VERSION_PATCH 3
    00060 #define GEOS_CAPI_VERSION "3.3.4-CAPI-1.7.3"
    00061 #else
    00062 #ifndef GEOS_VERSION_MAJOR
    00063 #define GEOS_VERSION_MAJOR 3
    00064 #endif
    00065 #ifndef GEOS_VERSION_MINOR
    00066 #define GEOS_VERSION_MINOR 3
    00067 #endif
    00068 #ifndef GEOS_VERSION_PATCH
    00069 #define GEOS_VERSION_PATCH 4
    00070 #endif
    00071 #ifndef GEOS_VERSION
    00072 #define GEOS_VERSION "3.3.4"
    00073 #endif
    00074 #ifndef GEOS_JTS_PORT
    00075 #define GEOS_JTS_PORT "1.12.0"
    00076 #endif
    00077
    00078 #define GEOS_CAPI_VERSION_MAJOR 1
    00079 #define GEOS_CAPI_VERSION_MINOR 7
    00080 #define GEOS_CAPI_VERSION_PATCH 3
    00081 #define GEOS_CAPI_VERSION "3.3.4-CAPI-1.7.3"
    00082 #endif
    00083
    00084 #define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR
    00085 #define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR)
    00086
    00087 /************************************************************************
    00088  *
    00089  * (Abstract) type definitions
    00090  *
    00091  ************************************************************************/
    00092
    00093 typedef void (*GEOSMessageHandler)(const char *fmt, ...);
    00094
    00095 /* When we're included by geos_c.cpp, those are #defined to the original
    00096  * JTS definitions via preprocessor. We don't touch them to allow the
    00097  * compiler to cross-check the declarations. However, for all "normal"
    00098  * C-API users, we need to define them as "opaque" struct pointers, as
    00099  * those clients don't have access to the original C++ headers, by design.
    00100  */
    00101 #ifndef GEOSGeometry
    00102 typedef struct GEOSGeom_t GEOSGeometry;
    00103 typedef struct GEOSPrepGeom_t GEOSPreparedGeometry;
    00104 typedef struct GEOSCoordSeq_t GEOSCoordSequence;
    00105 typedef struct GEOSSTRtree_t GEOSSTRtree;
    00106 typedef struct GEOSBufParams_t GEOSBufferParams;
    00107 #endif
    00108
    00109 /* Those are compatibility definitions for source compatibility
    00110  * with GEOS 2.X clients relying on that type.
    00111  */
    00112 typedef GEOSGeometry* GEOSGeom;
    00113 typedef GEOSCoordSequence* GEOSCoordSeq;
    00114
    00115 /* Supported geometry types
    00116  * This was renamed from GEOSGeomTypeId in GEOS 2.2.X, which might
    00117  * break compatibility, this issue is still under investigation.
    00118  */
    00119
    00120 enum GEOSGeomTypes {
    00121     GEOS_POINT,
    00122     GEOS_LINESTRING,
    00123     GEOS_LINEARRING,
    00124     GEOS_POLYGON,
    00125     GEOS_MULTIPOINT,
    00126     GEOS_MULTILINESTRING,
    00127     GEOS_MULTIPOLYGON,
    00128     GEOS_GEOMETRYCOLLECTION
    00129 };
    00130
    00131 /* Byte oders exposed via the c api */
    00132 enum GEOSByteOrders {
    00133     GEOS_WKB_XDR = 0, /* Big Endian */
    00134     GEOS_WKB_NDR = 1 /* Little Endian */
    00135 };
    00136
    00137 typedef struct GEOSContextHandle_HS *GEOSContextHandle_t;
    00138
    00139 typedef void (*GEOSQueryCallback)(void *item, void *userdata);
    00140
    00141 /************************************************************************
    00142  *
    00143  * Initialization, cleanup, version
    00144  *
    00145  ***********************************************************************/
    00146
    00147 #include <geos/export.h>
    00148
    00149 extern void GEOS_DLL initGEOS(GEOSMessageHandler notice_function,
    00150         GEOSMessageHandler error_function);
    00151 extern void GEOS_DLL finishGEOS(void);
    00152
    00153 extern GEOSContextHandle_t GEOS_DLL initGEOS_r(
    00154                                     GEOSMessageHandler notice_function,
    00155                                     GEOSMessageHandler error_function);
    00156 extern void GEOS_DLL finishGEOS_r(GEOSContextHandle_t handle);
    00157
    00158 extern GEOSMessageHandler GEOS_DLL GEOSContext_setNoticeHandler_r(GEOSContextHandle_t extHandle,
    00159                                                                   GEOSMessageHandler nf);
    00160 extern GEOSMessageHandler GEOS_DLL GEOSContext_setErrorHandler_r(GEOSContextHandle_t extHandle,
    00161                                                                  GEOSMessageHandler nf);
    00162
    00163 extern const char GEOS_DLL *GEOSversion();
    00164
    00165
    00166 /************************************************************************
    00167  *
    00168  * NOTE - These functions are DEPRECATED.  Please use the new Reader and
    00169  * writer APIS!
    00170  *
    00171  ***********************************************************************/
    00172
    00173 extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKT(const char *wkt);
    00174 extern char GEOS_DLL *GEOSGeomToWKT(const GEOSGeometry* g);
    00175
    00176 extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKT_r(GEOSContextHandle_t handle,
    00177                                                 const char *wkt);
    00178 extern char GEOS_DLL *GEOSGeomToWKT_r(GEOSContextHandle_t handle,
    00179                                       const GEOSGeometry* g);
    00180
    00181 /*
    00182  * Specify whether output WKB should be 2d or 3d.
    00183  * Return previously set number of dimensions.
    00184  */
    00185 extern int GEOS_DLL GEOS_getWKBOutputDims();
    00186 extern int GEOS_DLL GEOS_setWKBOutputDims(int newDims);
    00187
    00188 extern int GEOS_DLL GEOS_getWKBOutputDims_r(GEOSContextHandle_t handle);
    00189 extern int GEOS_DLL GEOS_setWKBOutputDims_r(GEOSContextHandle_t handle,
    00190                                             int newDims);
    00191
    00192 /*
    00193  * Specify whether the WKB byte order is big or little endian.
    00194  * The return value is the previous byte order.
    00195  */
    00196 extern int GEOS_DLL GEOS_getWKBByteOrder();
    00197 extern int GEOS_DLL GEOS_setWKBByteOrder(int byteOrder);
    00198
    00199 extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKB_buf(const unsigned char *wkb, size_t size);
    00200 extern unsigned char GEOS_DLL *GEOSGeomToWKB_buf(const GEOSGeometry* g, size_t *size);
    00201
    00202 extern GEOSGeometry GEOS_DLL *GEOSGeomFromHEX_buf(const unsigned char *hex, size_t size);
    00203 extern unsigned char GEOS_DLL *GEOSGeomToHEX_buf(const GEOSGeometry* g, size_t *size);
    00204
    00205 extern int GEOS_DLL GEOS_getWKBByteOrder_r(GEOSContextHandle_t handle);
    00206 extern int GEOS_DLL GEOS_setWKBByteOrder_r(GEOSContextHandle_t handle,
    00207                                            int byteOrder);
    00208
    00209 extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKB_buf_r(GEOSContextHandle_t handle,
    00210                                                     const unsigned char *wkb,
    00211                                                     size_t size);
    00212 extern unsigned char GEOS_DLL *GEOSGeomToWKB_buf_r(GEOSContextHandle_t handle,
    00213                                                    const GEOSGeometry* g,
    00214                                                    size_t *size);
    00215
    00216 extern GEOSGeometry GEOS_DLL *GEOSGeomFromHEX_buf_r(GEOSContextHandle_t handle,
    00217                                                     const unsigned char *hex,
    00218                                                     size_t size);
    00219 extern unsigned char GEOS_DLL *GEOSGeomToHEX_buf_r(GEOSContextHandle_t handle,
    00220                                                    const GEOSGeometry* g,
    00221                                                    size_t *size);
    00222
    00223 /************************************************************************
    00224  *
    00225  * Coordinate Sequence functions
    00226  *
    00227  ***********************************************************************/
    00228
    00229 /*
    00230  * Create a Coordinate sequence with ``size'' coordinates
    00231  * of ``dims'' dimensions.
    00232  * Return NULL on exception.
    00233  */
    00234 extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_create(unsigned int size, unsigned int dims);
    00235
    00236 extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_create_r(
    00237                                                 GEOSContextHandle_t handle,
    00238                                                 unsigned int size,
    00239                                                 unsigned int dims);
    00240
    00241 /*
    00242  * Clone a Coordinate Sequence.
    00243  * Return NULL on exception.
    00244  */
    00245 extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_clone(const GEOSCoordSequence* s);
    00246
    00247 extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_clone_r(
    00248                                                 GEOSContextHandle_t handle,
    00249                                                 const GEOSCoordSequence* s);
    00250
    00251 /*
    00252  * Destroy a Coordinate Sequence.
    00253  */
    00254 extern void GEOS_DLL GEOSCoordSeq_destroy(GEOSCoordSequence* s);
    00255
    00256 extern void GEOS_DLL GEOSCoordSeq_destroy_r(GEOSContextHandle_t handle,
    00257                                             GEOSCoordSequence* s);
    00258
    00259 /*
    00260  * Set ordinate values in a Coordinate Sequence.
    00261  * Return 0 on exception.
    00262  */
    00263 extern int GEOS_DLL GEOSCoordSeq_setX(GEOSCoordSequence* s,
    00264         unsigned int idx, double val);
    00265 extern int GEOS_DLL GEOSCoordSeq_setY(GEOSCoordSequence* s,
    00266         unsigned int idx, double val);
    00267 extern int GEOS_DLL GEOSCoordSeq_setZ(GEOSCoordSequence* s,
    00268         unsigned int idx, double val);
    00269 extern int GEOS_DLL GEOSCoordSeq_setOrdinate(GEOSCoordSequence* s,
    00270         unsigned int idx, unsigned int dim, double val);
    00271
    00272 extern int GEOS_DLL GEOSCoordSeq_setX_r(GEOSContextHandle_t handle,
    00273                                         GEOSCoordSequence* s, unsigned int idx,
    00274                                         double val);
    00275 extern int GEOS_DLL GEOSCoordSeq_setY_r(GEOSContextHandle_t handle,
    00276                                         GEOSCoordSequence* s, unsigned int idx,
    00277                                         double val);
    00278 extern int GEOS_DLL GEOSCoordSeq_setZ_r(GEOSContextHandle_t handle,
    00279                                         GEOSCoordSequence* s, unsigned int idx,
    00280                                         double val);
    00281 extern int GEOS_DLL GEOSCoordSeq_setOrdinate_r(GEOSContextHandle_t handle,
    00282                                                GEOSCoordSequence* s,
    00283                                                unsigned int idx,
    00284                                                unsigned int dim, double val);
    00285
    00286 /*
    00287  * Get ordinate values from a Coordinate Sequence.
    00288  * Return 0 on exception.
    00289  */
    00290 extern int GEOS_DLL GEOSCoordSeq_getX(const GEOSCoordSequence* s,
    00291         unsigned int idx, double *val);
    00292 extern int GEOS_DLL GEOSCoordSeq_getY(const GEOSCoordSequence* s,
    00293         unsigned int idx, double *val);
    00294 extern int GEOS_DLL GEOSCoordSeq_getZ(const GEOSCoordSequence* s,
    00295         unsigned int idx, double *val);
    00296 extern int GEOS_DLL GEOSCoordSeq_getOrdinate(const GEOSCoordSequence* s,
    00297         unsigned int idx, unsigned int dim, double *val);
    00298
    00299 extern int GEOS_DLL GEOSCoordSeq_getX_r(GEOSContextHandle_t handle,
    00300                                         const GEOSCoordSequence* s,
    00301                                         unsigned int idx, double *val);
    00302 extern int GEOS_DLL GEOSCoordSeq_getY_r(GEOSContextHandle_t handle,
    00303                                         const GEOSCoordSequence* s,
    00304                                         unsigned int idx, double *val);
    00305 extern int GEOS_DLL GEOSCoordSeq_getZ_r(GEOSContextHandle_t handle,
    00306                                         const GEOSCoordSequence* s,
    00307                                         unsigned int idx, double *val);
    00308 extern int GEOS_DLL GEOSCoordSeq_getOrdinate_r(GEOSContextHandle_t handle,
    00309                                                const GEOSCoordSequence* s,
    00310                                                unsigned int idx,
    00311                                                unsigned int dim, double *val);
    00312 /*
    00313  * Get size and dimensions info from a Coordinate Sequence.
    00314  * Return 0 on exception.
    00315  */
    00316 extern int GEOS_DLL GEOSCoordSeq_getSize(const GEOSCoordSequence* s,
    00317         unsigned int *size);
    00318 extern int GEOS_DLL GEOSCoordSeq_getDimensions(const GEOSCoordSequence* s,
    00319         unsigned int *dims);
    00320
    00321 extern int GEOS_DLL GEOSCoordSeq_getSize_r(GEOSContextHandle_t handle,
    00322                                            const GEOSCoordSequence* s,
    00323                                            unsigned int *size);
    00324 extern int GEOS_DLL GEOSCoordSeq_getDimensions_r(GEOSContextHandle_t handle,
    00325                                                  const GEOSCoordSequence* s,
    00326                                                  unsigned int *dims);
    00327
    00328 /************************************************************************
    00329  *
    00330  *  Linearref functions -- there are more, but these two are probably
    00331  *  sufficient for most purposes
    00332  *
    00333  ***********************************************************************/
    00334
    00335 /*
    00336  * GEOSGeometry ownership is retained by caller
    00337  */
    00338
    00339
    00340 /* Return distance of point 'p' projected on 'g' from origin
    00341  * of 'g'. Geometry 'g' must be a lineal geometry */
    00342 extern double GEOS_DLL GEOSProject(const GEOSGeometry *g,
    00343                                    const GEOSGeometry* p);
    00344 extern double GEOS_DLL GEOSProject_r(GEOSContextHandle_t handle,
    00345                                      const GEOSGeometry *g,
    00346                                      const GEOSGeometry *p);
    00347
    00348 /* Return closest point to given distance within geometry
    00349  * Geometry must be a LineString */
    00350 extern GEOSGeometry GEOS_DLL *GEOSInterpolate(const GEOSGeometry *g,
    00351                                               double d);
    00352 extern GEOSGeometry GEOS_DLL *GEOSInterpolate_r(GEOSContextHandle_t handle,
    00353                                                 const GEOSGeometry *g,
    00354                                                 double d);
    00355
    00356 extern double GEOS_DLL GEOSProjectNormalized(const GEOSGeometry *g,
    00357                                              const GEOSGeometry* p);
    00358 extern double GEOS_DLL GEOSProjectNormalized_r(GEOSContextHandle_t handle,
    00359                                                const GEOSGeometry *g,
    00360                                                const GEOSGeometry *p);
    00361
    00362 extern GEOSGeometry GEOS_DLL *GEOSInterpolateNormalized(const GEOSGeometry *g,
    00363                                                         double d);
    00364 extern GEOSGeometry GEOS_DLL *GEOSInterpolateNormalized_r(
    00365                                                 GEOSContextHandle_t handle,
    00366                                                 const GEOSGeometry *g,
    00367                                                 double d);
    00368
    00369 /************************************************************************
    00370  *
    00371  * Buffer related functions
    00372  *
    00373  ***********************************************************************/
    00374
    00375 enum GEOSBufCapStyles {
    00376         GEOSBUF_CAP_ROUND=1,
    00377         GEOSBUF_CAP_FLAT=2,
    00378         GEOSBUF_CAP_SQUARE=3
    00379 };
    00380
    00381 enum GEOSBufJoinStyles {
    00382         GEOSBUF_JOIN_ROUND=1,
    00383         GEOSBUF_JOIN_MITRE=2,
    00384         GEOSBUF_JOIN_BEVEL=3
    00385 };
    00386
    00387 /* @return 0 on exception */
    00388 extern GEOSBufferParams GEOS_DLL *GEOSBufferParams_create();
    00389 extern GEOSBufferParams GEOS_DLL *GEOSBufferParams_create_r(
    00390                                               GEOSContextHandle_t handle);
    00391 extern void GEOS_DLL GEOSBufferParams_destroy(GEOSBufferParams* parms);
    00392 extern void GEOS_DLL GEOSBufferParams_destroy_r(
    00393                                               GEOSContextHandle_t handle,
    00394                                               GEOSBufferParams* parms);
    00395
    00396 /* @return 0 on exception */
    00397 extern int GEOS_DLL GEOSBufferParams_setEndCapStyle(
    00398                                               GEOSBufferParams* p,
    00399                                               int style);
    00400 extern int GEOS_DLL GEOSBufferParams_setEndCapStyle_r(
    00401                                               GEOSContextHandle_t handle,
    00402                                               GEOSBufferParams* p,
    00403                                               int style);
    00404
    00405 /* @return 0 on exception */
    00406 extern int GEOS_DLL GEOSBufferParams_setJoinStyle(
    00407                                               GEOSBufferParams* p,
    00408                                               int joinStyle);
    00409 extern int GEOS_DLL GEOSBufferParams_setJoinStyle_r(
    00410                                               GEOSContextHandle_t handle,
    00411                                               GEOSBufferParams* p,
    00412                                               int joinStyle);
    00413
    00414 /* @return 0 on exception */
    00415 extern int GEOS_DLL GEOSBufferParams_setMitreLimit(
    00416                                               GEOSBufferParams* p,
    00417                                               double mitreLimit);
    00418 extern int GEOS_DLL GEOSBufferParams_setMitreLimit_r(
    00419                                               GEOSContextHandle_t handle,
    00420                                               GEOSBufferParams* p,
    00421                                               double mitreLimit);
    00422
    00423 /* @return 0 on exception */
    00424 extern int GEOS_DLL GEOSBufferParams_setQuadrantSegments(
    00425                                               GEOSBufferParams* p,
    00426                                               int quadSegs);
    00427 extern int GEOS_DLL GEOSBufferParams_setQuadrantSegments_r(
    00428                                               GEOSContextHandle_t handle,
    00429                                               GEOSBufferParams* p,
    00430                                               int quadSegs);
    00431
    00432 /* @param singleSided: 1 for single sided, 0 otherwise */
    00433 /* @return 0 on exception */
    00434 extern int GEOS_DLL GEOSBufferParams_setSingleSided(
    00435                                               GEOSBufferParams* p,
    00436                                               int singleSided);
    00437 extern int GEOS_DLL GEOSBufferParams_setSingleSided_r(
    00438                                               GEOSContextHandle_t handle,
    00439                                               GEOSBufferParams* p,
    00440                                               int singleSided);
    00441
    00442 /* @return NULL on exception. */
    00443 extern GEOSGeometry GEOS_DLL *GEOSBufferWithParams(
    00444                                               const GEOSGeometry* g1,
    00445                                               const GEOSBufferParams* p,
    00446                                               double width);
    00447 extern GEOSGeometry GEOS_DLL *GEOSBufferWithParams_r(
    00448                                               GEOSContextHandle_t handle,
    00449                                               const GEOSGeometry* g1,
    00450                                               const GEOSBufferParams* p,
    00451                                               double width);
    00452
    00453 /* These functions return NULL on exception. */
    00454 extern GEOSGeometry GEOS_DLL *GEOSBuffer(const GEOSGeometry* g1,
    00455         double width, int quadsegs);
    00456 extern GEOSGeometry GEOS_DLL *GEOSBuffer_r(GEOSContextHandle_t handle,
    00457                                            const GEOSGeometry* g1,
    00458                                            double width, int quadsegs);
    00459
    00460 /* These functions return NULL on exception. */
    00461 extern GEOSGeometry GEOS_DLL *GEOSBufferWithStyle(const GEOSGeometry* g1,
    00462         double width, int quadsegs, int endCapStyle, int joinStyle,
    00463         double mitreLimit);
    00464 extern GEOSGeometry GEOS_DLL *GEOSBufferWithStyle_r(GEOSContextHandle_t handle,
    00465         const GEOSGeometry* g1, double width, int quadsegs, int endCapStyle,
    00466         int joinStyle, double mitreLimit);
    00467
    00468 /* These functions return NULL on exception. Only LINESTRINGs are accepted. */
    00469 /* @deprecated in 3.3.0: use GEOSOffsetCurve instead */
    00470 extern GEOSGeometry GEOS_DLL *GEOSSingleSidedBuffer(const GEOSGeometry* g1,
    00471         double width, int quadsegs, int joinStyle, double mitreLimit,
    00472         int leftSide);
    00473 extern GEOSGeometry GEOS_DLL *GEOSSingleSidedBuffer_r(
    00474         GEOSContextHandle_t handle,
    00475         const GEOSGeometry* g1, double width, int quadsegs,
    00476         int joinStyle, double mitreLimit, int leftSide);
    00477
    00478 /*
    00479  * Only LINESTRINGs are accepted.
    00480  * @param width : offset distance.
    00481  *                negative for right side offset.
    00482  *                positive for left side offset.
    00483  * @return NULL on exception
    00484  */
    00485 extern GEOSGeometry GEOS_DLL *GEOSOffsetCurve(const GEOSGeometry* g1,
    00486         double width, int quadsegs, int joinStyle, double mitreLimit);
    00487 extern GEOSGeometry GEOS_DLL *GEOSOffsetCurve_r(GEOSContextHandle_t handle,
    00488         const GEOSGeometry* g1, double width, int quadsegs,
    00489         int joinStyle, double mitreLimit);
    00490
    00491
    00492 /************************************************************************
    00493  *
    00494  * Geometry Constructors.
    00495  * GEOSCoordSequence* arguments will become ownership of the returned object.
    00496  * All functions return NULL on exception.
    00497  *
    00498  ***********************************************************************/
    00499
    00500 extern GEOSGeometry GEOS_DLL *GEOSGeom_createPoint(GEOSCoordSequence* s);
    00501 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyPoint();
    00502 extern GEOSGeometry GEOS_DLL *GEOSGeom_createLinearRing(GEOSCoordSequence* s);
    00503 extern GEOSGeometry GEOS_DLL *GEOSGeom_createLineString(GEOSCoordSequence* s);
    00504 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyLineString();
    00505
    00506 extern GEOSGeometry GEOS_DLL *GEOSGeom_createPoint_r(
    00507                                        GEOSContextHandle_t handle,
    00508                                        GEOSCoordSequence* s);
    00509 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyPoint_r(
    00510                                        GEOSContextHandle_t handle);
    00511 extern GEOSGeometry GEOS_DLL *GEOSGeom_createLinearRing_r(
    00512                                        GEOSContextHandle_t handle,
    00513                                        GEOSCoordSequence* s);
    00514 extern GEOSGeometry GEOS_DLL *GEOSGeom_createLineString_r(
    00515                                        GEOSContextHandle_t handle,
    00516                                        GEOSCoordSequence* s);
    00517 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyLineString_r(
    00518                                        GEOSContextHandle_t handle);
    00519
    00520 /*
    00521  * Second argument is an array of GEOSGeometry* objects.
    00522  * The caller remains owner of the array, but pointed-to
    00523  * objects become ownership of the returned GEOSGeometry.
    00524  */
    00525 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyPolygon();
    00526 extern GEOSGeometry GEOS_DLL *GEOSGeom_createPolygon(GEOSGeometry* shell,
    00527         GEOSGeometry** holes, unsigned int nholes);
    00528 extern GEOSGeometry GEOS_DLL *GEOSGeom_createCollection(int type,
    00529         GEOSGeometry* *geoms, unsigned int ngeoms);
    00530 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyCollection(int type);
    00531
    00532 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyPolygon_r(
    00533                                        GEOSContextHandle_t handle);
    00534 extern GEOSGeometry GEOS_DLL *GEOSGeom_createPolygon_r(
    00535                                        GEOSContextHandle_t handle,
    00536                                        GEOSGeometry* shell,
    00537                                        GEOSGeometry** holes,
    00538                                        unsigned int nholes);
    00539 extern GEOSGeometry GEOS_DLL *GEOSGeom_createCollection_r(
    00540                                        GEOSContextHandle_t handle, int type,
    00541                                        GEOSGeometry* *geoms,
    00542                                        unsigned int ngeoms);
    00543 extern GEOSGeometry GEOS_DLL *GEOSGeom_createEmptyCollection_r(
    00544                                        GEOSContextHandle_t handle, int type);
    00545
    00546 extern GEOSGeometry GEOS_DLL *GEOSGeom_clone(const GEOSGeometry* g);
    00547
    00548 extern GEOSGeometry GEOS_DLL *GEOSGeom_clone_r(GEOSContextHandle_t handle,
    00549                                                const GEOSGeometry* g);
    00550
    00551 /************************************************************************
    00552  *
    00553  * Memory management
    00554  *
    00555  ***********************************************************************/
    00556
    00557 extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
    00558
    00559 extern void GEOS_DLL GEOSGeom_destroy_r(GEOSContextHandle_t handle,
    00560                                         GEOSGeometry* g);
    00561
    00562 /************************************************************************
    00563  *
    00564  * Topology operations - return NULL on exception.
    00565  *
    00566  ***********************************************************************/
    00567
    00568 extern GEOSGeometry GEOS_DLL *GEOSEnvelope(const GEOSGeometry* g1);
    00569 extern GEOSGeometry GEOS_DLL *GEOSIntersection(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00570 extern GEOSGeometry GEOS_DLL *GEOSConvexHull(const GEOSGeometry* g1);
    00571 extern GEOSGeometry GEOS_DLL *GEOSDifference(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00572 extern GEOSGeometry GEOS_DLL *GEOSSymDifference(const GEOSGeometry* g1,
    00573         const GEOSGeometry* g2);
    00574 extern GEOSGeometry GEOS_DLL *GEOSBoundary(const GEOSGeometry* g1);
    00575 extern GEOSGeometry GEOS_DLL *GEOSUnion(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00576 extern GEOSGeometry GEOS_DLL *GEOSUnaryUnion(const GEOSGeometry* g1);
    00577
    00578 /* @deprecated in 3.3.0: use GEOSUnaryUnion instead */
    00579 extern GEOSGeometry GEOS_DLL *GEOSUnionCascaded(const GEOSGeometry* g1);
    00580 extern GEOSGeometry GEOS_DLL *GEOSUnionCascaded_r(GEOSContextHandle_t handle, const GEOSGeometry* g1);
    00581
    00582 extern GEOSGeometry GEOS_DLL *GEOSPointOnSurface(const GEOSGeometry* g1);
    00583 extern GEOSGeometry GEOS_DLL *GEOSGetCentroid(const GEOSGeometry* g);
    00584
    00585 extern GEOSGeometry GEOS_DLL *GEOSEnvelope_r(GEOSContextHandle_t handle,
    00586                                              const GEOSGeometry* g1);
    00587 extern GEOSGeometry GEOS_DLL *GEOSIntersection_r(GEOSContextHandle_t handle,
    00588                                                  const GEOSGeometry* g1,
    00589                                                  const GEOSGeometry* g2);
    00590 extern GEOSGeometry GEOS_DLL *GEOSConvexHull_r(GEOSContextHandle_t handle,
    00591                                                const GEOSGeometry* g1);
    00592 extern GEOSGeometry GEOS_DLL *GEOSDifference_r(GEOSContextHandle_t handle,
    00593                                                const GEOSGeometry* g1,
    00594                                                const GEOSGeometry* g2);
    00595 extern GEOSGeometry GEOS_DLL *GEOSSymDifference_r(GEOSContextHandle_t handle,
    00596                                                   const GEOSGeometry* g1,
    00597                                                   const GEOSGeometry* g2);
    00598 extern GEOSGeometry GEOS_DLL *GEOSBoundary_r(GEOSContextHandle_t handle,
    00599                                              const GEOSGeometry* g1);
    00600 extern GEOSGeometry GEOS_DLL *GEOSUnion_r(GEOSContextHandle_t handle,
    00601                                           const GEOSGeometry* g1,
    00602                                           const GEOSGeometry* g2);
    00603 extern GEOSGeometry GEOS_DLL *GEOSUnaryUnion_r(GEOSContextHandle_t handle,
    00604                                           const GEOSGeometry* g);
    00605 extern GEOSGeometry GEOS_DLL *GEOSPointOnSurface_r(GEOSContextHandle_t handle,
    00606                                                    const GEOSGeometry* g1);
    00607 extern GEOSGeometry GEOS_DLL *GEOSGetCentroid_r(GEOSContextHandle_t handle,
    00608                                                 const GEOSGeometry* g);
    00609
    00610 /*
    00611  * all arguments remain ownership of the caller
    00612  * (both Geometries and pointers)
    00613  */
    00614 extern GEOSGeometry GEOS_DLL *GEOSPolygonize(const GEOSGeometry * const geoms[], unsigned int ngeoms);
    00615 extern GEOSGeometry GEOS_DLL *GEOSPolygonizer_getCutEdges(const GEOSGeometry * const geoms[], unsigned int ngeoms);
    00616 /*
    00617  * Polygonizes a set of Geometrys which contain linework that
    00618  * represents the edges of a planar graph.
    00619  *
    00620  * Any dimension of Geometry is handled - the constituent linework
    00621  * is extracted to form the edges.
    00622  *
    00623  * The edges must be correctly noded; that is, they must only meet
    00624  * at their endpoints.
    00625  * The Polygonizer will still run on incorrectly noded input
    00626  * but will not form polygons from incorrected noded edges.
    00627  *
    00628  * The Polygonizer reports the follow kinds of errors:
    00629  *
    00630  * - Dangles - edges which have one or both ends which are
    00631  *   not incident on another edge endpoint
    00632  * - Cut Edges - edges which are connected at both ends but
    00633  *   which do not form part of polygon
    00634  * - Invalid Ring Lines - edges which form rings which are invalid
    00635  *   (e.g. the component lines contain a self-intersection)
    00636  *
    00637  * Errors are reported to output parameters "cuts", "dangles" and
    00638  * "invalid" (if not-null). Formed polygons are returned as a
    00639  * collection. NULL is returned on exception. All returned
    00640  * geometries must be destroyed by caller.
    00641  *
    00642  */
    00643 extern GEOSGeometry GEOS_DLL *GEOSPolygonize_full(const GEOSGeometry* input,
    00644         GEOSGeometry** cuts, GEOSGeometry** dangles, GEOSGeometry** invalid);
    00645
    00646 extern GEOSGeometry GEOS_DLL *GEOSLineMerge(const GEOSGeometry* g);
    00647 extern GEOSGeometry GEOS_DLL *GEOSSimplify(const GEOSGeometry* g1, double tolerance);
    00648 extern GEOSGeometry GEOS_DLL *GEOSTopologyPreserveSimplify(const GEOSGeometry* g1,
    00649         double tolerance);
    00650
    00651 extern GEOSGeometry GEOS_DLL *GEOSPolygonize_r(GEOSContextHandle_t handle,
    00652                               const GEOSGeometry *const geoms[],
    00653                               unsigned int ngeoms);
    00654 extern GEOSGeometry GEOS_DLL *GEOSPolygonizer_getCutEdges_r(
    00655                               GEOSContextHandle_t handle,
    00656                               const GEOSGeometry * const geoms[],
    00657                               unsigned int ngeoms);
    00658 extern GEOSGeometry GEOS_DLL *GEOSPolygonize_full_r(GEOSContextHandle_t handle,
    00659                               const GEOSGeometry* input, GEOSGeometry** cuts,
    00660                               GEOSGeometry** dangles, GEOSGeometry** invalidRings);
    00661
    00662 extern GEOSGeometry GEOS_DLL *GEOSLineMerge_r(GEOSContextHandle_t handle,
    00663                                               const GEOSGeometry* g);
    00664 extern GEOSGeometry GEOS_DLL *GEOSSimplify_r(GEOSContextHandle_t handle,
    00665                                              const GEOSGeometry* g1,
    00666                                              double tolerance);
    00667 extern GEOSGeometry GEOS_DLL *GEOSTopologyPreserveSimplify_r(
    00668                               GEOSContextHandle_t handle,
    00669                               const GEOSGeometry* g1, double tolerance);
    00670
    00671 /*
    00672  * Return all distinct vertices of input geometry as a MULTIPOINT.
    00673  * Note that only 2 dimensions of the vertices are considered when
    00674  * testing for equality.
    00675  */
    00676 extern GEOSGeometry GEOS_DLL *GEOSGeom_extractUniquePoints(
    00677                               const GEOSGeometry* g);
    00678 extern GEOSGeometry GEOS_DLL *GEOSGeom_extractUniquePoints_r(
    00679                               GEOSContextHandle_t handle,
    00680                               const GEOSGeometry* g);
    00681
    00682 /*
    00683  * Find paths shared between the two given lineal geometries.
    00684  *
    00685  * Returns a GEOMETRYCOLLECTION having two elements:
    00686  * - first element is a MULTILINESTRING containing shared paths
    00687  *   having the _same_ direction on both inputs
    00688  * - second element is a MULTILINESTRING containing shared paths
    00689  *   having the _opposite_ direction on the two inputs
    00690  *
    00691  * Returns NULL on exception
    00692  */
    00693 extern GEOSGeometry GEOS_DLL *GEOSSharedPaths(const GEOSGeometry* g1,
    00694   const GEOSGeometry* g2);
    00695 extern GEOSGeometry GEOS_DLL *GEOSSharedPaths_r(GEOSContextHandle_t handle,
    00696   const GEOSGeometry* g1, const GEOSGeometry* g2);
    00697
    00698 /*
    00699  * Snap first geometry on to second with given tolerance
    00700  * Returns a newly allocated geometry, or NULL on exception
    00701  */
    00702 extern GEOSGeometry GEOS_DLL *GEOSSnap(const GEOSGeometry* g1,
    00703   const GEOSGeometry* g2, double tolerance);
    00704 extern GEOSGeometry GEOS_DLL *GEOSSnap_r(GEOSContextHandle_t handle,
    00705   const GEOSGeometry* g1, const GEOSGeometry* g2, double tolerance);
    00706
    00707 /************************************************************************
    00708  *
    00709  *  Binary predicates - return 2 on exception, 1 on true, 0 on false
    00710  *
    00711  ***********************************************************************/
    00712
    00713 extern char GEOS_DLL GEOSDisjoint(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00714 extern char GEOS_DLL GEOSTouches(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00715 extern char GEOS_DLL GEOSIntersects(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00716 extern char GEOS_DLL GEOSCrosses(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00717 extern char GEOS_DLL GEOSWithin(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00718 extern char GEOS_DLL GEOSContains(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00719 extern char GEOS_DLL GEOSOverlaps(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00720 extern char GEOS_DLL GEOSEquals(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00721 extern char GEOS_DLL GEOSEqualsExact(const GEOSGeometry* g1, const GEOSGeometry* g2, double tolerance);
    00722 extern char GEOS_DLL GEOSCovers(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00723 extern char GEOS_DLL GEOSCoveredBy(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00724
    00725 extern char GEOS_DLL GEOSDisjoint_r(GEOSContextHandle_t handle,
    00726                                     const GEOSGeometry* g1,
    00727                                     const GEOSGeometry* g2);
    00728 extern char GEOS_DLL GEOSTouches_r(GEOSContextHandle_t handle,
    00729                                    const GEOSGeometry* g1,
    00730                                    const GEOSGeometry* g2);
    00731 extern char GEOS_DLL GEOSIntersects_r(GEOSContextHandle_t handle,
    00732                                       const GEOSGeometry* g1,
    00733                                       const GEOSGeometry* g2);
    00734 extern char GEOS_DLL GEOSCrosses_r(GEOSContextHandle_t handle,
    00735                                    const GEOSGeometry* g1,
    00736                                    const GEOSGeometry* g2);
    00737 extern char GEOS_DLL GEOSWithin_r(GEOSContextHandle_t handle,
    00738                                   const GEOSGeometry* g1,
    00739                                   const GEOSGeometry* g2);
    00740 extern char GEOS_DLL GEOSContains_r(GEOSContextHandle_t handle,
    00741                                     const GEOSGeometry* g1,
    00742                                     const GEOSGeometry* g2);
    00743 extern char GEOS_DLL GEOSOverlaps_r(GEOSContextHandle_t handle,
    00744                                     const GEOSGeometry* g1,
    00745                                     const GEOSGeometry* g2);
    00746 extern char GEOS_DLL GEOSEquals_r(GEOSContextHandle_t handle,
    00747                                   const GEOSGeometry* g1,
    00748                                   const GEOSGeometry* g2);
    00749 extern char GEOS_DLL GEOSEqualsExact_r(GEOSContextHandle_t handle,
    00750                                        const GEOSGeometry* g1,
    00751                                        const GEOSGeometry* g2,
    00752                                        double tolerance);
    00753 extern char GEOS_DLL GEOSCovers_r(GEOSContextHandle_t handle,
    00754                                   const GEOSGeometry* g1,
    00755                                   const GEOSGeometry* g2);
    00756 extern char GEOS_DLL GEOSCoveredBy_r(GEOSContextHandle_t handle,
    00757                                   const GEOSGeometry* g1,
    00758                                   const GEOSGeometry* g2);
    00759
    00760 /************************************************************************
    00761  *
    00762  *  Prepared Geometry Binary predicates - return 2 on exception, 1 on true, 0 on false
    00763  *
    00764  ***********************************************************************/
    00765
    00766 /*
    00767  * GEOSGeometry ownership is retained by caller
    00768  */
    00769 extern const GEOSPreparedGeometry GEOS_DLL *GEOSPrepare(const GEOSGeometry* g);
    00770
    00771 extern void GEOS_DLL GEOSPreparedGeom_destroy(const GEOSPreparedGeometry* g);
    00772
    00773 extern char GEOS_DLL GEOSPreparedContains(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00774 extern char GEOS_DLL GEOSPreparedContainsProperly(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00775 extern char GEOS_DLL GEOSPreparedCoveredBy(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00776 extern char GEOS_DLL GEOSPreparedCovers(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00777 extern char GEOS_DLL GEOSPreparedCrosses(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00778 extern char GEOS_DLL GEOSPreparedDisjoint(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00779 extern char GEOS_DLL GEOSPreparedIntersects(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00780 extern char GEOS_DLL GEOSPreparedOverlaps(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00781 extern char GEOS_DLL GEOSPreparedTouches(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00782 extern char GEOS_DLL GEOSPreparedWithin(const GEOSPreparedGeometry* pg1, const GEOSGeometry* g2);
    00783
    00784 /*
    00785  * GEOSGeometry ownership is retained by caller
    00786  */
    00787 extern const GEOSPreparedGeometry GEOS_DLL *GEOSPrepare_r(
    00788                                             GEOSContextHandle_t handle,
    00789                                             const GEOSGeometry* g);
    00790
    00791 extern void GEOS_DLL GEOSPreparedGeom_destroy_r(GEOSContextHandle_t handle,
    00792                                                 const GEOSPreparedGeometry* g);
    00793
    00794 extern char GEOS_DLL GEOSPreparedContains_r(GEOSContextHandle_t handle,
    00795                                             const GEOSPreparedGeometry* pg1,
    00796                                             const GEOSGeometry* g2);
    00797 extern char GEOS_DLL GEOSPreparedContainsProperly_r(GEOSContextHandle_t handle,
    00798                                          const GEOSPreparedGeometry* pg1,
    00799                                          const GEOSGeometry* g2);
    00800 extern char GEOS_DLL GEOSPreparedCoveredBy_r(GEOSContextHandle_t handle,
    00801                                           const GEOSPreparedGeometry* pg1,
    00802                                           const GEOSGeometry* g2);
    00803 extern char GEOS_DLL GEOSPreparedCovers_r(GEOSContextHandle_t handle,
    00804                                           const GEOSPreparedGeometry* pg1,
    00805                                           const GEOSGeometry* g2);
    00806 extern char GEOS_DLL GEOSPreparedCrosses_r(GEOSContextHandle_t handle,
    00807                                           const GEOSPreparedGeometry* pg1,
    00808                                           const GEOSGeometry* g2);
    00809 extern char GEOS_DLL GEOSPreparedDisjoint_r(GEOSContextHandle_t handle,
    00810                                           const GEOSPreparedGeometry* pg1,
    00811                                           const GEOSGeometry* g2);
    00812 extern char GEOS_DLL GEOSPreparedIntersects_r(GEOSContextHandle_t handle,
    00813                                               const GEOSPreparedGeometry* pg1,
    00814                                               const GEOSGeometry* g2);
    00815 extern char GEOS_DLL GEOSPreparedOverlaps_r(GEOSContextHandle_t handle,
    00816                                           const GEOSPreparedGeometry* pg1,
    00817                                           const GEOSGeometry* g2);
    00818 extern char GEOS_DLL GEOSPreparedTouches_r(GEOSContextHandle_t handle,
    00819                                           const GEOSPreparedGeometry* pg1,
    00820                                           const GEOSGeometry* g2);
    00821 extern char GEOS_DLL GEOSPreparedWithin_r(GEOSContextHandle_t handle,
    00822                                           const GEOSPreparedGeometry* pg1,
    00823                                           const GEOSGeometry* g2);
    00824
    00825 /************************************************************************
    00826  *
    00827  *  STRtree functions
    00828  *
    00829  ***********************************************************************/
    00830
    00831 /*
    00832  * GEOSGeometry ownership is retained by caller
    00833  */
    00834
    00835 extern GEOSSTRtree GEOS_DLL *GEOSSTRtree_create(size_t nodeCapacity);
    00836 extern void GEOS_DLL GEOSSTRtree_insert(GEOSSTRtree *tree,
    00837                                         const GEOSGeometry *g,
    00838                                         void *item);
    00839 extern void GEOS_DLL GEOSSTRtree_query(GEOSSTRtree *tree,
    00840                                        const GEOSGeometry *g,
    00841                                        GEOSQueryCallback callback,
    00842                                        void *userdata);
    00843 extern void GEOS_DLL GEOSSTRtree_iterate(GEOSSTRtree *tree,
    00844                                        GEOSQueryCallback callback,
    00845                                        void *userdata);
    00846 extern char GEOS_DLL GEOSSTRtree_remove(GEOSSTRtree *tree,
    00847                                         const GEOSGeometry *g,
    00848                                         void *item);
    00849 extern void GEOS_DLL GEOSSTRtree_destroy(GEOSSTRtree *tree);
    00850
    00851
    00852 extern GEOSSTRtree GEOS_DLL *GEOSSTRtree_create_r(
    00853                                     GEOSContextHandle_t handle,
    00854                                     size_t nodeCapacity);
    00855 extern void GEOS_DLL GEOSSTRtree_insert_r(GEOSContextHandle_t handle,
    00856                                           GEOSSTRtree *tree,
    00857                                           const GEOSGeometry *g,
    00858                                           void *item);
    00859 extern void GEOS_DLL GEOSSTRtree_query_r(GEOSContextHandle_t handle,
    00860                                          GEOSSTRtree *tree,
    00861                                          const GEOSGeometry *g,
    00862                                          GEOSQueryCallback callback,
    00863                                          void *userdata);
    00864 extern void GEOS_DLL GEOSSTRtree_iterate_r(GEOSContextHandle_t handle,
    00865                                        GEOSSTRtree *tree,
    00866                                        GEOSQueryCallback callback,
    00867                                        void *userdata);
    00868 extern char GEOS_DLL GEOSSTRtree_remove_r(GEOSContextHandle_t handle,
    00869                                           GEOSSTRtree *tree,
    00870                                           const GEOSGeometry *g,
    00871                                           void *item);
    00872 extern void GEOS_DLL GEOSSTRtree_destroy_r(GEOSContextHandle_t handle,
    00873                                            GEOSSTRtree *tree);
    00874
    00875
    00876 /************************************************************************
    00877  *
    00878  *  Unary predicate - return 2 on exception, 1 on true, 0 on false
    00879  *
    00880  ***********************************************************************/
    00881
    00882 extern char GEOS_DLL GEOSisEmpty(const GEOSGeometry* g1);
    00883 extern char GEOS_DLL GEOSisSimple(const GEOSGeometry* g1);
    00884 extern char GEOS_DLL GEOSisRing(const GEOSGeometry* g1);
    00885 extern char GEOS_DLL GEOSHasZ(const GEOSGeometry* g1);
    00886 extern char GEOS_DLL GEOSisClosed(const GEOSGeometry *g1);
    00887
    00888 extern char GEOS_DLL GEOSisEmpty_r(GEOSContextHandle_t handle,
    00889                                    const GEOSGeometry* g1);
    00890 extern char GEOS_DLL GEOSisSimple_r(GEOSContextHandle_t handle,
    00891                                     const GEOSGeometry* g1);
    00892 extern char GEOS_DLL GEOSisRing_r(GEOSContextHandle_t handle,
    00893                                   const GEOSGeometry* g1);
    00894 extern char GEOS_DLL GEOSHasZ_r(GEOSContextHandle_t handle,
    00895                                 const GEOSGeometry* g1);
    00896 extern char GEOS_DLL GEOSisClosed_r(GEOSContextHandle_t handle,
    00897                                 const GEOSGeometry *g1);
    00898
    00899 /************************************************************************
    00900  *
    00901  *  Dimensionally Extended 9 Intersection Model related
    00902  *
    00903  ***********************************************************************/
    00904
    00905 /* These are for use with GEOSRelateBoundaryNodeRule (flags param) */
    00906 enum GEOSRelateBoundaryNodeRules {
    00907         /* MOD2 and OGC are the same rule, and is the default
    00908          * used by GEOSRelatePattern
    00909          */
    00910         GEOSRELATE_BNR_MOD2=1,
    00911         GEOSRELATE_BNR_OGC=1,
    00912         GEOSRELATE_BNR_ENDPOINT=2,
    00913         GEOSRELATE_BNR_MULTIVALENT_ENDPOINT=3,
    00914         GEOSRELATE_BNR_MONOVALENT_ENDPOINT=4
    00915 };
    00916
    00917 /* return 2 on exception, 1 on true, 0 on false */
    00918 extern char GEOS_DLL GEOSRelatePattern(const GEOSGeometry* g1, const GEOSGeometry* g2, const char *pat);
    00919 extern char GEOS_DLL GEOSRelatePattern_r(GEOSContextHandle_t handle,
    00920                                          const GEOSGeometry* g1,
    00921                                          const GEOSGeometry* g2,
    00922                                          const char *pat);
    00923
    00924 /* return NULL on exception, a string to GEOSFree otherwise */
    00925 extern char GEOS_DLL *GEOSRelate(const GEOSGeometry* g1, const GEOSGeometry* g2);
    00926 extern char GEOS_DLL *GEOSRelate_r(GEOSContextHandle_t handle,
    00927                                    const GEOSGeometry* g1,
    00928                                    const GEOSGeometry* g2);
    00929
    00930 /* return 2 on exception, 1 on true, 0 on false */
    00931 extern char GEOS_DLL GEOSRelatePatternMatch(const char* mat, const char *pat);
    00932 extern char GEOS_DLL GEOSRelatePatternMatch_r(GEOSContextHandle_t handle,
    00933                                          const char* mat,
    00934                                          const char *pat);
    00935
    00936 /* return NULL on exception, a string to GEOSFree otherwise */
    00937 extern char GEOS_DLL *GEOSRelateBoundaryNodeRule(const GEOSGeometry* g1,
    00938                                                  const GEOSGeometry* g2,
    00939                                                  int bnr);
    00940 extern char GEOS_DLL *GEOSRelateBoundaryNodeRule_r(GEOSContextHandle_t handle,
    00941                                                    const GEOSGeometry* g1,
    00942                                                    const GEOSGeometry* g2,
    00943                                                    int bnr);
    00944
    00945 /************************************************************************
    00946  *
    00947  *  Validity checking
    00948  *
    00949  ***********************************************************************/
    00950
    00951 /* These are for use with GEOSisValidDetail (flags param) */
    00952 enum GEOSValidFlags {
    00953         GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE=1
    00954 };
    00955
    00956 /* return 2 on exception, 1 on true, 0 on false */
    00957 extern char GEOS_DLL GEOSisValid(const GEOSGeometry* g1);
    00958 extern char GEOS_DLL GEOSisValid_r(GEOSContextHandle_t handle,
    00959                                    const GEOSGeometry* g1);
    00960
    00961 /* return NULL on exception, a string to GEOSFree otherwise */
    00962 extern char GEOS_DLL *GEOSisValidReason(const GEOSGeometry *g1);
    00963 extern char GEOS_DLL *GEOSisValidReason_r(GEOSContextHandle_t handle,
    00964                                          const GEOSGeometry* g1);
    00965
    00966 /*
    00967  * Caller has the responsibility to destroy 'reason' (GEOSFree)
    00968  * and 'location' (GEOSGeom_destroy) params
    00969  * return 2 on exception, 1 when valid, 0 when invalid
    00970  */
    00971 extern char GEOS_DLL GEOSisValidDetail(const GEOSGeometry* g,
    00972                                        int flags,
    00973                                        char** reason, GEOSGeometry** location);
    00974 extern char GEOS_DLL GEOSisValidDetail_r(GEOSContextHandle_t handle,
    00975                                          const GEOSGeometry* g,
    00976                                          int flags,
    00977                                          char** reason,
    00978                                          GEOSGeometry** location);
    00979
    00980 /************************************************************************
    00981  *
    00982  *  Geometry info
    00983  *
    00984  ***********************************************************************/
    00985
    00986 /* Return NULL on exception, result must be freed by caller. */
    00987 extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g1);
    00988
    00989 extern char GEOS_DLL *GEOSGeomType_r(GEOSContextHandle_t handle,
    00990                                      const GEOSGeometry* g1);
    00991
    00992 /* Return -1 on exception */
    00993 extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g1);
    00994
    00995 extern int GEOS_DLL GEOSGeomTypeId_r(GEOSContextHandle_t handle,
    00996                                      const GEOSGeometry* g1);
    00997
    00998 /* Return 0 on exception */
    00999 extern int GEOS_DLL GEOSGetSRID(const GEOSGeometry* g);
    01000 extern int GEOS_DLL GEOSGetSRID_r(GEOSContextHandle_t handle,
    01001                                   const GEOSGeometry* g);
    01002
    01003 extern void GEOS_DLL GEOSSetSRID(GEOSGeometry* g, int SRID);
    01004 extern void GEOS_DLL GEOSSetSRID_r(GEOSContextHandle_t handle,
    01005                                    GEOSGeometry* g, int SRID);
    01006
    01007 /* May be called on all geometries in GEOS 3.x, returns -1 on error and 1
    01008  * for non-multi geometries. Older GEOS versions only accept
    01009  * GeometryCollections or Multi* geometries here, and are likely to crash
    01010  * when feeded simple geometries, so beware if you need compatibility with
    01011  * old GEOS versions.
    01012  */
    01013 extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
    01014
    01015 extern int GEOS_DLL GEOSGetNumGeometries_r(GEOSContextHandle_t handle,
    01016                                            const GEOSGeometry* g);
    01017
    01018 /*
    01019  * Return NULL on exception.
    01020  * Returned object is a pointer to internal storage:
    01021  * it must NOT be destroyed directly.
    01022  * Up to GEOS 3.2.0 the input geometry must be a Collection, in
    01023  * later version it doesn't matter (getGeometryN(0) for a single will
    01024  * return the input).
    01025  */
    01026 extern const GEOSGeometry GEOS_DLL *GEOSGetGeometryN(const GEOSGeometry* g, int n);
    01027
    01028 extern const GEOSGeometry GEOS_DLL *GEOSGetGeometryN_r(
    01029                                     GEOSContextHandle_t handle,
    01030                                     const GEOSGeometry* g, int n);
    01031
    01032 /* Return -1 on exception */
    01033 extern int GEOS_DLL GEOSNormalize(GEOSGeometry* g1);
    01034
    01035 extern int GEOS_DLL GEOSNormalize_r(GEOSContextHandle_t handle,
    01036                                     GEOSGeometry* g1);
    01037
    01038 /* Return -1 on exception */
    01039 extern int GEOS_DLL GEOSGetNumInteriorRings(const GEOSGeometry* g1);
    01040
    01041 extern int GEOS_DLL GEOSGetNumInteriorRings_r(GEOSContextHandle_t handle,
    01042                                               const GEOSGeometry* g1);
    01043
    01044 /* Return -1 on exception, Geometry must be a LineString. */
    01045 extern int GEOS_DLL GEOSGeomGetNumPoints(const GEOSGeometry* g1);
    01046
    01047 extern int GEOS_DLL GEOSGeomGetNumPoints_r(GEOSContextHandle_t handle,
    01048                                        const GEOSGeometry* g1);
    01049
    01050 /* Return -1 on exception, Geometry must be a Point. */
    01051 extern int GEOS_DLL GEOSGeomGetX(const GEOSGeometry *g1, double *x);
    01052 extern int GEOS_DLL GEOSGeomGetY(const GEOSGeometry *g1, double *y);
    01053
    01054 extern int GEOS_DLL GEOSGeomGetX_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, double *x);
    01055 extern int GEOS_DLL GEOSGeomGetY_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, double *y);
    01056
    01057 /*
    01058  * Return NULL on exception, Geometry must be a Polygon.
    01059  * Returned object is a pointer to internal storage:
    01060  * it must NOT be destroyed directly.
    01061  */
    01062 extern const GEOSGeometry GEOS_DLL *GEOSGetInteriorRingN(const GEOSGeometry* g, int n);
    01063
    01064 extern const GEOSGeometry GEOS_DLL *GEOSGetInteriorRingN_r(
    01065                                     GEOSContextHandle_t handle,
    01066                                     const GEOSGeometry* g, int n);
    01067
    01068 /*
    01069  * Return NULL on exception, Geometry must be a Polygon.
    01070  * Returned object is a pointer to internal storage:
    01071  * it must NOT be destroyed directly.
    01072  */
    01073 extern const GEOSGeometry GEOS_DLL *GEOSGetExteriorRing(const GEOSGeometry* g);
    01074
    01075 extern const GEOSGeometry GEOS_DLL *GEOSGetExteriorRing_r(
    01076                                     GEOSContextHandle_t handle,
    01077                                     const GEOSGeometry* g);
    01078
    01079 /* Return -1 on exception */
    01080 extern int GEOS_DLL GEOSGetNumCoordinates(const GEOSGeometry* g1);
    01081
    01082 extern int GEOS_DLL GEOSGetNumCoordinates_r(GEOSContextHandle_t handle,
    01083                                             const GEOSGeometry* g1);
    01084
    01085 /*
    01086  * Return NULL on exception.
    01087  * Geometry must be a LineString, LinearRing or Point.
    01088  */
    01089 extern const GEOSCoordSequence GEOS_DLL *GEOSGeom_getCoordSeq(const GEOSGeometry* g);
    01090
    01091 extern const GEOSCoordSequence GEOS_DLL *GEOSGeom_getCoordSeq_r(
    01092                                          GEOSContextHandle_t handle,
    01093                                          const GEOSGeometry* g);
    01094
    01095 /*
    01096  * Return 0 on exception (or empty geometry)
    01097  */
    01098 extern int GEOS_DLL GEOSGeom_getDimensions(const GEOSGeometry* g);
    01099
    01100 extern int GEOS_DLL GEOSGeom_getDimensions_r(GEOSContextHandle_t handle,
    01101                                              const GEOSGeometry* g);
    01102
    01103 /*
    01104  * Return 2 or 3.
    01105  */
    01106 extern int GEOS_DLL GEOSGeom_getCoordinateDimension(const GEOSGeometry* g);
    01107
    01108 extern int GEOS_DLL GEOSGeom_getCoordinateDimension_r(GEOSContextHandle_t handle,
    01109                                                       const GEOSGeometry* g);
    01110
    01111 /*
    01112  * Return NULL on exception.
    01113  * Must be LineString and must be freed by called.
    01114  */
    01115 extern GEOSGeometry GEOS_DLL *GEOSGeomGetPointN(const GEOSGeometry *g1, int n);
    01116 extern GEOSGeometry GEOS_DLL *GEOSGeomGetStartPoint(const GEOSGeometry *g1);
    01117 extern GEOSGeometry GEOS_DLL *GEOSGeomGetEndPoint(const GEOSGeometry *g1);
    01118
    01119 extern GEOSGeometry GEOS_DLL *GEOSGeomGetPointN_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, int n);
    01120 extern GEOSGeometry GEOS_DLL *GEOSGeomGetStartPoint_r(GEOSContextHandle_t handle, const GEOSGeometry *g1);
    01121 extern GEOSGeometry GEOS_DLL *GEOSGeomGetEndPoint_r(GEOSContextHandle_t handle, const GEOSGeometry *g1);
    01122
    01123 /************************************************************************
    01124  *
    01125  *  Misc functions
    01126  *
    01127  ***********************************************************************/
    01128
    01129 /* Return 0 on exception, 1 otherwise */
    01130 extern int GEOS_DLL GEOSArea(const GEOSGeometry* g1, double *area);
    01131 extern int GEOS_DLL GEOSLength(const GEOSGeometry* g1, double *length);
    01132 extern int GEOS_DLL GEOSDistance(const GEOSGeometry* g1, const GEOSGeometry* g2,
    01133         double *dist);
    01134 extern int GEOS_DLL GEOSHausdorffDistance(const GEOSGeometry *g1,
    01135         const GEOSGeometry *g2, double *dist);
    01136 extern int GEOS_DLL GEOSHausdorffDistanceDensify(const GEOSGeometry *g1,
    01137         const GEOSGeometry *g2, double densifyFrac, double *dist);
    01138 extern int GEOS_DLL GEOSGeomGetLength(const GEOSGeometry *g1, double *length);
    01139 extern int GEOS_DLL GEOSArea_r(GEOSContextHandle_t handle,
    01140                                const GEOSGeometry* g1, double *area);
    01141 extern int GEOS_DLL GEOSLength_r(GEOSContextHandle_t handle,
    01142                                  const GEOSGeometry* g1, double *length);
    01143 extern int GEOS_DLL GEOSDistance_r(GEOSContextHandle_t handle,
    01144                                    const GEOSGeometry* g1,
    01145                                    const GEOSGeometry* g2, double *dist);
    01146 extern int GEOS_DLL GEOSHausdorffDistance_r(GEOSContextHandle_t handle,
    01147                                    const GEOSGeometry *g1,
    01148                                    const GEOSGeometry *g2,
    01149                                    double *dist);
    01150 extern int GEOS_DLL GEOSHausdorffDistanceDensify_r(GEOSContextHandle_t handle,
    01151                                    const GEOSGeometry *g1,
    01152                                    const GEOSGeometry *g2,
    01153                                    double densifyFrac, double *dist);
    01154 extern int GEOS_DLL GEOSGeomGetLength_r(GEOSContextHandle_t handle,
    01155                                    const GEOSGeometry *g1, double *length);
    01156
    01157 /************************************************************************
    01158  *
    01159  * Algorithms
    01160  *
    01161  ***********************************************************************/
    01162
    01163 /* Walking from A to B:
    01164  *  return -1 if reaching P takes a counter-clockwise (left) turn
    01165  *  return  1 if reaching P takes a clockwise (right) turn
    01166  *  return  0 if P is collinear with A-B
    01167  *
    01168  * On exceptions, return 2.
    01169  *
    01170  */
    01171 extern int GEOS_DLL GEOSOrientationIndex(double Ax, double Ay, double Bx, double By,
    01172         double Px, double Py);
    01173 extern int GEOS_DLL GEOSOrientationIndex_r(GEOSContextHandle_t handle,
    01174         double Ax, double Ay, double Bx, double By, double Px, double Py);
    01175
    01176
    01177 /************************************************************************
    01178  *
    01179  * Reader and Writer APIs
    01180  *
    01181  ***********************************************************************/
    01182
    01183 typedef struct GEOSWKTReader_t GEOSWKTReader;
    01184 typedef struct GEOSWKTWriter_t GEOSWKTWriter;
    01185 typedef struct GEOSWKBReader_t GEOSWKBReader;
    01186 typedef struct GEOSWKBWriter_t GEOSWKBWriter;
    01187
    01188
    01189 /* WKT Reader */
    01190 extern GEOSWKTReader GEOS_DLL *GEOSWKTReader_create();
    01191 extern void GEOS_DLL GEOSWKTReader_destroy(GEOSWKTReader* reader);
    01192 extern GEOSGeometry GEOS_DLL *GEOSWKTReader_read(GEOSWKTReader* reader, const char *wkt);
    01193
    01194 extern GEOSWKTReader GEOS_DLL *GEOSWKTReader_create_r(
    01195                                              GEOSContextHandle_t handle);
    01196 extern void GEOS_DLL GEOSWKTReader_destroy_r(GEOSContextHandle_t handle,
    01197                                              GEOSWKTReader* reader);
    01198 extern GEOSGeometry GEOS_DLL *GEOSWKTReader_read_r(GEOSContextHandle_t handle,
    01199                                                    GEOSWKTReader* reader,
    01200                                                    const char *wkt);
    01201
    01202 /* WKT Writer */
    01203 extern GEOSWKTWriter GEOS_DLL *GEOSWKTWriter_create();
    01204 extern void GEOS_DLL GEOSWKTWriter_destroy(GEOSWKTWriter* writer);
    01205 extern char GEOS_DLL *GEOSWKTWriter_write(GEOSWKTWriter* reader, const GEOSGeometry* g);
    01206 extern void GEOS_DLL GEOSWKTWriter_setTrim(GEOSWKTWriter *writer, char trim);
    01207 extern void GEOS_DLL GEOSWKTWriter_setRoundingPrecision(GEOSWKTWriter *writer, int precision);
    01208 extern void GEOS_DLL GEOSWKTWriter_setOutputDimension(GEOSWKTWriter *writer, int dim);
    01209 extern int  GEOS_DLL GEOSWKTWriter_getOutputDimension(GEOSWKTWriter *writer);
    01210 extern void GEOS_DLL GEOSWKTWriter_setOld3D(GEOSWKTWriter *writer, int useOld3D);
    01211
    01212 extern GEOSWKTWriter GEOS_DLL *GEOSWKTWriter_create_r(
    01213                                              GEOSContextHandle_t handle);
    01214 extern void GEOS_DLL GEOSWKTWriter_destroy_r(GEOSContextHandle_t handle,
    01215                                              GEOSWKTWriter* writer);
    01216 extern char GEOS_DLL *GEOSWKTWriter_write_r(GEOSContextHandle_t handle,
    01217                                             GEOSWKTWriter* reader,
    01218                                             const GEOSGeometry* g);
    01219 extern void GEOS_DLL GEOSWKTWriter_setTrim_r(GEOSContextHandle_t handle,
    01220                                             GEOSWKTWriter *writer,
    01221                                             char trim);
    01222 extern void GEOS_DLL GEOSWKTWriter_setRoundingPrecision_r(GEOSContextHandle_t handle,
    01223                                             GEOSWKTWriter *writer,
    01224                                             int precision);
    01225 extern void GEOS_DLL GEOSWKTWriter_setOutputDimension_r(GEOSContextHandle_t handle,
    01226                                                         GEOSWKTWriter *writer,
    01227                                                         int dim);
    01228 extern int  GEOS_DLL GEOSWKTWriter_getOutputDimension_r(GEOSContextHandle_t handle,
    01229                                                         GEOSWKTWriter *writer);
    01230 extern void GEOS_DLL GEOSWKTWriter_setOld3D_r(GEOSContextHandle_t handle,
    01231                                               GEOSWKTWriter *writer,
    01232                                               int useOld3D);
    01233
    01234 /* WKB Reader */
    01235 extern GEOSWKBReader GEOS_DLL *GEOSWKBReader_create();
    01236 extern void GEOS_DLL GEOSWKBReader_destroy(GEOSWKBReader* reader);
    01237 extern GEOSGeometry GEOS_DLL *GEOSWKBReader_read(GEOSWKBReader* reader, const unsigned char *wkb, size_t size);
    01238 extern GEOSGeometry GEOS_DLL *GEOSWKBReader_readHEX(GEOSWKBReader* reader, const unsigned char *hex, size_t size);
    01239
    01240 extern GEOSWKBReader GEOS_DLL *GEOSWKBReader_create_r(
    01241                                              GEOSContextHandle_t handle);
    01242 extern void GEOS_DLL GEOSWKBReader_destroy_r(GEOSContextHandle_t handle,
    01243                                              GEOSWKBReader* reader);
    01244 extern GEOSGeometry GEOS_DLL *GEOSWKBReader_read_r(GEOSContextHandle_t handle,
    01245                                                    GEOSWKBReader* reader,
    01246                                                    const unsigned char *wkb,
    01247                                                    size_t size);
    01248 extern GEOSGeometry GEOS_DLL *GEOSWKBReader_readHEX_r(
    01249                                             GEOSContextHandle_t handle,
    01250                                             GEOSWKBReader* reader,
    01251                                             const unsigned char *hex,
    01252                                             size_t size);
    01253
    01254 /* WKB Writer */
    01255 extern GEOSWKBWriter GEOS_DLL *GEOSWKBWriter_create();
    01256 extern void GEOS_DLL GEOSWKBWriter_destroy(GEOSWKBWriter* writer);
    01257
    01258 extern GEOSWKBWriter GEOS_DLL *GEOSWKBWriter_create_r(
    01259                                              GEOSContextHandle_t handle);
    01260 extern void GEOS_DLL GEOSWKBWriter_destroy_r(GEOSContextHandle_t handle,
    01261                                              GEOSWKBWriter* writer);
    01262
    01263 /* The caller owns the results for these two methods! */
    01264 extern unsigned char GEOS_DLL *GEOSWKBWriter_write(GEOSWKBWriter* writer, const GEOSGeometry* g, size_t *size);
    01265 extern unsigned char GEOS_DLL *GEOSWKBWriter_writeHEX(GEOSWKBWriter* writer, const GEOSGeometry* g, size_t *size);
    01266
    01267 extern unsigned char GEOS_DLL *GEOSWKBWriter_write_r(
    01268                                              GEOSContextHandle_t handle,
    01269                                              GEOSWKBWriter* writer,
    01270                                              const GEOSGeometry* g,
    01271                                              size_t *size);
    01272 extern unsigned char GEOS_DLL *GEOSWKBWriter_writeHEX_r(
    01273                                              GEOSContextHandle_t handle,
    01274                                              GEOSWKBWriter* writer,
    01275                                              const GEOSGeometry* g,
    01276                                              size_t *size);
    01277
    01278 /*
    01279  * Specify whether output WKB should be 2d or 3d.
    01280  * Return previously set number of dimensions.
    01281  */
    01282 extern int GEOS_DLL GEOSWKBWriter_getOutputDimension(const GEOSWKBWriter* writer);
    01283 extern void GEOS_DLL GEOSWKBWriter_setOutputDimension(GEOSWKBWriter* writer, int newDimension);
    01284
    01285 extern int GEOS_DLL GEOSWKBWriter_getOutputDimension_r(
    01286                                   GEOSContextHandle_t handle,
    01287                                   const GEOSWKBWriter* writer);
    01288 extern void GEOS_DLL GEOSWKBWriter_setOutputDimension_r(
    01289                                    GEOSContextHandle_t handle,
    01290                                    GEOSWKBWriter* writer, int newDimension);
    01291
    01292 /*
    01293  * Specify whether the WKB byte order is big or little endian.
    01294  * The return value is the previous byte order.
    01295  */
    01296 extern int GEOS_DLL GEOSWKBWriter_getByteOrder(const GEOSWKBWriter* writer);
    01297 extern void GEOS_DLL GEOSWKBWriter_setByteOrder(GEOSWKBWriter* writer, int byteOrder);
    01298
    01299 extern int GEOS_DLL GEOSWKBWriter_getByteOrder_r(GEOSContextHandle_t handle,
    01300                                                  const GEOSWKBWriter* writer);
    01301 extern void GEOS_DLL GEOSWKBWriter_setByteOrder_r(GEOSContextHandle_t handle,
    01302                                                   GEOSWKBWriter* writer,
    01303                                                   int byteOrder);
    01304
    01305 /*
    01306  * Specify whether SRID values should be output.
    01307  */
    01308 extern char GEOS_DLL GEOSWKBWriter_getIncludeSRID(const GEOSWKBWriter* writer);
    01309 extern void GEOS_DLL GEOSWKBWriter_setIncludeSRID(GEOSWKBWriter* writer, const char writeSRID);
    01310
    01311 extern char GEOS_DLL GEOSWKBWriter_getIncludeSRID_r(GEOSContextHandle_t handle,
    01312                                    const GEOSWKBWriter* writer);
    01313 extern void GEOS_DLL GEOSWKBWriter_setIncludeSRID_r(GEOSContextHandle_t handle,
    01314                                    GEOSWKBWriter* writer, const char writeSRID);
    01315
    01316
    01317 /*
    01318  * Free buffers returned by stuff like GEOSWKBWriter_write(),
    01319  * GEOSWKBWriter_writeHEX() and GEOSWKTWriter_write().
    01320  */
    01321 extern void GEOS_DLL GEOSFree( void *buffer );
    01322 extern void GEOS_DLL GEOSFree_r( GEOSContextHandle_t handle, void *buffer );
    01323
    01324 #ifdef __cplusplus
    01325 } // extern "C"
    01326 #endif
    01327
    01328 #endif /* #ifndef GEOS_C_H_INCLUDED */