GEOS 3.14.0dev
geos_c.h
Go to the documentation of this file.
1/************************************************************************
2 *
3 * C-Wrapper for GEOS library
4 *
5 * Copyright (C) 2010 2011 Sandro Santilli <strk@kbt.io>
6 * Copyright (C) 2005 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 ***********************************************************************/
13
40#ifndef GEOS_C_H_INCLUDED
41#define GEOS_C_H_INCLUDED
42
43#ifndef __cplusplus
44# include <stddef.h> /* for size_t definition */
45#else
46# include <cstddef>
47using std::size_t;
48#endif
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54/* ====================================================================== */
55/* Version */
56/* ====================================================================== */
57
60#ifndef GEOS_VERSION_MAJOR
61#define GEOS_VERSION_MAJOR 3
62#endif
63#ifndef GEOS_VERSION_MINOR
64#define GEOS_VERSION_MINOR 14
65#endif
66#ifndef GEOS_VERSION_PATCH
67#define GEOS_VERSION_PATCH 0dev
68#endif
69#ifndef GEOS_VERSION
70#define GEOS_VERSION "3.14.0dev"
71#endif
72#ifndef GEOS_JTS_PORT
73#define GEOS_JTS_PORT "1.18.0"
74#endif
75
76#define GEOS_CAPI_VERSION_MAJOR 1
77#define GEOS_CAPI_VERSION_MINOR 20
78#define GEOS_CAPI_VERSION_PATCH 0
79#define GEOS_CAPI_VERSION "3.14.0dev-CAPI-1.20.0"
80
81#define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR
82#define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR)
83
86#include <geos/export.h>
87
88
95typedef struct GEOSContextHandle_HS *GEOSContextHandle_t;
96
105typedef void (*GEOSMessageHandler)(GEOS_PRINTF_FORMAT const char *fmt, ...)
106 GEOS_PRINTF_FORMAT_ATTR(1, 2);
107
118typedef void (*GEOSMessageHandler_r)(const char *message, void *userdata);
119
120/*
121* When we're included by geos_c.cpp, these types are #defined to the
122* C++ definitions via preprocessor. We don't touch them to allow the
123* compiler to cross-check the declarations. However, for all "normal"
124* C-API users, we need to define these types as "opaque" struct pointers, as
125* those clients don't have access to the original C++ headers, by design.
126*/
127#ifndef GEOSGeometry
128
140typedef struct GEOSGeom_t GEOSGeometry;
141
147typedef struct GEOSPrepGeom_t GEOSPreparedGeometry;
148
155typedef struct GEOSCoordSeq_t GEOSCoordSequence;
156
162typedef struct GEOSSTRtree_t GEOSSTRtree;
163
169typedef struct GEOSBufParams_t GEOSBufferParams;
170
176typedef struct GEOSMakeValidParams_t GEOSMakeValidParams;
177
178#endif
179
182/*
183* These are compatibility definitions for source compatibility
184* with GEOS 2.X clients relying on that type.
185*/
186typedef GEOSGeometry* GEOSGeom;
187typedef GEOSCoordSequence* GEOSCoordSeq;
188
215 GEOS_CIRCULARSTRING,
216 GEOS_COMPOUNDCURVE,
217 GEOS_CURVEPOLYGON,
218 GEOS_MULTICURVE,
219 GEOS_MULTISURFACE,
220};
221
234
250
258typedef void (*GEOSQueryCallback)(void *item, void *userdata);
259
277typedef int (*GEOSDistanceCallback)(
278 const void* item1,
279 const void* item2,
280 double* distance,
281 void* userdata);
282
283
297 double* x,
298 double* y,
299 void* userdata);
300
301
316 double* x,
317 double* y,
318 double* z,
319 void* userdata);
320
321
322/* ========== Interruption ========== */
323
332typedef void (GEOSInterruptCallback)(void);
333
343
348extern void GEOS_DLL GEOS_interruptRequest(void);
349
354extern void GEOS_DLL GEOS_interruptCancel(void);
355
356/* ========== Initialization and Cleanup ========== */
357
366extern GEOSContextHandle_t GEOS_DLL GEOS_init_r(void);
367
375extern void GEOS_DLL GEOS_finish_r(GEOSContextHandle_t handle);
376
386 GEOSContextHandle_t extHandle,
388
400 GEOSContextHandle_t extHandle,
402
413 GEOSContextHandle_t extHandle,
415 void *userData);
416
429 GEOSContextHandle_t extHandle,
431 void *userData);
432
433/* ========== Coordinate Sequence functions ========== */
434
437 GEOSContextHandle_t handle,
438 unsigned int size,
439 unsigned int dims);
440
443 GEOSContextHandle_t handle,
444 const double* buf,
445 unsigned int size,
446 int hasZ,
447 int hasM);
448
451 GEOSContextHandle_t handle,
452 const double* x,
453 const double* y,
454 const double* z,
455 const double* m,
456 unsigned int size);
457
459extern int GEOS_DLL GEOSCoordSeq_copyToBuffer_r(
460 GEOSContextHandle_t handle,
461 const GEOSCoordSequence* s,
462 double* buf,
463 int hasZ,
464 int hasM);
465
467extern int GEOS_DLL GEOSCoordSeq_copyToArrays_r(
468 GEOSContextHandle_t handle,
469 const GEOSCoordSequence* s,
470 double* x,
471 double* y,
472 double* z,
473 double* m);
474
477 GEOSContextHandle_t handle,
478 const GEOSCoordSequence* s);
479
481extern void GEOS_DLL GEOSCoordSeq_destroy_r(
482 GEOSContextHandle_t handle,
484
486extern int GEOS_DLL GEOSCoordSeq_setX_r(
487 GEOSContextHandle_t handle,
488 GEOSCoordSequence* s, unsigned int idx,
489 double val);
490
492extern int GEOS_DLL GEOSCoordSeq_setY_r(
493 GEOSContextHandle_t handle,
494 GEOSCoordSequence* s, unsigned int idx,
495 double val);
496
498extern int GEOS_DLL GEOSCoordSeq_setZ_r(
499 GEOSContextHandle_t handle,
500 GEOSCoordSequence* s, unsigned int idx,
501 double val);
502
504extern int GEOS_DLL GEOSCoordSeq_setXY_r(
505 GEOSContextHandle_t handle,
506 GEOSCoordSequence* s, unsigned int idx,
507 double x, double y);
508
510extern int GEOS_DLL GEOSCoordSeq_setXYZ_r(
511 GEOSContextHandle_t handle,
512 GEOSCoordSequence* s, unsigned int idx,
513 double x, double y, double z);
514
516extern int GEOS_DLL GEOSCoordSeq_setOrdinate_r(
517 GEOSContextHandle_t handle,
519 unsigned int idx,
520 unsigned int dim, double val);
521
523extern int GEOS_DLL GEOSCoordSeq_getX_r(
524 GEOSContextHandle_t handle,
525 const GEOSCoordSequence* s,
526 unsigned int idx, double *val);
527
529extern int GEOS_DLL GEOSCoordSeq_getY_r(
530 GEOSContextHandle_t handle,
531 const GEOSCoordSequence* s,
532 unsigned int idx, double *val);
533
535extern int GEOS_DLL GEOSCoordSeq_getZ_r(
536 GEOSContextHandle_t handle,
537 const GEOSCoordSequence* s,
538 unsigned int idx, double *val);
539
541extern int GEOS_DLL GEOSCoordSeq_getXY_r(
542 GEOSContextHandle_t handle,
543 const GEOSCoordSequence* s,
544 unsigned int idx,
545 double *x, double *y);
546
548extern int GEOS_DLL GEOSCoordSeq_getXYZ_r(
549 GEOSContextHandle_t handle,
550 const GEOSCoordSequence* s,
551 unsigned int idx,
552 double *x, double *y, double *z);
553
555extern int GEOS_DLL GEOSCoordSeq_getOrdinate_r(
556 GEOSContextHandle_t handle,
557 const GEOSCoordSequence* s,
558 unsigned int idx,
559 unsigned int dim, double *val);
560
562extern int GEOS_DLL GEOSCoordSeq_getSize_r(
563 GEOSContextHandle_t handle,
564 const GEOSCoordSequence* s,
565 unsigned int *size);
566
569 GEOSContextHandle_t handle,
570 const GEOSCoordSequence* s,
571 unsigned int *dims);
572
574extern int GEOS_DLL GEOSCoordSeq_isCCW_r(
575 GEOSContextHandle_t handle,
576 const GEOSCoordSequence* s,
577 char* is_ccw);
578
579/* ========= Linear referencing functions ========= */
580
582extern double GEOS_DLL GEOSProject_r(
583 GEOSContextHandle_t handle,
584 const GEOSGeometry *line,
585 const GEOSGeometry *point);
586
589 GEOSContextHandle_t handle,
590 const GEOSGeometry *line,
591 double d);
592
594extern double GEOS_DLL GEOSProjectNormalized_r(
595 GEOSContextHandle_t handle,
596 const GEOSGeometry *g,
597 const GEOSGeometry *p);
598
601 GEOSContextHandle_t handle,
602 const GEOSGeometry *g,
603 double d);
604
605/* ========== Buffer related functions ========== */
606
608extern GEOSGeometry GEOS_DLL *GEOSBuffer_r(
609 GEOSContextHandle_t handle,
610 const GEOSGeometry* g,
611 double width, int quadsegs);
612
628
650
653 GEOSContextHandle_t handle);
654
656extern void GEOS_DLL GEOSBufferParams_destroy_r(
657 GEOSContextHandle_t handle,
658 GEOSBufferParams* parms);
659
662 GEOSContextHandle_t handle,
664 int style);
665
668 GEOSContextHandle_t handle,
670 int joinStyle);
671
674 GEOSContextHandle_t handle,
676 double mitreLimit);
677
680 GEOSContextHandle_t handle,
682 int quadSegs);
683
686 GEOSContextHandle_t handle,
688 int singleSided);
689
692 GEOSContextHandle_t handle,
693 const GEOSGeometry* g,
694 const GEOSBufferParams* p,
695 double width);
696
699 GEOSContextHandle_t handle,
700 const GEOSGeometry* g,
701 double width, int quadsegs, int endCapStyle,
702 int joinStyle, double mitreLimit);
703
706 GEOSContextHandle_t handle,
707 const GEOSGeometry* g,
708 double tolerance);
709
712 GEOSContextHandle_t handle,
713 const GEOSGeometry* g, double width, int quadsegs,
714 int joinStyle, double mitreLimit);
715
716
717/* ========= Geometry Constructors ========= */
718
721 GEOSContextHandle_t handle,
723
726 GEOSContextHandle_t handle,
727 double x, double y);
728
731 GEOSContextHandle_t handle);
732
735 GEOSContextHandle_t handle,
737
740 GEOSContextHandle_t handle,
742
745 GEOSContextHandle_t handle);
746
749 GEOSContextHandle_t handle);
750
753 GEOSContextHandle_t handle,
754 GEOSGeometry* shell,
755 GEOSGeometry** holes,
756 unsigned int nholes);
757
760 GEOSContextHandle_t handle,
761 int type,
762 GEOSGeometry* *geoms,
763 unsigned int ngeoms);
764
767 GEOSContextHandle_t handle,
768 GEOSGeometry * collection,
769 unsigned int * ngeoms);
770
773 GEOSContextHandle_t handle, int type);
774
777 GEOSContextHandle_t handle,
778 double xmin, double ymin,
779 double xmax, double ymax);
780
783 GEOSContextHandle_t handle,
784 const GEOSGeometry* g);
785
788 GEOSContextHandle_t handle,
790
793 GEOSContextHandle_t handle);
794
797 GEOSContextHandle_t handle,
798 GEOSGeometry** curves,
799 unsigned int ncurves);
800
803 GEOSContextHandle_t handle);
804
807 GEOSContextHandle_t handle,
808 GEOSGeometry* shell,
809 GEOSGeometry** holes,
810 unsigned int nholes);
811
814 GEOSContextHandle_t handle);
815
816/* ========= Memory management ========= */
817
819extern void GEOS_DLL GEOSGeom_destroy_r(
820 GEOSContextHandle_t handle,
821 GEOSGeometry* g);
822
823/* ========= Coverages ========= */
824
826extern GEOSGeometry GEOS_DLL *
828 GEOSContextHandle_t handle,
829 const GEOSGeometry* g);
830
832extern int GEOS_DLL
834 GEOSContextHandle_t extHandle,
835 const GEOSGeometry* input,
836 double gapWidth,
837 GEOSGeometry** output);
838
840extern GEOSGeometry GEOS_DLL *
842 GEOSContextHandle_t extHandle,
843 const GEOSGeometry* input,
844 double tolerance,
845 int preserveBoundary);
846
847/* ========= Topology Operations ========= */
848
851 GEOSContextHandle_t handle,
852 const GEOSGeometry* g);
853
856 GEOSContextHandle_t handle,
857 const GEOSGeometry* g1,
858 const GEOSGeometry* g2);
859
862 GEOSContextHandle_t handle,
863 const GEOSGeometry* g1,
864 const GEOSGeometry* g2,
865 double gridSize);
866
869 GEOSContextHandle_t handle,
870 const GEOSGeometry* g);
871
874 GEOSContextHandle_t handle,
875 const GEOSGeometry* g,
876 double ratio,
877 unsigned int allowHoles);
878
881 GEOSContextHandle_t handle,
882 const GEOSGeometry* g,
883 double ratio,
884 unsigned int allowHoles);
885
888 GEOSContextHandle_t handle,
889 const GEOSGeometry* g,
890 unsigned int isOuter,
891 double vertexNumFraction);
892
895 GEOSContextHandle_t handle,
896 const GEOSGeometry* g,
897 unsigned int isOuter,
898 unsigned int parameterMode,
899 double parameter);
900
903 GEOSContextHandle_t handle,
904 const GEOSGeometry* g,
905 double lengthRatio,
906 unsigned int isTight,
907 unsigned int isHolesAllowed);
908
911 GEOSContextHandle_t handle,
912 const GEOSGeometry* g);
913
916 GEOSContextHandle_t handle,
917 const GEOSGeometry* g,
918 double tolerance);
919
922 GEOSContextHandle_t handle,
923 const GEOSGeometry* g,
924 const GEOSGeometry* boundary,
925 double tolerance);
926
929 GEOSContextHandle_t handle,
930 const GEOSGeometry* g);
931
934 GEOSContextHandle_t handle,
935 const GEOSGeometry* g);
936
938extern int GEOS_DLL GEOSMinimumClearance_r(
939 GEOSContextHandle_t handle,
940 const GEOSGeometry* g,
941 double* distance);
942
945 GEOSContextHandle_t handle,
946 const GEOSGeometry* g1,
947 const GEOSGeometry* g2);
948
951 GEOSContextHandle_t handle,
952 const GEOSGeometry* g1,
953 const GEOSGeometry* g2,
954 double gridSize);
955
958 GEOSContextHandle_t handle,
959 const GEOSGeometry* g1,
960 const GEOSGeometry* g2);
961
964 GEOSContextHandle_t handle,
965 const GEOSGeometry* g1,
966 const GEOSGeometry* g2,
967 double gridSize);
968
971 GEOSContextHandle_t handle,
972 const GEOSGeometry* g);
973
975extern GEOSGeometry GEOS_DLL *GEOSUnion_r(
976 GEOSContextHandle_t handle,
977 const GEOSGeometry* g1,
978 const GEOSGeometry* g2);
979
982 GEOSContextHandle_t handle,
983 const GEOSGeometry* g1,
984 const GEOSGeometry* g2,
985 double gridSize);
986
989 GEOSContextHandle_t handle,
990 const GEOSGeometry* g);
991
994 GEOSContextHandle_t handle,
995 const GEOSGeometry* g,
996 double gridSize);
997
1000 GEOSContextHandle_t handle,
1001 const GEOSGeometry* g);
1002
1005 GEOSContextHandle_t handle,
1006 const GEOSGeometry* g);
1007
1010 GEOSContextHandle_t handle,
1011 const GEOSGeometry* g);
1012
1015 GEOSContextHandle_t handle,
1016 const GEOSGeometry* g,
1017 double* radius,
1018 GEOSGeometry** center);
1019
1021extern GEOSGeometry GEOS_DLL *GEOSNode_r(
1022 GEOSContextHandle_t handle,
1023 const GEOSGeometry* g);
1024
1027 GEOSContextHandle_t handle,
1028 const GEOSGeometry* g,
1029 double xmin, double ymin,
1030 double xmax, double ymax);
1031
1034 GEOSContextHandle_t handle,
1035 const GEOSGeometry *const geoms[],
1036 unsigned int ngeoms);
1037
1040 GEOSContextHandle_t handle,
1041 const GEOSGeometry *const geoms[],
1042 unsigned int ngems);
1043
1046 GEOSContextHandle_t handle,
1047 const GEOSGeometry * const geoms[],
1048 unsigned int ngeoms);
1049
1052 GEOSContextHandle_t handle,
1053 const GEOSGeometry* input,
1054 GEOSGeometry** cuts,
1055 GEOSGeometry** dangles,
1056 GEOSGeometry** invalidRings);
1057
1060 GEOSContextHandle_t handle,
1061 const GEOSGeometry* g);
1062
1065 GEOSContextHandle_t handle,
1066 const GEOSGeometry* g);
1067
1070 GEOSContextHandle_t handle,
1071 const GEOSGeometry* g);
1072
1075 GEOSContextHandle_t handle,
1076 const GEOSGeometry* g,
1077 double start_fraction,
1078 double end_fdraction);
1079
1082 GEOSContextHandle_t handle,
1083 const GEOSGeometry* g);
1084
1087 GEOSContextHandle_t handle,
1088 const GEOSGeometry* g,
1089 double tolerance);
1090
1093 GEOSContextHandle_t handle,
1094 const GEOSGeometry* g, double tolerance);
1095
1098 GEOSContextHandle_t handle,
1099 const GEOSGeometry* g);
1100
1103 GEOSContextHandle_t handle,
1104 const GEOSGeometry* g1,
1105 const GEOSGeometry* g2);
1106
1108extern GEOSGeometry GEOS_DLL *GEOSSnap_r(
1109 GEOSContextHandle_t handle,
1110 const GEOSGeometry* g1,
1111 const GEOSGeometry* g2,
1112 double tolerance);
1113
1116 GEOSContextHandle_t handle,
1117 const GEOSGeometry *g,
1118 double tolerance,
1119 int onlyEdges);
1120
1123 GEOSContextHandle_t handle,
1124 const GEOSGeometry *g);
1125
1128 GEOSContextHandle_t extHandle,
1129 const GEOSGeometry *g,
1130 const GEOSGeometry *env,
1131 double tolerance,
1132 int flags);
1133
1135extern int GEOS_DLL GEOSSegmentIntersection_r(
1136 GEOSContextHandle_t extHandle,
1137 double ax0, double ay0,
1138 double ax1, double ay1,
1139 double bx0, double by0,
1140 double bx1, double by1,
1141 double* cx, double* cy);
1142
1143/* ========= Binary predicates ========= */
1144
1146extern char GEOS_DLL GEOSDisjoint_r(
1147 GEOSContextHandle_t handle,
1148 const GEOSGeometry* g1,
1149 const GEOSGeometry* g2);
1150
1152extern char GEOS_DLL GEOSTouches_r(
1153 GEOSContextHandle_t handle,
1154 const GEOSGeometry* g1,
1155 const GEOSGeometry* g2);
1156
1158extern char GEOS_DLL GEOSIntersects_r(
1159 GEOSContextHandle_t handle,
1160 const GEOSGeometry* g1,
1161 const GEOSGeometry* g2);
1162
1164extern char GEOS_DLL GEOSCrosses_r(
1165 GEOSContextHandle_t handle,
1166 const GEOSGeometry* g1,
1167 const GEOSGeometry* g2);
1168
1170extern char GEOS_DLL GEOSWithin_r(
1171 GEOSContextHandle_t handle,
1172 const GEOSGeometry* g1,
1173 const GEOSGeometry* g2);
1174
1176extern char GEOS_DLL GEOSContains_r(
1177 GEOSContextHandle_t handle,
1178 const GEOSGeometry* g1,
1179 const GEOSGeometry* g2);
1180
1182extern char GEOS_DLL GEOSOverlaps_r(
1183 GEOSContextHandle_t handle,
1184 const GEOSGeometry* g1,
1185 const GEOSGeometry* g2);
1186
1188extern char GEOS_DLL GEOSEquals_r(
1189 GEOSContextHandle_t handle,
1190 const GEOSGeometry* g1,
1191 const GEOSGeometry* g2);
1192
1194extern char GEOS_DLL GEOSEqualsExact_r(
1195 GEOSContextHandle_t handle,
1196 const GEOSGeometry* g1,
1197 const GEOSGeometry* g2,
1198 double tolerance);
1199
1201extern char GEOS_DLL GEOSEqualsIdentical_r(
1202 GEOSContextHandle_t handle,
1203 const GEOSGeometry* g1,
1204 const GEOSGeometry* g2);
1205
1207extern char GEOS_DLL GEOSCovers_r(
1208 GEOSContextHandle_t handle,
1209 const GEOSGeometry* g1,
1210 const GEOSGeometry* g2);
1211
1213extern char GEOS_DLL GEOSCoveredBy_r(
1214 GEOSContextHandle_t handle,
1215 const GEOSGeometry* g1,
1216 const GEOSGeometry* g2);
1217
1218/* ========= Prepared Geometry Binary Predicates ========== */
1219
1222 GEOSContextHandle_t handle,
1223 const GEOSGeometry* g);
1224
1226extern void GEOS_DLL GEOSPreparedGeom_destroy_r(
1227 GEOSContextHandle_t handle,
1228 const GEOSPreparedGeometry* g);
1229
1231extern char GEOS_DLL GEOSPreparedContains_r(
1232 GEOSContextHandle_t handle,
1233 const GEOSPreparedGeometry* pg1,
1234 const GEOSGeometry* g2);
1235
1237extern char GEOS_DLL GEOSPreparedContainsXY_r(
1238 GEOSContextHandle_t handle,
1239 const GEOSPreparedGeometry* pg1,
1240 double x,
1241 double y);
1242
1245 GEOSContextHandle_t handle,
1246 const GEOSPreparedGeometry* pg1,
1247 const GEOSGeometry* g2);
1248
1250extern char GEOS_DLL GEOSPreparedCoveredBy_r(
1251 GEOSContextHandle_t handle,
1252 const GEOSPreparedGeometry* pg1,
1253 const GEOSGeometry* g2);
1254
1256extern char GEOS_DLL GEOSPreparedCovers_r(
1257 GEOSContextHandle_t handle,
1258 const GEOSPreparedGeometry* pg1,
1259 const GEOSGeometry* g2);
1260
1262extern char GEOS_DLL GEOSPreparedCrosses_r(
1263 GEOSContextHandle_t handle,
1264 const GEOSPreparedGeometry* pg1,
1265 const GEOSGeometry* g2);
1266
1268extern char GEOS_DLL GEOSPreparedDisjoint_r(
1269 GEOSContextHandle_t handle,
1270 const GEOSPreparedGeometry* pg1,
1271 const GEOSGeometry* g2);
1272
1274extern char GEOS_DLL GEOSPreparedIntersects_r(
1275 GEOSContextHandle_t handle,
1276 const GEOSPreparedGeometry* pg1,
1277 const GEOSGeometry* g2);
1278
1280extern char GEOS_DLL GEOSPreparedIntersectsXY_r(
1281 GEOSContextHandle_t handle,
1282 const GEOSPreparedGeometry* pg1,
1283 double x,
1284 double y);
1285
1287extern char GEOS_DLL GEOSPreparedOverlaps_r(
1288 GEOSContextHandle_t handle,
1289 const GEOSPreparedGeometry* pg1,
1290 const GEOSGeometry* g2);
1291
1293extern char GEOS_DLL GEOSPreparedTouches_r(
1294 GEOSContextHandle_t handle,
1295 const GEOSPreparedGeometry* pg1,
1296 const GEOSGeometry* g2);
1297
1299extern char GEOS_DLL GEOSPreparedWithin_r(
1300 GEOSContextHandle_t handle,
1301 const GEOSPreparedGeometry* pg1,
1302 const GEOSGeometry* g2);
1303
1305extern char GEOS_DLL * GEOSPreparedRelate_r(
1306 GEOSContextHandle_t handle,
1307 const GEOSPreparedGeometry* pg1,
1308 const GEOSGeometry* g2);
1309
1311extern char GEOS_DLL GEOSPreparedRelatePattern_r(
1312 GEOSContextHandle_t handle,
1313 const GEOSPreparedGeometry* pg1,
1314 const GEOSGeometry* g2,
1315 const char* im);
1316
1319 GEOSContextHandle_t handle,
1320 const GEOSPreparedGeometry* pg1,
1321 const GEOSGeometry* g2);
1322
1324extern int GEOS_DLL GEOSPreparedDistance_r(
1325 GEOSContextHandle_t handle,
1326 const GEOSPreparedGeometry* pg1,
1327 const GEOSGeometry* g2, double *dist);
1328
1330extern char GEOS_DLL GEOSPreparedDistanceWithin_r(
1331 GEOSContextHandle_t handle,
1332 const GEOSPreparedGeometry* pg1,
1333 const GEOSGeometry* g2, double dist);
1334
1335/* ========== STRtree ========== */
1336
1339 GEOSContextHandle_t handle,
1340 size_t nodeCapacity);
1341
1343extern int GEOS_DLL GEOSSTRtree_build_r(
1344 GEOSContextHandle_t handle,
1345 GEOSSTRtree *tree);
1346
1348extern void GEOS_DLL GEOSSTRtree_insert_r(
1349 GEOSContextHandle_t handle,
1350 GEOSSTRtree *tree,
1351 const GEOSGeometry *g,
1352 void *item);
1353
1355extern void GEOS_DLL GEOSSTRtree_query_r(
1356 GEOSContextHandle_t handle,
1357 GEOSSTRtree *tree,
1358 const GEOSGeometry *g,
1359 GEOSQueryCallback callback,
1360 void *userdata);
1361
1364 GEOSContextHandle_t handle,
1365 GEOSSTRtree *tree,
1366 const GEOSGeometry* geom);
1367
1369extern const void GEOS_DLL *GEOSSTRtree_nearest_generic_r(
1370 GEOSContextHandle_t handle,
1371 GEOSSTRtree *tree,
1372 const void* item,
1373 const GEOSGeometry* itemEnvelope,
1374 GEOSDistanceCallback distancefn,
1375 void* userdata);
1376
1378extern void GEOS_DLL GEOSSTRtree_iterate_r(
1379 GEOSContextHandle_t handle,
1380 GEOSSTRtree *tree,
1381 GEOSQueryCallback callback,
1382 void *userdata);
1383
1385extern char GEOS_DLL GEOSSTRtree_remove_r(
1386 GEOSContextHandle_t handle,
1387 GEOSSTRtree *tree,
1388 const GEOSGeometry *g,
1389 void *item);
1390
1392extern void GEOS_DLL GEOSSTRtree_destroy_r(
1393 GEOSContextHandle_t handle,
1394 GEOSSTRtree *tree);
1395
1396
1397/* ========= Unary predicate ========= */
1398
1400extern char GEOS_DLL GEOSisEmpty_r(
1401 GEOSContextHandle_t handle,
1402 const GEOSGeometry* g);
1403
1405extern char GEOS_DLL GEOSisSimple_r(
1406 GEOSContextHandle_t handle,
1407 const GEOSGeometry* g);
1408
1410extern char GEOS_DLL GEOSisRing_r(
1411 GEOSContextHandle_t handle,
1412 const GEOSGeometry* g);
1413
1415extern char GEOS_DLL GEOSHasZ_r(
1416 GEOSContextHandle_t handle,
1417 const GEOSGeometry* g);
1418
1420extern char GEOS_DLL GEOSHasM_r(
1421 GEOSContextHandle_t handle,
1422 const GEOSGeometry* g);
1423
1425extern char GEOS_DLL GEOSisClosed_r(
1426 GEOSContextHandle_t handle,
1427 const GEOSGeometry *g);
1428
1429/* ========== Dimensionally Extended 9 Intersection Model ========== */
1430
1447
1449extern char GEOS_DLL GEOSRelatePattern_r(
1450 GEOSContextHandle_t handle,
1451 const GEOSGeometry* g1,
1452 const GEOSGeometry* g2,
1453 const char *imPattern);
1454
1456extern char GEOS_DLL *GEOSRelate_r(
1457 GEOSContextHandle_t handle,
1458 const GEOSGeometry* g1,
1459 const GEOSGeometry* g2);
1460
1462extern char GEOS_DLL GEOSRelatePatternMatch_r(
1463 GEOSContextHandle_t handle,
1464 const char *intMatrix,
1465 const char *imPattern);
1466
1468extern char GEOS_DLL *GEOSRelateBoundaryNodeRule_r(
1469 GEOSContextHandle_t handle,
1470 const GEOSGeometry* g1,
1471 const GEOSGeometry* g2,
1472 int bnr);
1473
1474/* ========= Validity checking ========= */
1475
1482
1484extern char GEOS_DLL GEOSisValid_r(
1485 GEOSContextHandle_t handle,
1486 const GEOSGeometry* g);
1487
1489extern char GEOS_DLL *GEOSisValidReason_r(
1490 GEOSContextHandle_t handle,
1491 const GEOSGeometry* g);
1492
1494extern char GEOS_DLL GEOSisValidDetail_r(
1495 GEOSContextHandle_t handle,
1496 const GEOSGeometry* g,
1497 int flags,
1498 char** reason,
1499 GEOSGeometry** location);
1500
1501/* ========== Make Valid ========== */
1502
1519
1522 GEOSContextHandle_t extHandle);
1523
1526 GEOSContextHandle_t handle,
1527 GEOSMakeValidParams* parms);
1528
1531 GEOSContextHandle_t handle,
1533 int style);
1534
1537 GEOSContextHandle_t handle,
1539 enum GEOSMakeValidMethods method);
1540
1543 GEOSContextHandle_t handle,
1544 const GEOSGeometry* g);
1545
1548 GEOSContextHandle_t handle,
1549 const GEOSGeometry* g,
1550 const GEOSMakeValidParams* makeValidParams);
1551
1554 GEOSContextHandle_t handle,
1555 const GEOSGeometry* g,
1556 double tolerance);
1557
1558/* ========== Geometry info ========== */
1559
1561/* Return NULL on exception, result must be freed by caller. */
1562extern char GEOS_DLL *GEOSGeomType_r(
1563 GEOSContextHandle_t handle,
1564 const GEOSGeometry* g);
1565
1567extern int GEOS_DLL GEOSGeomTypeId_r(
1568 GEOSContextHandle_t handle,
1569 const GEOSGeometry* g);
1570
1572extern int GEOS_DLL GEOSGetSRID_r(
1573 GEOSContextHandle_t handle,
1574 const GEOSGeometry* g);
1575
1577extern void GEOS_DLL GEOSSetSRID_r(
1578 GEOSContextHandle_t handle,
1579 GEOSGeometry* g, int SRID);
1580
1582extern void GEOS_DLL *GEOSGeom_getUserData_r(
1583 GEOSContextHandle_t handle,
1584 const GEOSGeometry* g);
1585
1587extern void GEOS_DLL GEOSGeom_setUserData_r(
1588 GEOSContextHandle_t handle,
1589 GEOSGeometry* g,
1590 void* userData);
1591
1593extern int GEOS_DLL GEOSGetNumGeometries_r(
1594 GEOSContextHandle_t handle,
1595 const GEOSGeometry* g);
1596
1598extern const GEOSGeometry GEOS_DLL *GEOSGetGeometryN_r(
1599 GEOSContextHandle_t handle,
1600 const GEOSGeometry* g, int n);
1601
1603extern int GEOS_DLL GEOSNormalize_r(
1604 GEOSContextHandle_t handle,
1605 GEOSGeometry* g);
1606
1608extern int GEOS_DLL GEOSOrientPolygons_r(
1609 GEOSContextHandle_t handle,
1610 GEOSGeometry* g,
1611 int exteriorCW);
1612
1625
1628 GEOSContextHandle_t handle,
1629 const GEOSGeometry *g,
1630 double gridSize,
1631 int flags);
1632
1634extern double GEOS_DLL GEOSGeom_getPrecision_r(
1635 GEOSContextHandle_t handle,
1636 const GEOSGeometry *g);
1637
1639extern int GEOS_DLL GEOSGetNumInteriorRings_r(
1640 GEOSContextHandle_t handle,
1641 const GEOSGeometry* g);
1642
1644extern int GEOS_DLL GEOSGeomGetNumPoints_r(
1645 GEOSContextHandle_t handle,
1646 const GEOSGeometry* g);
1647
1649extern int GEOS_DLL GEOSGeomGetX_r(
1650 GEOSContextHandle_t handle,
1651 const GEOSGeometry *g,
1652 double *x);
1653
1655extern int GEOS_DLL GEOSGeomGetY_r(
1656 GEOSContextHandle_t handle,
1657 const GEOSGeometry *g,
1658 double *y);
1659
1661extern int GEOS_DLL GEOSGeomGetZ_r(
1662 GEOSContextHandle_t handle,
1663 const GEOSGeometry *g,
1664 double *z);
1665
1667extern int GEOS_DLL GEOSGeomGetM_r(
1668 GEOSContextHandle_t handle,
1669 const GEOSGeometry *g,
1670 double *m);
1671
1674 GEOSContextHandle_t handle,
1675 const GEOSGeometry* g, int n);
1676
1679 GEOSContextHandle_t handle,
1680 const GEOSGeometry* g);
1681
1683extern int GEOS_DLL GEOSGetNumCoordinates_r(
1684 GEOSContextHandle_t handle,
1685 const GEOSGeometry* g);
1686
1689 GEOSContextHandle_t handle,
1690 const GEOSGeometry* g);
1691
1693extern int GEOS_DLL GEOSGeom_getDimensions_r(
1694 GEOSContextHandle_t handle,
1695 const GEOSGeometry* g);
1696
1699 GEOSContextHandle_t handle,
1700 const GEOSGeometry* g);
1701
1703extern int GEOS_DLL GEOSGeom_getXMin_r(
1704 GEOSContextHandle_t handle,
1705 const GEOSGeometry* g,
1706 double* value);
1707
1709extern int GEOS_DLL GEOSGeom_getYMin_r(
1710 GEOSContextHandle_t handle,
1711 const GEOSGeometry* g,
1712 double* value);
1713
1715extern int GEOS_DLL GEOSGeom_getXMax_r(
1716 GEOSContextHandle_t handle,
1717 const GEOSGeometry* g,
1718 double* value);
1719
1721extern int GEOS_DLL GEOSGeom_getYMax_r(
1722 GEOSContextHandle_t handle,
1723 const GEOSGeometry* g,
1724 double* value);
1725
1727extern int GEOS_DLL GEOSGeom_getExtent_r(
1728 GEOSContextHandle_t handle,
1729 const GEOSGeometry* g,
1730 double* xmin,
1731 double* ymin,
1732 double* xmax,
1733 double* ymax);
1734
1737 GEOSContextHandle_t handle,
1738 const GEOSGeometry *g,
1739 int n);
1740
1743 GEOSContextHandle_t handle,
1744 const GEOSGeometry *g);
1745
1748 GEOSContextHandle_t handle,
1749 const GEOSGeometry *g);
1750
1751/* ========= Misc functions ========= */
1752
1754extern int GEOS_DLL GEOSArea_r(
1755 GEOSContextHandle_t handle,
1756 const GEOSGeometry* g,
1757 double *area);
1758
1760extern int GEOS_DLL GEOSLength_r(
1761 GEOSContextHandle_t handle,
1762 const GEOSGeometry* g,
1763 double *length);
1764
1766extern int GEOS_DLL GEOSDistance_r(
1767 GEOSContextHandle_t handle,
1768 const GEOSGeometry* g1,
1769 const GEOSGeometry* g2,
1770 double *dist);
1771
1773extern char GEOS_DLL GEOSDistanceWithin_r(
1774 GEOSContextHandle_t handle,
1775 const GEOSGeometry* g1,
1776 const GEOSGeometry* g2,
1777 double dist);
1778
1780extern int GEOS_DLL GEOSDistanceIndexed_r(
1781 GEOSContextHandle_t handle,
1782 const GEOSGeometry* g1,
1783 const GEOSGeometry* g2,
1784 double *dist);
1785
1787extern int GEOS_DLL GEOSHausdorffDistance_r(
1788 GEOSContextHandle_t handle,
1789 const GEOSGeometry *g1,
1790 const GEOSGeometry *g2,
1791 double *dist);
1792
1795 GEOSContextHandle_t handle,
1796 const GEOSGeometry *g1,
1797 const GEOSGeometry *g2,
1798 double densifyFrac, double *dist);
1799
1801extern int GEOS_DLL GEOSFrechetDistance_r(
1802 GEOSContextHandle_t handle,
1803 const GEOSGeometry *g1,
1804 const GEOSGeometry *g2,
1805 double *dist);
1806
1809 GEOSContextHandle_t handle,
1810 const GEOSGeometry *g1,
1811 const GEOSGeometry *g2,
1812 double densifyFrac,
1813 double *dist);
1814
1815
1817extern int GEOS_DLL GEOSHilbertCode_r(
1818 GEOSContextHandle_t handle,
1819 const GEOSGeometry *geom,
1820 const GEOSGeometry* extent,
1821 unsigned int level,
1822 unsigned int *code
1823);
1824
1826extern int GEOS_DLL GEOSGeomGetLength_r(
1827 GEOSContextHandle_t handle,
1828 const GEOSGeometry *g,
1829 double *length);
1830
1833 GEOSContextHandle_t handle,
1834 const GEOSGeometry* g1,
1835 const GEOSGeometry* g2);
1836
1839 GEOSContextHandle_t handle,
1840 const GEOSGeometry* g,
1841 GEOSTransformXYCallback callback,
1842 void* userdata);
1843
1846 GEOSContextHandle_t handle,
1847 const GEOSGeometry* g,
1848 GEOSTransformXYZCallback callback,
1849 void* userdata);
1850
1851/* ========= Algorithms ========= */
1852
1854extern int GEOS_DLL GEOSOrientationIndex_r(
1855 GEOSContextHandle_t handle,
1856 double Ax, double Ay,
1857 double Bx, double By,
1858 double Px, double Py);
1859
1860
1861/* ========== Reader and Writer APIs ========== */
1862
1863#ifndef GEOSWKTReader
1864
1870typedef struct GEOSWKTReader_t GEOSWKTReader;
1871
1877typedef struct GEOSWKTWriter_t GEOSWKTWriter;
1878
1884typedef struct GEOSWKBReader_t GEOSWKBReader;
1885
1891typedef struct GEOSWKBWriter_t GEOSWKBWriter;
1892
1898typedef struct GEOSGeoJSONReader_t GEOSGeoJSONReader;
1899
1905typedef struct GEOSGeoJSONWriter_t GEOSGeoJSONWriter;
1906
1907#endif
1908
1909/* ========== WKT Reader ========== */
1910
1913 GEOSContextHandle_t handle);
1914
1917 GEOSWKTReader* reader);
1918
1921 GEOSContextHandle_t handle,
1922 GEOSWKTReader* reader,
1923 const char *wkt);
1924
1927 GEOSContextHandle_t handle,
1928 GEOSWKTReader *reader,
1929 char doFix);
1930
1931/* ========== WKT Writer ========== */
1932
1935 GEOSContextHandle_t handle);
1936
1938extern void GEOS_DLL GEOSWKTWriter_destroy_r(
1939 GEOSContextHandle_t handle,
1940 GEOSWKTWriter* writer);
1941
1943extern char GEOS_DLL *GEOSWKTWriter_write_r(
1944 GEOSContextHandle_t handle,
1945 GEOSWKTWriter* writer,
1946 const GEOSGeometry* g);
1947
1949extern void GEOS_DLL GEOSWKTWriter_setTrim_r(
1950 GEOSContextHandle_t handle,
1951 GEOSWKTWriter *writer,
1952 char trim);
1953
1956 GEOSContextHandle_t handle,
1957 GEOSWKTWriter *writer,
1958 int precision);
1959
1962 GEOSContextHandle_t handle,
1963 GEOSWKTWriter *writer,
1964 int dim);
1965
1968 GEOSContextHandle_t handle,
1969 GEOSWKTWriter *writer);
1970
1972extern void GEOS_DLL GEOSWKTWriter_setOld3D_r(
1973 GEOSContextHandle_t handle,
1974 GEOSWKTWriter *writer,
1975 int useOld3D);
1976
1986extern int GEOS_DLL GEOS_printDouble(
1987 double d,
1988 unsigned int precision,
1989 char *result
1990);
1991
1992/* ========== WKB Reader ========== */
1993
1996 GEOSContextHandle_t handle);
1997
1999extern void GEOS_DLL GEOSWKBReader_destroy_r(
2000 GEOSContextHandle_t handle,
2001 GEOSWKBReader* reader);
2002
2005 GEOSContextHandle_t handle,
2006 GEOSWKBReader *reader,
2007 char doFix);
2008
2011 GEOSContextHandle_t handle,
2012 GEOSWKBReader* reader,
2013 const unsigned char *wkb,
2014 size_t size);
2015
2018 GEOSContextHandle_t handle,
2019 GEOSWKBReader* reader,
2020 const unsigned char *hex,
2021 size_t size);
2022
2023
2024/* ========== WKB Writer ========== */
2025
2028 GEOSContextHandle_t handle);
2029
2031extern void GEOS_DLL GEOSWKBWriter_destroy_r(
2032 GEOSContextHandle_t handle,
2033 GEOSWKBWriter* writer);
2034
2036extern unsigned char GEOS_DLL *GEOSWKBWriter_write_r(
2037 GEOSContextHandle_t handle,
2038 GEOSWKBWriter* writer,
2039 const GEOSGeometry* g,
2040 size_t *size);
2041
2043extern unsigned char GEOS_DLL *GEOSWKBWriter_writeHEX_r(
2044 GEOSContextHandle_t handle,
2045 GEOSWKBWriter* writer,
2046 const GEOSGeometry* g,
2047 size_t *size);
2048
2051 GEOSContextHandle_t handle,
2052 const GEOSWKBWriter* writer);
2053
2056 GEOSContextHandle_t handle,
2057 GEOSWKBWriter* writer, int newDimension);
2058
2061 GEOSContextHandle_t handle,
2062 const GEOSWKBWriter* writer);
2063
2065extern void GEOS_DLL GEOSWKBWriter_setByteOrder_r(
2066 GEOSContextHandle_t handle,
2067 GEOSWKBWriter* writer,
2068 int byteOrder);
2069
2071extern int GEOS_DLL GEOSWKBWriter_getFlavor_r(
2072 GEOSContextHandle_t handle,
2073 const GEOSWKBWriter* writer);
2074
2076extern void GEOS_DLL GEOSWKBWriter_setFlavor_r(
2077 GEOSContextHandle_t handle,
2078 GEOSWKBWriter* writer,
2079 int flavor);
2080
2083 GEOSContextHandle_t handle,
2084 const GEOSWKBWriter* writer);
2085
2088 GEOSContextHandle_t handle,
2089 GEOSWKBWriter* writer, const char writeSRID);
2090
2091/* ========== GeoJSON Reader ========== */
2092
2095 GEOSContextHandle_t handle);
2096
2099 GEOSGeoJSONReader* reader);
2100
2103 GEOSContextHandle_t handle,
2104 GEOSGeoJSONReader* reader,
2105 const char *geojson);
2106
2107/* ========== GeoJSON Writer ========== */
2108
2111 GEOSContextHandle_t handle);
2112
2115 GEOSGeoJSONWriter* writer);
2116
2119 GEOSContextHandle_t handle,
2120 GEOSGeoJSONWriter* writer,
2121 const GEOSGeometry* g,
2122 int indent);
2123
2125extern void GEOS_DLL GEOSFree_r(
2126 GEOSContextHandle_t handle,
2127 void *buffer);
2128
2136extern const char GEOS_DLL *GEOSversion(void);
2137
2138/*
2139* External code to GEOS can define GEOS_USE_ONLY_R_API
2140* to strip the non-reentrant API functions from this header,
2141* leaving only the "_r" compatible variants.
2142*/
2143#ifndef GEOS_USE_ONLY_R_API
2144
2145/* ========== Initialization, cleanup ================================= */
2151
2164extern void GEOS_DLL initGEOS(
2165 GEOSMessageHandler notice_function,
2166 GEOSMessageHandler error_function);
2167
2173extern void GEOS_DLL finishGEOS(void);
2174
2184extern void GEOS_DLL GEOSFree(void *buffer);
2185
2187
2188/* ========= Coordinate Sequence functions ========= */
2194
2202extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_create(unsigned int size, unsigned int dims);
2203
2214extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_copyFromBuffer(const double* buf, unsigned int size, int hasZ, int hasM);
2215
2227extern GEOSCoordSequence GEOS_DLL *GEOSCoordSeq_copyFromArrays(const double* x, const double* y, const double* z, const double* m, unsigned int size);
2228
2239extern int GEOS_DLL GEOSCoordSeq_copyToBuffer(const GEOSCoordSequence* s, double* buf, int hasZ, int hasM);
2240
2252extern int GEOS_DLL GEOSCoordSeq_copyToArrays(const GEOSCoordSequence* s, double* x, double* y, double* z, double* m);
2253
2261
2268
2278 unsigned int idx, double val);
2288 unsigned int idx, double val);
2298 unsigned int idx, double val);
2310 unsigned int idx, double x, double y);
2323 unsigned int idx, double x, double y, double z);
2334 unsigned int idx, unsigned int dim, double val);
2335
2344extern int GEOS_DLL GEOSCoordSeq_getX(const GEOSCoordSequence* s,
2345 unsigned int idx, double *val);
2346
2355extern int GEOS_DLL GEOSCoordSeq_getY(const GEOSCoordSequence* s,
2356 unsigned int idx, double *val);
2365extern int GEOS_DLL GEOSCoordSeq_getZ(const GEOSCoordSequence* s,
2366 unsigned int idx, double *val);
2377extern int GEOS_DLL GEOSCoordSeq_getXY(const GEOSCoordSequence* s,
2378 unsigned int idx, double *x, double *y);
2390extern int GEOS_DLL GEOSCoordSeq_getXYZ(const GEOSCoordSequence* s,
2391 unsigned int idx, double *x, double *y, double *z);
2401extern int GEOS_DLL GEOSCoordSeq_getOrdinate(const GEOSCoordSequence* s,
2402 unsigned int idx, unsigned int dim, double *val);
2403
2411extern int GEOS_DLL GEOSCoordSeq_getSize(
2412 const GEOSCoordSequence* s,
2413 unsigned int *size);
2414
2422extern int GEOS_DLL GEOSCoordSeq_getDimensions(
2423 const GEOSCoordSequence* s,
2424 unsigned int *dims);
2425
2435extern int GEOS_DLL GEOSCoordSeq_isCCW(
2436 const GEOSCoordSequence* s,
2437 char* is_ccw);
2438
2440
2441/* ========= Geometry Constructors ========= */
2447
2456
2466extern GEOSGeometry GEOS_DLL *GEOSGeom_createPointFromXY(double x, double y);
2467
2476
2485
2494
2503
2512
2527 GEOSGeometry* shell,
2528 GEOSGeometry** holes,
2529 unsigned int nholes);
2530
2539
2547
2557 unsigned int ncurves);
2558
2566
2581 GEOSGeometry* shell,
2582 GEOSGeometry** holes,
2583 unsigned int nholes);
2584
2592
2607 int type,
2608 GEOSGeometry** geoms,
2609 unsigned int ngeoms);
2610
2628 GEOSGeometry * collection,
2629 unsigned int * ngeoms);
2630
2640
2652 double xmin, double ymin,
2653 double xmax, double ymax);
2654
2662extern GEOSGeometry GEOS_DLL *GEOSGeom_clone(const GEOSGeometry* g);
2663
2669extern void GEOS_DLL GEOSGeom_destroy(GEOSGeometry* g);
2670
2672
2673/* ========== Geometry info ========== */
2678
2688extern char GEOS_DLL *GEOSGeomType(const GEOSGeometry* g);
2689
2696extern int GEOS_DLL GEOSGeomTypeId(const GEOSGeometry* g);
2697
2704extern int GEOS_DLL GEOSGetSRID(const GEOSGeometry* g);
2705
2716extern void GEOS_DLL *GEOSGeom_getUserData(const GEOSGeometry* g);
2717
2730extern int GEOS_DLL GEOSGetNumGeometries(const GEOSGeometry* g);
2731
2747extern const GEOSGeometry GEOS_DLL *GEOSGetGeometryN(
2748 const GEOSGeometry* g,
2749 int n);
2750
2760extern double GEOS_DLL GEOSGeom_getPrecision(const GEOSGeometry *g);
2761
2769extern int GEOS_DLL GEOSGetNumInteriorRings(const GEOSGeometry* g);
2770
2778extern int GEOS_DLL GEOSGeomGetNumPoints(const GEOSGeometry* g);
2779
2788extern int GEOS_DLL GEOSGeomGetX(const GEOSGeometry *g, double *x);
2789
2798extern int GEOS_DLL GEOSGeomGetY(const GEOSGeometry *g, double *y);
2799
2809extern int GEOS_DLL GEOSGeomGetZ(const GEOSGeometry *g, double *z);
2810
2820extern int GEOS_DLL GEOSGeomGetM(const GEOSGeometry *g, double *m);
2821
2831extern const GEOSGeometry GEOS_DLL *GEOSGetInteriorRingN(
2832 const GEOSGeometry* g,
2833 int n);
2834
2843extern const GEOSGeometry GEOS_DLL *GEOSGetExteriorRing(
2844 const GEOSGeometry* g);
2845
2853extern int GEOS_DLL GEOSGetNumCoordinates(
2854 const GEOSGeometry* g);
2855
2866 const GEOSGeometry* g);
2867
2880extern int GEOS_DLL GEOSGeom_getDimensions(
2881 const GEOSGeometry* g);
2882
2895 const GEOSGeometry* g);
2896
2905extern int GEOS_DLL GEOSGeom_getXMin(const GEOSGeometry* g, double* value);
2906
2915extern int GEOS_DLL GEOSGeom_getYMin(const GEOSGeometry* g, double* value);
2916
2925extern int GEOS_DLL GEOSGeom_getXMax(const GEOSGeometry* g, double* value);
2926
2935extern int GEOS_DLL GEOSGeom_getYMax(const GEOSGeometry* g, double* value);
2936
2950extern int GEOS_DLL GEOSGeom_getExtent(
2951 const GEOSGeometry* g,
2952 double* xmin,
2953 double* ymin,
2954 double* xmax,
2955 double* ymax);
2956
2966extern GEOSGeometry GEOS_DLL *GEOSGeomGetPointN(const GEOSGeometry *g, int n);
2967
2977
2987
2988
2997extern char GEOS_DLL GEOSisEmpty(const GEOSGeometry* g);
2998
3007extern char GEOS_DLL GEOSisRing(const GEOSGeometry* g);
3008
3015extern char GEOS_DLL GEOSHasZ(const GEOSGeometry* g);
3016
3024extern char GEOS_DLL GEOSHasM(const GEOSGeometry* g);
3025
3034extern char GEOS_DLL GEOSisClosed(const GEOSGeometry *g);
3035
3037
3038/* ==================================================================================== */
3043
3050extern void GEOS_DLL GEOSSetSRID(GEOSGeometry* g, int SRID);
3051
3059extern void GEOS_DLL GEOSGeom_setUserData(GEOSGeometry* g, void* userData);
3060
3080extern int GEOS_DLL GEOSNormalize(GEOSGeometry* g);
3081
3092extern int GEOS_DLL GEOSOrientPolygons(GEOSGeometry* g,
3093 int exteriorCW);
3094
3096
3097/* ========== Validity checking ============================================================ */
3103
3111extern char GEOS_DLL GEOSisSimple(const GEOSGeometry* g);
3112
3126extern char GEOS_DLL GEOSisValid(const GEOSGeometry* g);
3127
3137extern char GEOS_DLL *GEOSisValidReason(const GEOSGeometry *g);
3138
3153extern char GEOS_DLL GEOSisValidDetail(
3154 const GEOSGeometry* g,
3155 int flags,
3156 char** reason,
3157 GEOSGeometry** location);
3158
3167 const GEOSGeometry* g);
3168
3183 const GEOSGeometry* g,
3184 const GEOSMakeValidParams *makeValidParams);
3185
3195
3204
3215 enum GEOSMakeValidMethods method);
3216
3229 int keepCollapsed);
3230
3250extern int GEOS_DLL GEOSMinimumClearance(const GEOSGeometry* g, double* d);
3251
3264
3283 const GEOSGeometry* g,
3284 double tolerance);
3285
3287
3288/* ========= Metric functions ================================================== */
3293
3301extern int GEOS_DLL GEOSArea(
3302 const GEOSGeometry* g,
3303 double *area);
3304
3312extern int GEOS_DLL GEOSLength(
3313 const GEOSGeometry* g,
3314 double *length);
3315
3325extern int GEOS_DLL GEOSGeomGetLength(
3326 const GEOSGeometry *g,
3327 double *length);
3328
3330
3331/* ========== Distance functions ================================================ */
3337
3346extern int GEOS_DLL GEOSDistance(
3347 const GEOSGeometry* g1,
3348 const GEOSGeometry* g2,
3349 double *dist);
3350
3361extern char GEOS_DLL GEOSDistanceWithin(
3362 const GEOSGeometry* g1,
3363 const GEOSGeometry* g2,
3364 double dist);
3365
3379extern int GEOS_DLL GEOSDistanceIndexed(
3380 const GEOSGeometry* g1,
3381 const GEOSGeometry* g2,
3382 double *dist);
3383
3396 const GEOSGeometry* g1,
3397 const GEOSGeometry* g2);
3398
3410extern int GEOS_DLL GEOSHausdorffDistance(
3411 const GEOSGeometry *g1,
3412 const GEOSGeometry *g2,
3413 double *dist);
3414
3430 const GEOSGeometry *g1,
3431 const GEOSGeometry *g2,
3432 double densifyFrac,
3433 double *dist);
3434
3448extern int GEOS_DLL GEOSFrechetDistance(
3449 const GEOSGeometry *g1,
3450 const GEOSGeometry *g2,
3451 double *dist);
3452
3469extern int GEOS_DLL GEOSFrechetDistanceDensify(
3470 const GEOSGeometry *g1,
3471 const GEOSGeometry *g2,
3472 double densifyFrac,
3473 double *dist);
3474
3476
3477/* ========== Linear referencing functions */
3483
3493extern double GEOS_DLL GEOSProject(const GEOSGeometry* line,
3494 const GEOSGeometry* point);
3495
3507extern GEOSGeometry GEOS_DLL *GEOSInterpolate(const GEOSGeometry* line,
3508 double d);
3509
3520extern double GEOS_DLL GEOSProjectNormalized(const GEOSGeometry* line,
3521 const GEOSGeometry* point);
3522
3533 const GEOSGeometry *line,
3534 double proportion);
3535
3537
3538/* ========== Overlay functions ========== */
3544
3555extern GEOSGeometry GEOS_DLL *GEOSIntersection(const GEOSGeometry* g1, const GEOSGeometry* g2);
3556
3571extern GEOSGeometry GEOS_DLL *GEOSIntersectionPrec(const GEOSGeometry* g1, const GEOSGeometry* g2, double gridSize);
3572
3584 const GEOSGeometry* ga,
3585 const GEOSGeometry* gb);
3586
3603 const GEOSGeometry* ga,
3604 const GEOSGeometry* gb,
3605 double gridSize);
3606
3619 const GEOSGeometry* ga,
3620 const GEOSGeometry* gb);
3621
3639 const GEOSGeometry* ga,
3640 const GEOSGeometry* gb,
3641 double gridSize);
3642
3653extern GEOSGeometry GEOS_DLL *GEOSUnion(
3654 const GEOSGeometry* ga,
3655 const GEOSGeometry* gb);
3656
3673 const GEOSGeometry* ga,
3674 const GEOSGeometry* gb,
3675 double gridSize);
3676
3688extern GEOSGeometry GEOS_DLL *GEOSUnaryUnion(const GEOSGeometry* g);
3689
3706 const GEOSGeometry* g,
3707 double gridSize);
3708
3720
3737 const GEOSGeometry* g,
3738 double xmin, double ymin,
3739 double xmax, double ymax);
3740
3760 const GEOSGeometry* g1,
3761 const GEOSGeometry* g2);
3762
3764
3765/* ========== Buffer related functions ========== */
3770
3782extern GEOSGeometry GEOS_DLL *GEOSBuffer(const GEOSGeometry* g,
3783 double width, int quadsegs);
3784
3794
3801extern void GEOS_DLL GEOSBufferParams_destroy(GEOSBufferParams* parms);
3802
3812 int style);
3813
3823 int joinStyle);
3824
3838 double mitreLimit);
3839
3852 int quadSegs);
3853
3866 int singleSided);
3867
3879 const GEOSGeometry* g,
3880 const GEOSBufferParams* p,
3881 double width);
3882
3897 const GEOSGeometry* g,
3898 double width,
3899 int quadsegs,
3900 int endCapStyle,
3901 int joinStyle,
3902 double mitreLimit);
3903
3927 double width, int quadsegs, int joinStyle, double mitreLimit);
3928
3930
3931
3932/* ====================================================================== */
3938
3951
3952
3976extern int GEOS_DLL GEOSCoverageIsValid(
3977 const GEOSGeometry* input,
3978 double gapWidth,
3979 GEOSGeometry** invalidEdges);
3980
4007 const GEOSGeometry* input,
4008 double tolerance,
4009 int preserveBoundary);
4010
4012
4013/* ========== Construction Operations ========== */
4018
4027extern GEOSGeometry GEOS_DLL *GEOSEnvelope(const GEOSGeometry* g);
4028
4042extern GEOSGeometry GEOS_DLL *GEOSBoundary(const GEOSGeometry* g);
4043
4053extern GEOSGeometry GEOS_DLL *GEOSConvexHull(const GEOSGeometry* g);
4054
4086 const GEOSGeometry* g,
4087 double ratio,
4088 unsigned int allowHoles);
4089
4120 const GEOSGeometry* g,
4121 double length,
4122 unsigned int allowHoles);
4123
4163 const GEOSGeometry* g,
4164 double lengthRatio,
4165 unsigned int isTight,
4166 unsigned int isHolesAllowed);
4167
4188 const GEOSGeometry* g,
4189 unsigned int isOuter,
4190 double vertexNumFraction);
4191
4192
4202
4225 const GEOSGeometry* g,
4226 unsigned int isOuter,
4227 unsigned int parameterMode,
4228 double parameter);
4229
4244
4270 const GEOSGeometry* g,
4271 double tolerance);
4272
4307 const GEOSGeometry* obstacles,
4308 const GEOSGeometry* boundary,
4309 double tolerance);
4310
4324extern GEOSGeometry GEOS_DLL *GEOSMinimumWidth(const GEOSGeometry* g);
4325
4326
4337
4347extern GEOSGeometry GEOS_DLL *GEOSGetCentroid(const GEOSGeometry* g);
4348
4362 const GEOSGeometry* g,
4363 double* radius,
4364 GEOSGeometry** center);
4365
4380 const GEOSGeometry *g,
4381 double tolerance,
4382 int onlyEdges);
4383
4396 const GEOSGeometry *g);
4397
4408
4430 const GEOSGeometry *g,
4431 const GEOSGeometry *env,
4432 double tolerance,
4433 int flags);
4434
4436
4437/* ============================================================== */
4442
4453extern GEOSGeometry GEOS_DLL *GEOSNode(const GEOSGeometry* g);
4454
4498 const GEOSGeometry * const geoms[],
4499 unsigned int ngeoms);
4500
4516 const GEOSGeometry * const geoms[],
4517 unsigned int ngeoms);
4518
4533 const GEOSGeometry * const geoms[],
4534 unsigned int ngeoms);
4535
4551 const GEOSGeometry* input,
4552 GEOSGeometry** cuts,
4553 GEOSGeometry** dangles,
4554 GEOSGeometry** invalid);
4555
4567extern GEOSGeometry GEOS_DLL *GEOSBuildArea(const GEOSGeometry* g);
4568
4570
4571/* ============================================================== */
4576
4590extern GEOSGeometry GEOS_DLL *GEOSDensify(
4591 const GEOSGeometry* g,
4592 double tolerance);
4593
4605extern GEOSGeometry GEOS_DLL *GEOSLineMerge(const GEOSGeometry* g);
4606
4621
4634 const GEOSGeometry* g,
4635 double start_fraction,
4636 double end_fraction);
4637
4648extern GEOSGeometry GEOS_DLL *GEOSReverse(const GEOSGeometry* g);
4649
4665 const GEOSGeometry* g,
4666 double tolerance);
4667
4685 const GEOSGeometry* g,
4686 double tolerance);
4687
4699 const GEOSGeometry* g);
4700
4716extern int GEOS_DLL GEOSHilbertCode(
4717 const GEOSGeometry *geom,
4718 const GEOSGeometry* extent,
4719 unsigned int level,
4720 unsigned int *code
4721);
4722
4738 const GEOSGeometry* g,
4739 GEOSTransformXYCallback callback,
4740 void* userdata);
4741
4757 const GEOSGeometry* g,
4758 GEOSTransformXYZCallback callback,
4759 void* userdata);
4760
4782extern GEOSGeometry GEOS_DLL *GEOSSnap(
4783 const GEOSGeometry* input,
4784 const GEOSGeometry* snap_target,
4785 double tolerance);
4786
4817 const GEOSGeometry *g,
4818 double gridSize,
4819 int flags);
4820
4822
4823/* ============================================================== */
4828
4837extern char GEOS_DLL GEOSDisjoint(const GEOSGeometry* g1, const GEOSGeometry* g2);
4838
4848extern char GEOS_DLL GEOSTouches(const GEOSGeometry* g1, const GEOSGeometry* g2);
4849
4858extern char GEOS_DLL GEOSIntersects(const GEOSGeometry* g1, const GEOSGeometry* g2);
4859
4869extern char GEOS_DLL GEOSCrosses(const GEOSGeometry* g1, const GEOSGeometry* g2);
4870
4880extern char GEOS_DLL GEOSWithin(const GEOSGeometry* g1, const GEOSGeometry* g2);
4881
4891extern char GEOS_DLL GEOSContains(const GEOSGeometry* g1, const GEOSGeometry* g2);
4892
4902extern char GEOS_DLL GEOSOverlaps(const GEOSGeometry* g1, const GEOSGeometry* g2);
4903
4912extern char GEOS_DLL GEOSEquals(const GEOSGeometry* g1, const GEOSGeometry* g2);
4913
4924extern char GEOS_DLL GEOSCovers(const GEOSGeometry* g1, const GEOSGeometry* g2);
4925
4936extern char GEOS_DLL GEOSCoveredBy(const GEOSGeometry* g1, const GEOSGeometry* g2);
4937
4955extern char GEOS_DLL GEOSEqualsExact(
4956 const GEOSGeometry* g1,
4957 const GEOSGeometry* g2,
4958 double tolerance);
4959
4972extern char GEOS_DLL GEOSEqualsIdentical(
4973 const GEOSGeometry* g1,
4974 const GEOSGeometry* g2);
4975
4991extern char GEOS_DLL GEOSRelatePattern(
4992 const GEOSGeometry* g1,
4993 const GEOSGeometry* g2,
4994 const char *imPattern);
4995
5006extern char GEOS_DLL *GEOSRelate(
5007 const GEOSGeometry* g1,
5008 const GEOSGeometry* g2);
5009
5019extern char GEOS_DLL GEOSRelatePatternMatch(
5020 const char *intMatrix,
5021 const char *imPattern);
5022
5036extern char GEOS_DLL *GEOSRelateBoundaryNodeRule(
5037 const GEOSGeometry* g1,
5038 const GEOSGeometry* g2,
5039 int bnr);
5040
5042
5043/* ========== Prepared Geometry Binary predicates ========== */
5044
5056
5070extern const GEOSPreparedGeometry GEOS_DLL *GEOSPrepare(const GEOSGeometry* g);
5071
5080extern void GEOS_DLL GEOSPreparedGeom_destroy(const GEOSPreparedGeometry* g);
5081
5092extern char GEOS_DLL GEOSPreparedContains(
5093 const GEOSPreparedGeometry* pg1,
5094 const GEOSGeometry* g2);
5095
5107extern char GEOS_DLL GEOSPreparedContainsXY(
5108 const GEOSPreparedGeometry* pg1,
5109 double x,
5110 double y);
5111
5122extern char GEOS_DLL GEOSPreparedContainsProperly(
5123 const GEOSPreparedGeometry* pg1,
5124 const GEOSGeometry* g2);
5125
5136extern char GEOS_DLL GEOSPreparedCoveredBy(
5137 const GEOSPreparedGeometry* pg1,
5138 const GEOSGeometry* g2);
5139
5150extern char GEOS_DLL GEOSPreparedCovers(
5151 const GEOSPreparedGeometry* pg1,
5152 const GEOSGeometry* g2);
5153
5164extern char GEOS_DLL GEOSPreparedCrosses(
5165 const GEOSPreparedGeometry* pg1,
5166 const GEOSGeometry* g2);
5167
5178extern char GEOS_DLL GEOSPreparedDisjoint(
5179 const GEOSPreparedGeometry* pg1,
5180 const GEOSGeometry* g2);
5181
5192extern char GEOS_DLL GEOSPreparedIntersects(
5193 const GEOSPreparedGeometry* pg1,
5194 const GEOSGeometry* g2);
5195
5207extern char GEOS_DLL GEOSPreparedIntersectsXY(
5208 const GEOSPreparedGeometry* pg1,
5209 double x,
5210 double y);
5211
5222extern char GEOS_DLL GEOSPreparedOverlaps(
5223 const GEOSPreparedGeometry* pg1,
5224 const GEOSGeometry* g2);
5225
5236extern char GEOS_DLL GEOSPreparedTouches(
5237 const GEOSPreparedGeometry* pg1,
5238 const GEOSGeometry* g2);
5239
5250extern char GEOS_DLL GEOSPreparedWithin(
5251 const GEOSPreparedGeometry* pg1,
5252 const GEOSGeometry* g2);
5253
5267extern char GEOS_DLL * GEOSPreparedRelate(
5268 const GEOSPreparedGeometry* pg1,
5269 const GEOSGeometry* g2);
5270
5287extern char GEOS_DLL GEOSPreparedRelatePattern(
5288 const GEOSPreparedGeometry* pg1,
5289 const GEOSGeometry* g2,
5290 const char* imPattern);
5291
5305 const GEOSPreparedGeometry* pg1,
5306 const GEOSGeometry* g2);
5307
5321extern int GEOS_DLL GEOSPreparedDistance(
5322 const GEOSPreparedGeometry* pg1,
5323 const GEOSGeometry* g2,
5324 double *dist);
5325
5340extern char GEOS_DLL GEOSPreparedDistanceWithin(
5341 const GEOSPreparedGeometry* pg1,
5342 const GEOSGeometry* g2,
5343 double dist);
5344
5346
5347/* ========== STRtree functions ========== */
5353
5366extern GEOSSTRtree GEOS_DLL *GEOSSTRtree_create(size_t nodeCapacity);
5367
5380extern int GEOS_DLL GEOSSTRtree_build(GEOSSTRtree *tree);
5381
5394extern void GEOS_DLL GEOSSTRtree_insert(
5395 GEOSSTRtree *tree,
5396 const GEOSGeometry *g,
5397 void *item);
5398
5413extern void GEOS_DLL GEOSSTRtree_query(
5414 GEOSSTRtree *tree,
5415 const GEOSGeometry *g,
5416 GEOSQueryCallback callback,
5417 void *userdata);
5418
5433extern const GEOSGeometry GEOS_DLL *GEOSSTRtree_nearest(
5434 GEOSSTRtree *tree,
5435 const GEOSGeometry* geom);
5436
5457extern const void GEOS_DLL *GEOSSTRtree_nearest_generic(
5458 GEOSSTRtree *tree,
5459 const void* item,
5460 const GEOSGeometry* itemEnvelope,
5461 GEOSDistanceCallback distancefn,
5462 void* userdata);
5463
5474extern void GEOS_DLL GEOSSTRtree_iterate(
5475 GEOSSTRtree *tree,
5476 GEOSQueryCallback callback,
5477 void *userdata);
5478
5493extern char GEOS_DLL GEOSSTRtree_remove(
5494 GEOSSTRtree *tree,
5495 const GEOSGeometry *g,
5496 void *item);
5497
5508extern void GEOS_DLL GEOSSTRtree_destroy(GEOSSTRtree *tree);
5509
5511
5512/* ========== Algorithms ====================================================== */
5517
5536extern int GEOS_DLL GEOSSegmentIntersection(
5537 double ax0, double ay0,
5538 double ax1, double ay1,
5539 double bx0, double by0,
5540 double bx1, double by1,
5541 double* cx, double* cy);
5542
5558extern int GEOS_DLL GEOSOrientationIndex(
5559 double Ax, double Ay,
5560 double Bx, double By,
5561 double Px, double Py);
5562
5564
5565/* ========= Reader and Writer APIs ========= */
5566
5571/* ========= WKT Reader ========= */
5572
5579
5585extern void GEOS_DLL GEOSWKTReader_destroy(GEOSWKTReader* reader);
5586
5596 GEOSWKTReader* reader,
5597 const char *wkt);
5598
5608 GEOSWKTReader *reader,
5609 char doFix);
5610
5611/* ========= WKT Writer ========= */
5612
5619
5625extern void GEOS_DLL GEOSWKTWriter_destroy(
5626 GEOSWKTWriter* writer);
5627
5637extern char GEOS_DLL *GEOSWKTWriter_write(
5638 GEOSWKTWriter* writer,
5639 const GEOSGeometry* g);
5640
5655extern void GEOS_DLL GEOSWKTWriter_setTrim(
5656 GEOSWKTWriter *writer,
5657 char trim);
5658
5668 GEOSWKTWriter *writer,
5669 int precision);
5670
5680 GEOSWKTWriter *writer,
5681 int dim);
5682
5691
5702extern void GEOS_DLL GEOSWKTWriter_setOld3D(
5703 GEOSWKTWriter *writer,
5704 int useOld3D);
5706
5707/* ============================================================================== */
5712
5713/* ========== WKB Reader ========== */
5720
5726extern void GEOS_DLL GEOSWKBReader_destroy(
5727 GEOSWKBReader* reader);
5728
5738 GEOSWKBReader *reader,
5739 char doFix);
5740
5750 GEOSWKBReader* reader,
5751 const unsigned char *wkb,
5752 size_t size);
5753
5763 GEOSWKBReader* reader,
5764 const unsigned char *hex,
5765 size_t size);
5766
5767/* ========== WKB Writer ========== */
5768
5775
5781extern void GEOS_DLL GEOSWKBWriter_destroy(GEOSWKBWriter* writer);
5782
5792extern unsigned char GEOS_DLL *GEOSWKBWriter_write(
5793 GEOSWKBWriter* writer,
5794 const GEOSGeometry* g,
5795 size_t *size);
5796
5806extern unsigned char GEOS_DLL *GEOSWKBWriter_writeHEX(
5807 GEOSWKBWriter* writer,
5808 const GEOSGeometry* g,
5809 size_t *size);
5810
5820 const GEOSWKBWriter* writer);
5821
5830 GEOSWKBWriter* writer,
5831 int newDimension);
5832
5842extern int GEOS_DLL GEOSWKBWriter_getByteOrder(
5843 const GEOSWKBWriter* writer);
5844
5852extern void GEOS_DLL GEOSWKBWriter_setByteOrder(
5853 GEOSWKBWriter* writer,
5854 int byteOrder);
5855
5870extern int GEOS_DLL GEOSWKBWriter_getFlavor(
5871 const GEOSWKBWriter* writer);
5872
5881extern void GEOS_DLL GEOSWKBWriter_setFlavor(
5882 GEOSWKBWriter* writer,
5883 int flavor);
5884
5890extern char GEOS_DLL GEOSWKBWriter_getIncludeSRID(
5891 const GEOSWKBWriter* writer);
5892
5900extern void GEOS_DLL GEOSWKBWriter_setIncludeSRID(
5901 GEOSWKBWriter* writer,
5902 const char writeSRID);
5903
5905
5906/* ============================================================================= */
5911/* ========= GeoJSON Reader ========= */
5912
5920
5927extern void GEOS_DLL GEOSGeoJSONReader_destroy(GEOSGeoJSONReader* reader);
5928
5940 GEOSGeoJSONReader* reader,
5941 const char *geojson);
5942
5943/* ========= GeoJSON Writer ========= */
5944
5952
5959extern void GEOS_DLL GEOSGeoJSONWriter_destroy(GEOSGeoJSONWriter* writer);
5960
5972 GEOSGeoJSONWriter* writer,
5973 const GEOSGeometry* g,
5974 int indent);
5975
5977
5978#endif /* #ifndef GEOS_USE_ONLY_R_API */
5979
5980/* ====================================================================== */
5981/* DEPRECATIONS */
5982/* ====================================================================== */
5983
5989
5994 const GEOSGeometry* g,
5995 double width, int quadsegs,
5996 int joinStyle, double mitreLimit,
5997 int leftSide);
5998
6003 GEOSContextHandle_t handle,
6004 const GEOSGeometry* g,
6005 double width, int quadsegs,
6006 int joinStyle, double mitreLimit,
6007 int leftSide);
6008
6014 GEOSMessageHandler notice_function,
6015 GEOSMessageHandler error_function);
6016
6020extern void GEOS_DLL finishGEOS_r(GEOSContextHandle_t handle);
6021
6026 GEOSContextHandle_t handle,
6027 const char *wkt);
6028
6032extern char GEOS_DLL *GEOSGeomToWKT_r(
6033 GEOSContextHandle_t handle,
6034 const GEOSGeometry* g);
6035
6039extern int GEOS_DLL GEOS_getWKBOutputDims_r(
6040 GEOSContextHandle_t handle);
6041
6045extern int GEOS_DLL GEOS_setWKBOutputDims_r(
6046 GEOSContextHandle_t handle,
6047 int newDims);
6048
6052extern int GEOS_DLL GEOS_getWKBByteOrder_r(
6053 GEOSContextHandle_t handle);
6054
6058extern int GEOS_DLL GEOS_setWKBByteOrder_r(
6059 GEOSContextHandle_t handle,
6060 int byteOrder);
6061
6066 GEOSContextHandle_t handle,
6067 const unsigned char *wkb,
6068 size_t size);
6069
6073extern unsigned char GEOS_DLL *GEOSGeomToWKB_buf_r(
6074 GEOSContextHandle_t handle,
6075 const GEOSGeometry* g,
6076 size_t *size);
6077
6082 GEOSContextHandle_t handle,
6083 const unsigned char *hex,
6084 size_t size);
6085
6089extern unsigned char GEOS_DLL *GEOSGeomToHEX_buf_r(
6090 GEOSContextHandle_t handle,
6091 const GEOSGeometry* g,
6092 size_t *size);
6093
6097extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKT(const char *wkt);
6098
6102extern char GEOS_DLL *GEOSGeomToWKT(const GEOSGeometry* g);
6103
6107extern int GEOS_DLL GEOS_getWKBOutputDims(void);
6108
6112extern int GEOS_DLL GEOS_setWKBOutputDims(int newDims);
6113
6117extern int GEOS_DLL GEOS_getWKBByteOrder(void);
6118
6122extern int GEOS_DLL GEOS_setWKBByteOrder(int byteOrder);
6123
6127extern GEOSGeometry GEOS_DLL *GEOSGeomFromWKB_buf(const unsigned char *wkb, size_t size);
6128
6132extern unsigned char GEOS_DLL *GEOSGeomToWKB_buf(const GEOSGeometry* g, size_t *size);
6133
6137extern GEOSGeometry GEOS_DLL *GEOSGeomFromHEX_buf(const unsigned char *hex, size_t size);
6138
6142extern unsigned char GEOS_DLL *GEOSGeomToHEX_buf(const GEOSGeometry* g, size_t *size);
6143
6148
6153 GEOSContextHandle_t handle,
6154 const GEOSGeometry* g);
6155
6157
6158/* ====================================================================== */
6159/* END DEPRECATIONS */
6160/* ====================================================================== */
6161
6162
6163#ifdef __cplusplus
6164} // extern "C"
6165#endif
6166
6167#endif /* #ifndef GEOS_C_H_INCLUDED */
int GEOS_setWKBOutputDims_r(GEOSContextHandle_t handle, int newDims)
GEOSGeometry * GEOSMaximumInscribedCircle_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance)
int GEOSBufferParams_setEndCapStyle_r(GEOSContextHandle_t handle, GEOSBufferParams *p, int style)
char GEOSisEmpty_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSisSimple(const GEOSGeometry *g)
void GEOSWKBWriter_setByteOrder(GEOSWKBWriter *writer, int byteOrder)
GEOSGeometry * GEOSIntersectionPrec_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double gridSize)
const GEOSCoordSequence * GEOSGeom_getCoordSeq(const GEOSGeometry *g)
int GEOSCoordSeq_setZ_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, double val)
void GEOSGeom_setUserData_r(GEOSContextHandle_t handle, GEOSGeometry *g, void *userData)
GEOSGeometry * GEOSGeom_createEmptyPoint(void)
GEOSGeometry * GEOSReverse_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOS_getWKBOutputDims_r(GEOSContextHandle_t handle)
GEOSGeometry * GEOSGeom_createEmptyCompoundCurve_r(GEOSContextHandle_t handle)
int GEOSGeomGetM(const GEOSGeometry *g, double *m)
GEOSGeometry * GEOSPolygonHullSimplify(const GEOSGeometry *g, unsigned int isOuter, double vertexNumFraction)
char GEOSisRing_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSSTRtree_build_r(GEOSContextHandle_t handle, GEOSSTRtree *tree)
GEOSGeometry * GEOSGetCentroid(const GEOSGeometry *g)
void GEOSBufferParams_destroy_r(GEOSContextHandle_t handle, GEOSBufferParams *parms)
GEOSGeometry * GEOSMinimumRotatedRectangle_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSCoordSequence * GEOSCoordSeq_create(unsigned int size, unsigned int dims)
char GEOSPreparedDistanceWithin(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, double dist)
GEOSGeometry * GEOSWKBReader_read_r(GEOSContextHandle_t handle, GEOSWKBReader *reader, const unsigned char *wkb, size_t size)
char * GEOSGeomToWKT_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSBufferWithParams_r(GEOSContextHandle_t handle, const GEOSGeometry *g, const GEOSBufferParams *p, double width)
int GEOSBufferParams_setQuadrantSegments_r(GEOSContextHandle_t handle, GEOSBufferParams *p, int quadSegs)
GEOSGeometry * GEOSConcaveHull_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double ratio, unsigned int allowHoles)
void GEOSSTRtree_iterate(GEOSSTRtree *tree, GEOSQueryCallback callback, void *userdata)
const GEOSGeometry * GEOSGetExteriorRing_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSCoordSequence * GEOSPreparedNearestPoints(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
void(*) typedef void(* GEOSMessageHandler_r)(const char *message, void *userdata)
Definition geos_c.h:118
GEOSGeometry * GEOSDelaunayTriangulation_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance, int onlyEdges)
GEOSGeometry ** GEOSGeom_releaseCollection(GEOSGeometry *collection, unsigned int *ngeoms)
void * GEOSGeom_getUserData_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
struct GEOSGeoJSONReader_t GEOSGeoJSONReader
Definition geos_c.h:1898
char GEOSRelatePattern_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, const char *imPattern)
int GEOS_getWKBByteOrder(void)
void GEOSWKBReader_destroy(GEOSWKBReader *reader)
char GEOSPreparedContainsProperly(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
void GEOSSTRtree_iterate_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, GEOSQueryCallback callback, void *userdata)
int GEOS_printDouble(double d, unsigned int precision, char *result)
GEOSGeoJSONWriter * GEOSGeoJSONWriter_create_r(GEOSContextHandle_t handle)
int GEOSDistanceIndexed(const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
int GEOSGeom_getDimensions_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSCoordSeq_getZ(const GEOSCoordSequence *s, unsigned int idx, double *val)
const GEOSGeometry * GEOSSTRtree_nearest_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, const GEOSGeometry *geom)
void GEOSWKTWriter_setOld3D_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer, int useOld3D)
GEOSGeometry * GEOSGeom_createRectangle_r(GEOSContextHandle_t handle, double xmin, double ymin, double xmax, double ymax)
GEOSGeoJSONWriter * GEOSGeoJSONWriter_create(void)
int(* GEOSDistanceCallback)(const void *item1, const void *item2, double *distance, void *userdata)
Definition geos_c.h:277
GEOSGeometry * GEOSPolygonize_valid(const GEOSGeometry *const geoms[], unsigned int ngeoms)
GEOSWKTReader * GEOSWKTReader_create(void)
struct GEOSWKBReader_t GEOSWKBReader
Definition geos_c.h:1884
char GEOSHasM(const GEOSGeometry *g)
GEOSGeometry * GEOSConcaveHullByLength_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double ratio, unsigned int allowHoles)
void GEOSGeom_destroy(GEOSGeometry *g)
int GEOS_setWKBByteOrder_r(GEOSContextHandle_t handle, int byteOrder)
GEOSGeometry * GEOSClipByRect(const GEOSGeometry *g, double xmin, double ymin, double xmax, double ymax)
GEOSGeometry * GEOSCoverageSimplifyVW_r(GEOSContextHandle_t extHandle, const GEOSGeometry *input, double tolerance, int preserveBoundary)
void(* GEOSMessageHandler)(GEOS_PRINTF_FORMAT const char *fmt,...) GEOS_PRINTF_FORMAT_ATTR(1
Definition geos_c.h:105
int GEOSDistance_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
int GEOSGeomGetM_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *m)
char GEOSTouches(const GEOSGeometry *g1, const GEOSGeometry *g2)
struct GEOSCoordSeq_t GEOSCoordSequence
Definition geos_c.h:155
GEOSGeometry * GEOSGeomGetStartPoint_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSRelatePatternMatch_r(GEOSContextHandle_t handle, const char *intMatrix, const char *imPattern)
void GEOSSTRtree_destroy(GEOSSTRtree *tree)
GEOSGeometry * GEOSGeom_createCircularString_r(GEOSContextHandle_t handle, GEOSCoordSequence *s)
void GEOSBufferParams_destroy(GEOSBufferParams *parms)
int GEOSCoordSeq_setXY_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, double x, double y)
GEOSGeomTypes
Definition geos_c.h:198
@ GEOS_MULTILINESTRING
Definition geos_c.h:210
@ GEOS_GEOMETRYCOLLECTION
Definition geos_c.h:214
@ GEOS_POINT
Definition geos_c.h:200
@ GEOS_MULTIPOLYGON
Definition geos_c.h:212
@ GEOS_LINEARRING
Definition geos_c.h:204
@ GEOS_POLYGON
Definition geos_c.h:206
@ GEOS_MULTIPOINT
Definition geos_c.h:208
@ GEOS_LINESTRING
Definition geos_c.h:202
GEOSGeometry * GEOSIntersectionPrec(const GEOSGeometry *g1, const GEOSGeometry *g2, double gridSize)
int GEOSGetNumInteriorRings(const GEOSGeometry *g)
char GEOSSTRtree_remove_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, const GEOSGeometry *g, void *item)
void GEOSSTRtree_query_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, const GEOSGeometry *g, GEOSQueryCallback callback, void *userdata)
GEOSGeometry * GEOSGeom_setPrecision_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double gridSize, int flags)
char GEOSEqualsExact(const GEOSGeometry *g1, const GEOSGeometry *g2, double tolerance)
GEOSGeometry * GEOSDisjointSubsetUnion_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSMessageHandler_r GEOSContext_setNoticeMessageHandler_r(GEOSContextHandle_t extHandle, GEOSMessageHandler_r nf, void *userData)
int GEOSCoordSeq_getOrdinate(const GEOSCoordSequence *s, unsigned int idx, unsigned int dim, double *val)
void GEOSWKBReader_destroy_r(GEOSContextHandle_t handle, GEOSWKBReader *reader)
GEOSGeometry * GEOSBoundary(const GEOSGeometry *g)
GEOSGeometry * GEOSUnaryUnion_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSDistanceIndexed_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
void GEOSWKTReader_destroy(GEOSWKTReader *reader)
GEOSGeometry * GEOSMinimumWidth(const GEOSGeometry *g)
char * GEOSWKTWriter_write(GEOSWKTWriter *writer, const GEOSGeometry *g)
GEOSGeometry * GEOSTopologyPreserveSimplify(const GEOSGeometry *g, double tolerance)
void(* GEOSQueryCallback)(void *item, void *userdata)
Definition geos_c.h:258
int GEOSCoordSeq_getSize_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int *size)
GEOSGeometry * GEOSGeomFromWKT(const char *wkt)
GEOSGeometry * GEOSWKBReader_read(GEOSWKBReader *reader, const unsigned char *wkb, size_t size)
GEOSGeometry * GEOSCoverageSimplifyVW(const GEOSGeometry *input, double tolerance, int preserveBoundary)
char GEOSContains_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
double GEOSProject_r(GEOSContextHandle_t handle, const GEOSGeometry *line, const GEOSGeometry *point)
void GEOSGeom_destroy_r(GEOSContextHandle_t handle, GEOSGeometry *g)
GEOSGeometry * GEOSTopologyPreserveSimplify_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance)
GEOSGeometry * GEOSSingleSidedBuffer_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double width, int quadsegs, int joinStyle, double mitreLimit, int leftSide)
GEOSContextHandle_t GEOS_init_r(void)
struct GEOSGeom_t GEOSGeometry
Definition geos_c.h:140
char GEOSPreparedContainsXY_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, double x, double y)
GEOSGeometry * GEOSGeom_createRectangle(double xmin, double ymin, double xmax, double ymax)
GEOSGeometry * GEOSGeom_setPrecision(const GEOSGeometry *g, double gridSize, int flags)
const void * GEOSSTRtree_nearest_generic_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, const void *item, const GEOSGeometry *itemEnvelope, GEOSDistanceCallback distancefn, void *userdata)
int GEOSGeomTypeId(const GEOSGeometry *g)
int GEOSSTRtree_build(GEOSSTRtree *tree)
GEOSGeometry * GEOSPolygonize_full_r(GEOSContextHandle_t handle, const GEOSGeometry *input, GEOSGeometry **cuts, GEOSGeometry **dangles, GEOSGeometry **invalidRings)
char GEOSCoveredBy_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGetNumCoordinates_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSWKTWriter_destroy(GEOSWKTWriter *writer)
int GEOSCoordSeq_getDimensions_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int *dims)
GEOSGeometry * GEOSGeom_createEmptyCollection_r(GEOSContextHandle_t handle, int type)
GEOSGeometry * GEOSGeom_createEmptyCircularString_r(GEOSContextHandle_t handle)
void GEOSWKBWriter_setOutputDimension(GEOSWKBWriter *writer, int newDimension)
GEOSGeometry * GEOSEnvelope(const GEOSGeometry *g)
GEOSGeometry * GEOSGeom_createPoint_r(GEOSContextHandle_t handle, GEOSCoordSequence *s)
GEOSWKBFlavors
Definition geos_c.h:244
@ GEOS_WKB_ISO
Definition geos_c.h:248
@ GEOS_WKB_EXTENDED
Definition geos_c.h:246
GEOSGeometry * GEOSDensify(const GEOSGeometry *g, double tolerance)
GEOSGeometry * GEOSConstrainedDelaunayTriangulation_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSWKBReader_setFixStructure_r(GEOSContextHandle_t handle, GEOSWKBReader *reader, char doFix)
void GEOSFree_r(GEOSContextHandle_t handle, void *buffer)
GEOSGeometry * GEOSGeom_extractUniquePoints(const GEOSGeometry *g)
int GEOSHausdorffDistance(const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
int GEOSWKBWriter_getOutputDimension(const GEOSWKBWriter *writer)
void GEOSPreparedGeom_destroy_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *g)
int GEOS_getWKBOutputDims(void)
GEOSGeometry * GEOSGeom_createPolygon_r(GEOSContextHandle_t handle, GEOSGeometry *shell, GEOSGeometry **holes, unsigned int nholes)
GEOSGeometry * GEOSGeomGetPointN(const GEOSGeometry *g, int n)
const char * GEOSversion(void)
const GEOSGeometry * GEOSGetExteriorRing(const GEOSGeometry *g)
int GEOSMakeValidParams_setMethod(GEOSMakeValidParams *p, enum GEOSMakeValidMethods method)
void initGEOS(GEOSMessageHandler notice_function, GEOSMessageHandler error_function)
GEOSGeometry * GEOSNode(const GEOSGeometry *g)
int GEOSOrientPolygons_r(GEOSContextHandle_t handle, GEOSGeometry *g, int exteriorCW)
GEOSGeometry * GEOSOffsetCurve_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double width, int quadsegs, int joinStyle, double mitreLimit)
GEOSSTRtree * GEOSSTRtree_create(size_t nodeCapacity)
GEOSGeometry * GEOSBoundary_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSFrechetDistanceDensify_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double densifyFrac, double *dist)
char GEOSPreparedRelatePattern_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, const char *im)
char GEOSPreparedIntersects_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeom_createLinearRing_r(GEOSContextHandle_t handle, GEOSCoordSequence *s)
char GEOSCrosses_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
char GEOSEquals(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGeom_getYMin(const GEOSGeometry *g, double *value)
int GEOSGeomGetX(const GEOSGeometry *g, double *x)
char GEOSPreparedDistanceWithin_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, double dist)
void GEOSSTRtree_query(GEOSSTRtree *tree, const GEOSGeometry *g, GEOSQueryCallback callback, void *userdata)
GEOSGeometry * GEOSOffsetCurve(const GEOSGeometry *g, double width, int quadsegs, int joinStyle, double mitreLimit)
GEOSGeometry * GEOSCoverageUnion_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOS_interruptCancel(void)
void GEOSMakeValidParams_destroy(GEOSMakeValidParams *parms)
int GEOSGeomGetY(const GEOSGeometry *g, double *y)
GEOSGeometry * GEOSLineMergeDirected_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSFrechetDistance(const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
void GEOSWKTReader_setFixStructure_r(GEOSContextHandle_t handle, GEOSWKTReader *reader, char doFix)
GEOSWKTWriter * GEOSWKTWriter_create_r(GEOSContextHandle_t handle)
GEOSGeometry * GEOSGeomGetPointN_r(GEOSContextHandle_t handle, const GEOSGeometry *g, int n)
GEOSGeometry * GEOSDifference(const GEOSGeometry *ga, const GEOSGeometry *gb)
GEOSGeometry * GEOSGeom_createLineString_r(GEOSContextHandle_t handle, GEOSCoordSequence *s)
GEOSGeometry * GEOSPolygonizer_getCutEdges_r(GEOSContextHandle_t handle, const GEOSGeometry *const geoms[], unsigned int ngeoms)
int GEOSMinimumClearance(const GEOSGeometry *g, double *d)
GEOSGeometry * GEOSDelaunayTriangulation(const GEOSGeometry *g, double tolerance, int onlyEdges)
GEOSGeometry * GEOSGeom_createCurvePolygon_r(GEOSContextHandle_t handle, GEOSGeometry *shell, GEOSGeometry **holes, unsigned int nholes)
char GEOSSTRtree_remove(GEOSSTRtree *tree, const GEOSGeometry *g, void *item)
GEOSGeometry * GEOSBufferWithParams(const GEOSGeometry *g, const GEOSBufferParams *p, double width)
GEOSMessageHandler GEOSContext_setNoticeHandler_r(GEOSContextHandle_t extHandle, GEOSMessageHandler nf)
int GEOSCoordSeq_getXYZ(const GEOSCoordSequence *s, unsigned int idx, double *x, double *y, double *z)
char GEOSisValidDetail_r(GEOSContextHandle_t handle, const GEOSGeometry *g, int flags, char **reason, GEOSGeometry **location)
GEOSMakeValidParams * GEOSMakeValidParams_create(void)
GEOSGeometry * GEOSGeom_createEmptyLineString_r(GEOSContextHandle_t handle)
char * GEOSGeomType_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSMinimumClearanceLine(const GEOSGeometry *g)
char * GEOSRelateBoundaryNodeRule_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, int bnr)
char GEOSDisjoint(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSCoordSeq_setX(GEOSCoordSequence *s, unsigned int idx, double val)
int GEOSCoverageIsValid(const GEOSGeometry *input, double gapWidth, GEOSGeometry **invalidEdges)
int GEOSPreparedDistance(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, double *dist)
GEOSGeometry * GEOSUnion_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSMakeValidParams * GEOSMakeValidParams_create_r(GEOSContextHandle_t extHandle)
char GEOSPreparedContains(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSPolygonHullSimplifyMode_r(GEOSContextHandle_t handle, const GEOSGeometry *g, unsigned int isOuter, unsigned int parameterMode, double parameter)
int GEOSCoordSeq_getXYZ_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, double *x, double *y, double *z)
GEOSGeometry * GEOSGeomGetEndPoint_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSWKBWriter_setFlavor(GEOSWKBWriter *writer, int flavor)
GEOSContextHandle_t initGEOS_r(GEOSMessageHandler notice_function, GEOSMessageHandler error_function)
GEOSBufCapStyles
Definition geos_c.h:617
@ GEOSBUF_CAP_SQUARE
Definition geos_c.h:626
@ GEOSBUF_CAP_FLAT
Definition geos_c.h:623
@ GEOSBUF_CAP_ROUND
Definition geos_c.h:620
GEOSGeometry * GEOSConvexHull(const GEOSGeometry *g)
GEOSVoronoiFlags
Definition geos_c.h:4400
@ GEOS_VORONOI_PRESERVE_ORDER
Definition geos_c.h:4406
@ GEOS_VORONOI_ONLY_EDGES
Definition geos_c.h:4402
GEOSGeometry * GEOSCoverageUnion(const GEOSGeometry *g)
int GEOSCoordSeq_setY_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, double val)
int GEOSMakeValidParams_setMethod_r(GEOSContextHandle_t handle, GEOSMakeValidParams *p, enum GEOSMakeValidMethods method)
unsigned char * GEOSWKBWriter_write_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, const GEOSGeometry *g, size_t *size)
GEOSGeometry * GEOSSymDifference_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
void GEOSPreparedGeom_destroy(const GEOSPreparedGeometry *g)
GEOSGeometry * GEOSNode_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSBufferParams_setJoinStyle(GEOSBufferParams *p, int joinStyle)
void GEOSCoordSeq_destroy(GEOSCoordSequence *s)
GEOSGeometry * GEOSGeomFromWKT_r(GEOSContextHandle_t handle, const char *wkt)
GEOSGeoJSONReader * GEOSGeoJSONReader_create(void)
int GEOSCoordSeq_setOrdinate(GEOSCoordSequence *s, unsigned int idx, unsigned int dim, double val)
char GEOSPreparedIntersectsXY(const GEOSPreparedGeometry *pg1, double x, double y)
int GEOSBufferParams_setMitreLimit_r(GEOSContextHandle_t handle, GEOSBufferParams *p, double mitreLimit)
char GEOSContains(const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeom_transformXYZ_r(GEOSContextHandle_t handle, const GEOSGeometry *g, GEOSTransformXYZCallback callback, void *userdata)
char GEOSPreparedIntersectsXY_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, double x, double y)
GEOSGeometry * GEOSBufferWithStyle(const GEOSGeometry *g, double width, int quadsegs, int endCapStyle, int joinStyle, double mitreLimit)
GEOSGeometry * GEOSGeom_transformXY_r(GEOSContextHandle_t handle, const GEOSGeometry *g, GEOSTransformXYCallback callback, void *userdata)
GEOSGeometry * GEOSBuildArea(const GEOSGeometry *g)
GEOSValidFlags
Definition geos_c.h:1478
@ GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE
Definition geos_c.h:1480
void GEOSWKBWriter_setByteOrder_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, int byteOrder)
GEOSGeometry * GEOSGeom_transformXYZ(const GEOSGeometry *g, GEOSTransformXYZCallback callback, void *userdata)
GEOSBufferParams * GEOSBufferParams_create(void)
struct GEOSWKBWriter_t GEOSWKBWriter
Definition geos_c.h:1891
void GEOSWKBWriter_setFlavor_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, int flavor)
char GEOSPreparedOverlaps_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
int GEOSCoordSeq_copyToBuffer(const GEOSCoordSequence *s, double *buf, int hasZ, int hasM)
void GEOSWKTReader_setFixStructure(GEOSWKTReader *reader, char doFix)
GEOSGeometry * GEOSConcaveHullOfPolygons(const GEOSGeometry *g, double lengthRatio, unsigned int isTight, unsigned int isHolesAllowed)
int GEOSGeomTypeId_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSWKTReader * GEOSWKTReader_create_r(GEOSContextHandle_t handle)
GEOSGeometry * GEOSGeom_createCompoundCurve_r(GEOSContextHandle_t handle, GEOSGeometry **curves, unsigned int ncurves)
struct GEOSWKTWriter_t GEOSWKTWriter
Definition geos_c.h:1877
char GEOSPreparedWithin_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
int GEOSSegmentIntersection(double ax0, double ay0, double ax1, double ay1, double bx0, double by0, double bx1, double by1, double *cx, double *cy)
int GEOSCoordSeq_setY(GEOSCoordSequence *s, unsigned int idx, double val)
void GEOSMakeValidParams_destroy_r(GEOSContextHandle_t handle, GEOSMakeValidParams *parms)
char GEOSPreparedCovers(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSMessageHandler_r GEOSContext_setErrorMessageHandler_r(GEOSContextHandle_t extHandle, GEOSMessageHandler_r ef, void *userData)
GEOSGeometry ** GEOSGeom_releaseCollection_r(GEOSContextHandle_t handle, GEOSGeometry *collection, unsigned int *ngeoms)
GEOSGeometry * GEOSGeoJSONReader_readGeometry(GEOSGeoJSONReader *reader, const char *geojson)
GEOSGeometry * GEOSEnvelope_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSEqualsIdentical(const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeomFromHEX_buf(const unsigned char *hex, size_t size)
unsigned char * GEOSWKBWriter_writeHEX(GEOSWKBWriter *writer, const GEOSGeometry *g, size_t *size)
GEOSGeometry * GEOSInterpolate_r(GEOSContextHandle_t handle, const GEOSGeometry *line, double d)
GEOSGeometry * GEOSSharedPaths_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGeom_getExtent_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *xmin, double *ymin, double *xmax, double *ymax)
GEOSGeometry * GEOSWKTReader_read_r(GEOSContextHandle_t handle, GEOSWKTReader *reader, const char *wkt)
char GEOSPreparedRelatePattern(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, const char *imPattern)
int GEOS_setWKBByteOrder(int byteOrder)
int GEOSCoverageIsValid_r(GEOSContextHandle_t extHandle, const GEOSGeometry *input, double gapWidth, GEOSGeometry **output)
void GEOSWKBReader_setFixStructure(GEOSWKBReader *reader, char doFix)
GEOSGeometry * GEOSInterpolate(const GEOSGeometry *line, double d)
char GEOSPreparedContains_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSInterpolateNormalized_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double d)
int GEOSCoordSeq_getY_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, double *val)
GEOSGeometry * GEOSGeomGetEndPoint(const GEOSGeometry *g)
GEOSGeometry * GEOSSnap_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double tolerance)
GEOSGeometry * GEOSPolygonize_full(const GEOSGeometry *input, GEOSGeometry **cuts, GEOSGeometry **dangles, GEOSGeometry **invalid)
char * GEOSRelateBoundaryNodeRule(const GEOSGeometry *g1, const GEOSGeometry *g2, int bnr)
double GEOSGeom_getPrecision(const GEOSGeometry *g)
GEOSGeometry * GEOSLargestEmptyCircle(const GEOSGeometry *obstacles, const GEOSGeometry *boundary, double tolerance)
char GEOSIntersects(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSCoordSeq_getDimensions(const GEOSCoordSequence *s, unsigned int *dims)
char GEOSPreparedCoveredBy(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
char GEOSCovers(const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSInterruptCallback * GEOS_interruptRegisterCallback(GEOSInterruptCallback *cb)
int GEOSGeom_getXMin_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *value)
int GEOSCoordSeq_getOrdinate_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, unsigned int dim, double *val)
int GEOSCoordSeq_getXY(const GEOSCoordSequence *s, unsigned int idx, double *x, double *y)
GEOSGeometry * GEOSSimplify_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance)
GEOSGeometry * GEOSIntersection_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSOrientPolygons(GEOSGeometry *g, int exteriorCW)
char GEOSOverlaps(const GEOSGeometry *g1, const GEOSGeometry *g2)
char GEOSHasM_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSWKTWriter_setTrim_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer, char trim)
GEOSGeometry * GEOSLineMergeDirected(const GEOSGeometry *g)
GEOSGeometry * GEOSMakeValidWithParams(const GEOSGeometry *g, const GEOSMakeValidParams *makeValidParams)
GEOSGeometry * GEOSGeomFromWKB_buf_r(GEOSContextHandle_t handle, const unsigned char *wkb, size_t size)
GEOSGeometry * GEOSPointOnSurface(const GEOSGeometry *g)
GEOSGeometry * GEOSUnaryUnionPrec(const GEOSGeometry *g, double gridSize)
void GEOSWKTWriter_setTrim(GEOSWKTWriter *writer, char trim)
GEOSGeometry * GEOSBuffer_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double width, int quadsegs)
GEOSGeometry * GEOSMinimumWidth_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSWKBReader_readHEX_r(GEOSContextHandle_t handle, GEOSWKBReader *reader, const unsigned char *hex, size_t size)
GEOSWKBByteOrders
Definition geos_c.h:228
@ GEOS_WKB_NDR
Definition geos_c.h:232
@ GEOS_WKB_XDR
Definition geos_c.h:230
GEOSGeometry * GEOSVoronoiDiagram_r(GEOSContextHandle_t extHandle, const GEOSGeometry *g, const GEOSGeometry *env, double tolerance, int flags)
void GEOSWKBWriter_setIncludeSRID_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, const char writeSRID)
GEOSGeometry * GEOSConstrainedDelaunayTriangulation(const GEOSGeometry *g)
int GEOSCoordSeq_copyToArrays(const GEOSCoordSequence *s, double *x, double *y, double *z, double *m)
GEOSGeometry * GEOSMinimumBoundingCircle(const GEOSGeometry *g, double *radius, GEOSGeometry **center)
GEOSGeometry * GEOSSymDifference(const GEOSGeometry *ga, const GEOSGeometry *gb)
char GEOSDistanceWithin_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double dist)
GEOSGeometry * GEOSMakeValidWithParams_r(GEOSContextHandle_t handle, const GEOSGeometry *g, const GEOSMakeValidParams *makeValidParams)
struct GEOSWKTReader_t GEOSWKTReader
Definition geos_c.h:1870
GEOSCoordSequence * GEOSNearestPoints_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSPolygonize(const GEOSGeometry *const geoms[], unsigned int ngeoms)
char GEOSPreparedCoveredBy_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSDisjointSubsetUnion(const GEOSGeometry *g)
GEOSGeometry * GEOSGeom_createPointFromXY(double x, double y)
GEOSGeometry * GEOSRemoveRepeatedPoints(const GEOSGeometry *g, double tolerance)
GEOSGeometry * GEOSVoronoiDiagram(const GEOSGeometry *g, const GEOSGeometry *env, double tolerance, int flags)
GEOSGeometry * GEOSGeom_createPolygon(GEOSGeometry *shell, GEOSGeometry **holes, unsigned int nholes)
void GEOSWKBWriter_setOutputDimension_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, int newDimension)
void GEOSSetSRID_r(GEOSContextHandle_t handle, GEOSGeometry *g, int SRID)
void GEOSWKTReader_destroy_r(GEOSContextHandle_t handle, GEOSWKTReader *reader)
void GEOSSTRtree_destroy_r(GEOSContextHandle_t handle, GEOSSTRtree *tree)
char * GEOSGeomType(const GEOSGeometry *g)
char GEOSPreparedDisjoint(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeom_createEmptyPoint_r(GEOSContextHandle_t handle)
GEOSRelateBoundaryNodeRules
Definition geos_c.h:1435
@ GEOSRELATE_BNR_OGC
Definition geos_c.h:1439
@ GEOSRELATE_BNR_MULTIVALENT_ENDPOINT
Definition geos_c.h:1443
@ GEOSRELATE_BNR_ENDPOINT
Definition geos_c.h:1441
@ GEOSRELATE_BNR_MOD2
Definition geos_c.h:1437
@ GEOSRELATE_BNR_MONOVALENT_ENDPOINT
Definition geos_c.h:1445
GEOSGeometry * GEOSSymDifferencePrec_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double gridSize)
char * GEOSGeoJSONWriter_writeGeometry_r(GEOSContextHandle_t handle, GEOSGeoJSONWriter *writer, const GEOSGeometry *g, int indent)
int GEOSBufferParams_setSingleSided_r(GEOSContextHandle_t handle, GEOSBufferParams *p, int singleSided)
char GEOSCrosses(const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeomGetStartPoint(const GEOSGeometry *g)
int GEOSMakeValidParams_setKeepCollapsed_r(GEOSContextHandle_t handle, GEOSMakeValidParams *p, int style)
int GEOSCoordSeq_setOrdinate_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, unsigned int dim, double val)
void GEOSSetSRID(GEOSGeometry *g, int SRID)
GEOSGeometry * GEOSGeoJSONReader_readGeometry_r(GEOSContextHandle_t handle, GEOSGeoJSONReader *reader, const char *geojson)
char * GEOSGeoJSONWriter_writeGeometry(GEOSGeoJSONWriter *writer, const GEOSGeometry *g, int indent)
GEOSGeometry * GEOSGeom_createLineString(GEOSCoordSequence *s)
unsigned char * GEOSWKBWriter_write(GEOSWKBWriter *writer, const GEOSGeometry *g, size_t *size)
GEOSGeometry * GEOSMakeValid_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSLineSubstring_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double start_fraction, double end_fdraction)
GEOSGeometry * GEOSReverse(const GEOSGeometry *g)
int GEOSWKBWriter_getFlavor(const GEOSWKBWriter *writer)
char GEOSIntersects_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
char * GEOSRelate(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSCoordSeq_getSize(const GEOSCoordSequence *s, unsigned int *size)
GEOSPolygonHullParameterModes
Definition geos_c.h:4196
@ GEOSHULL_PARAM_AREA_RATIO
Definition geos_c.h:4200
@ GEOSHULL_PARAM_VERTEX_RATIO
Definition geos_c.h:4198
int GEOSOrientationIndex(double Ax, double Ay, double Bx, double By, double Px, double Py)
GEOSGeometry * GEOSGeomFromWKB_buf(const unsigned char *wkb, size_t size)
void GEOSWKTWriter_setOutputDimension_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer, int dim)
GEOSGeometry * GEOSClipByRect_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double xmin, double ymin, double xmax, double ymax)
int GEOSGetNumInteriorRings_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSGeomGetZ(const GEOSGeometry *g, double *z)
GEOSGeometry * GEOSDensify_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance)
int GEOSWKBWriter_getFlavor_r(GEOSContextHandle_t handle, const GEOSWKBWriter *writer)
int GEOSCoordSeq_isCCW(const GEOSCoordSequence *s, char *is_ccw)
struct GEOSContextHandle_HS * GEOSContextHandle_t
Definition geos_c.h:95
int GEOSCoordSeq_copyToBuffer_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, double *buf, int hasZ, int hasM)
int GEOSCoordSeq_setXY(GEOSCoordSequence *s, unsigned int idx, double x, double y)
GEOSGeometry * GEOSMakeValid(const GEOSGeometry *g)
void GEOSCoordSeq_destroy_r(GEOSContextHandle_t handle, GEOSCoordSequence *s)
GEOSGeometry * GEOSPolygonizer_getCutEdges(const GEOSGeometry *const geoms[], unsigned int ngeoms)
int GEOSGetSRID_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSHilbertCode_r(GEOSContextHandle_t handle, const GEOSGeometry *geom, const GEOSGeometry *extent, unsigned int level, unsigned int *code)
GEOSSTRtree * GEOSSTRtree_create_r(GEOSContextHandle_t handle, size_t nodeCapacity)
int GEOSMakeValidParams_setKeepCollapsed(GEOSMakeValidParams *p, int keepCollapsed)
GEOSGeometry * GEOSUnionPrec(const GEOSGeometry *ga, const GEOSGeometry *gb, double gridSize)
int GEOSHausdorffDistanceDensify(const GEOSGeometry *g1, const GEOSGeometry *g2, double densifyFrac, double *dist)
GEOSGeometry * GEOSMinimumRotatedRectangle(const GEOSGeometry *g)
GEOSGeometry * GEOSGeom_createEmptyPolygon_r(GEOSContextHandle_t handle)
GEOSBufJoinStyles
Definition geos_c.h:633
@ GEOSBUF_JOIN_MITRE
Definition geos_c.h:643
@ GEOSBUF_JOIN_ROUND
Definition geos_c.h:638
@ GEOSBUF_JOIN_BEVEL
Definition geos_c.h:648
GEOSGeometry * GEOSGeom_createEmptyCollection(int type)
GEOSGeometry * GEOSIntersection(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSWKBWriter_getByteOrder_r(GEOSContextHandle_t handle, const GEOSWKBWriter *writer)
int GEOSGeom_getXMax_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *value)
void GEOSWKBWriter_destroy(GEOSWKBWriter *writer)
char GEOSEquals_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGeom_getXMin(const GEOSGeometry *g, double *value)
char GEOSCovers_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGeomGetLength(const GEOSGeometry *g, double *length)
char GEOSOverlaps_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSLength_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *length)
const GEOSGeometry * GEOSSTRtree_nearest(GEOSSTRtree *tree, const GEOSGeometry *geom)
unsigned char * GEOSGeomToHEX_buf(const GEOSGeometry *g, size_t *size)
GEOSCoordSequence * GEOSCoordSeq_copyFromBuffer_r(GEOSContextHandle_t handle, const double *buf, unsigned int size, int hasZ, int hasM)
GEOSWKBReader * GEOSWKBReader_create_r(GEOSContextHandle_t handle)
char GEOSDisjoint_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
char GEOSPreparedContainsProperly_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSCoordSequence * GEOSPreparedNearestPoints_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeomFromHEX_buf_r(GEOSContextHandle_t handle, const unsigned char *hex, size_t size)
GEOSCoordSequence * GEOSCoordSeq_clone(const GEOSCoordSequence *s)
int GEOSGeom_getCoordinateDimension_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSNormalize(GEOSGeometry *g)
unsigned char * GEOSGeomToWKB_buf(const GEOSGeometry *g, size_t *size)
int GEOSGetNumGeometries_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSEqualsExact_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double tolerance)
GEOSGeometry * GEOSMinimumBoundingCircle_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *radius, GEOSGeometry **center)
int GEOSWKTWriter_getOutputDimension(GEOSWKTWriter *writer)
char GEOSTouches_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSWKTReader_read(GEOSWKTReader *reader, const char *wkt)
GEOSGeometry * GEOSUnaryUnionPrec_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double gridSize)
int GEOSArea_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *area)
double GEOSGeom_getPrecision_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSWKTWriter_setOutputDimension(GEOSWKTWriter *writer, int dim)
GEOSCoordSequence * GEOSCoordSeq_copyFromArrays(const double *x, const double *y, const double *z, const double *m, unsigned int size)
GEOSWKBReader * GEOSWKBReader_create(void)
int GEOSCoordSeq_getY(const GEOSCoordSequence *s, unsigned int idx, double *val)
int GEOSCoordSeq_setZ(GEOSCoordSequence *s, unsigned int idx, double val)
int GEOSBufferParams_setMitreLimit(GEOSBufferParams *p, double mitreLimit)
int(* GEOSTransformXYCallback)(double *x, double *y, void *userdata)
Definition geos_c.h:296
void GEOSWKTWriter_setOld3D(GEOSWKTWriter *writer, int useOld3D)
int GEOSGeom_getExtent(const GEOSGeometry *g, double *xmin, double *ymin, double *xmax, double *ymax)
int GEOSCoordSeq_copyToArrays_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, double *x, double *y, double *z, double *m)
char GEOSWithin(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSNormalize_r(GEOSContextHandle_t handle, GEOSGeometry *g)
void GEOSWKBWriter_destroy_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer)
int GEOSDistance(const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
GEOSGeometry * GEOSGeom_createEmptyPolygon(void)
void finishGEOS_r(GEOSContextHandle_t handle)
char GEOSisClosed(const GEOSGeometry *g)
GEOSGeometry * GEOSPolygonHullSimplifyMode(const GEOSGeometry *g, unsigned int isOuter, unsigned int parameterMode, double parameter)
int GEOSGeom_getCoordinateDimension(const GEOSGeometry *g)
int GEOSFrechetDistance_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
char GEOSRelatePattern(const GEOSGeometry *g1, const GEOSGeometry *g2, const char *imPattern)
GEOSGeometry * GEOSBufferWithStyle_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double width, int quadsegs, int endCapStyle, int joinStyle, double mitreLimit)
char * GEOSRelate_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSConvexHull_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
struct GEOSGeoJSONWriter_t GEOSGeoJSONWriter
Definition geos_c.h:1905
unsigned char * GEOSGeomToWKB_buf_r(GEOSContextHandle_t handle, const GEOSGeometry *g, size_t *size)
GEOSGeometry * GEOSSingleSidedBuffer(const GEOSGeometry *g, double width, int quadsegs, int joinStyle, double mitreLimit, int leftSide)
GEOSGeometry * GEOSUnionCascaded(const GEOSGeometry *g)
char GEOSPreparedTouches_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSMessageHandler GEOSContext_setErrorHandler_r(GEOSContextHandle_t extHandle, GEOSMessageHandler ef)
int GEOSCoordSeq_setXYZ(GEOSCoordSequence *s, unsigned int idx, double x, double y, double z)
int GEOSWKTWriter_getOutputDimension_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer)
double GEOSProjectNormalized(const GEOSGeometry *line, const GEOSGeometry *point)
GEOSGeometry * GEOSGeom_createEmptyCircularString()
int GEOSGeom_getYMin_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *value)
GEOSGeometry * GEOSGeom_clone_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
const GEOSPreparedGeometry * GEOSPrepare_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSMinimumClearanceLine_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSGeom_setUserData(GEOSGeometry *g, void *userData)
GEOSGeometry * GEOSGeom_createCollection(int type, GEOSGeometry **geoms, unsigned int ngeoms)
void GEOSGeoJSONReader_destroy(GEOSGeoJSONReader *reader)
GEOSGeometry * GEOSGetCentroid_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSCoordSequence * GEOSCoordSeq_copyFromBuffer(const double *buf, unsigned int size, int hasZ, int hasM)
int GEOSGeomGetNumPoints(const GEOSGeometry *g)
void GEOSGeoJSONWriter_destroy(GEOSGeoJSONWriter *writer)
GEOSGeometry * GEOSGeom_transformXY(const GEOSGeometry *g, GEOSTransformXYCallback callback, void *userdata)
double GEOSProjectNormalized_r(GEOSContextHandle_t handle, const GEOSGeometry *g, const GEOSGeometry *p)
char GEOSPreparedCrosses(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
int GEOSGeomGetNumPoints_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char * GEOSisValidReason_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSPolygonize_valid_r(GEOSContextHandle_t handle, const GEOSGeometry *const geoms[], unsigned int ngems)
GEOSGeometry * GEOSGeom_createCurvePolygon(GEOSGeometry *shell, GEOSGeometry **holes, unsigned int nholes)
GEOSGeometry * GEOSLineSubstring(const GEOSGeometry *g, double start_fraction, double end_fraction)
char GEOSPreparedIntersects(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
char GEOSWithin_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSConcaveHullOfPolygons_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double lengthRatio, unsigned int isTight, unsigned int isHolesAllowed)
int GEOS_setWKBOutputDims(int newDims)
const GEOSCoordSequence * GEOSGeom_getCoordSeq_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSPointOnSurface_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSGeom_createEmptyCurvePolygon()
int GEOSFrechetDistanceDensify(const GEOSGeometry *g1, const GEOSGeometry *g2, double densifyFrac, double *dist)
struct GEOSBufParams_t GEOSBufferParams
Definition geos_c.h:169
char GEOSPreparedCovers_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSDifference_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSLargestEmptyCircle_r(GEOSContextHandle_t handle, const GEOSGeometry *g, const GEOSGeometry *boundary, double tolerance)
int GEOSOrientationIndex_r(GEOSContextHandle_t handle, double Ax, double Ay, double Bx, double By, double Px, double Py)
GEOSGeometry * GEOSPolygonHullSimplify_r(GEOSContextHandle_t handle, const GEOSGeometry *g, unsigned int isOuter, double vertexNumFraction)
GEOSPrecisionRules
Definition geos_c.h:1617
@ GEOS_PREC_NO_TOPO
Definition geos_c.h:1621
@ GEOS_PREC_KEEP_COLLAPSED
Definition geos_c.h:1623
@ GEOS_PREC_VALID_OUTPUT
Definition geos_c.h:1619
int GEOSGetNumGeometries(const GEOSGeometry *g)
void * GEOSGeom_getUserData(const GEOSGeometry *g)
int GEOSGetNumCoordinates(const GEOSGeometry *g)
struct GEOSMakeValidParams_t GEOSMakeValidParams
Definition geos_c.h:176
char GEOSRelatePatternMatch(const char *intMatrix, const char *imPattern)
void GEOS_finish_r(GEOSContextHandle_t handle)
GEOSMakeValidMethods
Definition geos_c.h:1508
@ GEOS_MAKE_VALID_LINEWORK
Definition geos_c.h:1512
@ GEOS_MAKE_VALID_STRUCTURE
Definition geos_c.h:1517
GEOSGeometry * GEOSWKBReader_readHEX(GEOSWKBReader *reader, const unsigned char *hex, size_t size)
int GEOSGeom_getYMax_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *value)
GEOSGeometry * GEOSGeom_createEmptyLineString(void)
const GEOSGeometry * GEOSGetInteriorRingN_r(GEOSContextHandle_t handle, const GEOSGeometry *g, int n)
GEOSGeometry * GEOSInterpolateNormalized(const GEOSGeometry *line, double proportion)
GEOSGeometry * GEOSGeom_createEmptyCompoundCurve()
GEOSGeometry * GEOSGeom_clone(const GEOSGeometry *g)
void GEOSGeoJSONWriter_destroy_r(GEOSContextHandle_t handle, GEOSGeoJSONWriter *writer)
int GEOSBufferParams_setSingleSided(GEOSBufferParams *p, int singleSided)
const GEOSGeometry * GEOSGetInteriorRingN(const GEOSGeometry *g, int n)
int GEOSGeomGetZ_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *z)
GEOSGeometry * GEOSUnionPrec_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double gridSize)
GEOSGeometry * GEOSGeom_createPointFromXY_r(GEOSContextHandle_t handle, double x, double y)
char GEOSEqualsIdentical_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2)
void GEOSWKTWriter_destroy_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer)
const GEOSPreparedGeometry * GEOSPrepare(const GEOSGeometry *g)
int GEOSWKBWriter_getByteOrder(const GEOSWKBWriter *writer)
char GEOSPreparedOverlaps(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
char GEOSHasZ_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSGeometry * GEOSUnion(const GEOSGeometry *ga, const GEOSGeometry *gb)
void GEOSGeoJSONReader_destroy_r(GEOSContextHandle_t handle, GEOSGeoJSONReader *reader)
GEOSGeometry * GEOSSimplify(const GEOSGeometry *g, double tolerance)
void GEOSSTRtree_insert(GEOSSTRtree *tree, const GEOSGeometry *g, void *item)
char GEOSisSimple_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
GEOSWKBWriter * GEOSWKBWriter_create_r(GEOSContextHandle_t handle)
char GEOSDistanceWithin(const GEOSGeometry *g1, const GEOSGeometry *g2, double dist)
int GEOSCoordSeq_setXYZ_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, double x, double y, double z)
int GEOSGeomGetX_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *x)
unsigned char * GEOSGeomToHEX_buf_r(GEOSContextHandle_t handle, const GEOSGeometry *g, size_t *size)
char GEOSPreparedWithin(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
char GEOSHasZ(const GEOSGeometry *g)
int GEOSWKBWriter_getOutputDimension_r(GEOSContextHandle_t handle, const GEOSWKBWriter *writer)
int GEOSBufferParams_setQuadrantSegments(GEOSBufferParams *p, int quadSegs)
void GEOS_interruptRequest(void)
char GEOSWKBWriter_getIncludeSRID_r(GEOSContextHandle_t handle, const GEOSWKBWriter *writer)
void finishGEOS(void)
int GEOSLength(const GEOSGeometry *g, double *length)
GEOSGeometry * GEOSConcaveHull(const GEOSGeometry *g, double ratio, unsigned int allowHoles)
int GEOSCoordSeq_getZ_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, double *val)
int GEOSBufferParams_setEndCapStyle(GEOSBufferParams *p, int style)
GEOSGeometry * GEOSUnionCascaded_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
int GEOSGetSRID(const GEOSGeometry *g)
GEOSGeometry * GEOSBuffer(const GEOSGeometry *g, double width, int quadsegs)
unsigned char * GEOSWKBWriter_writeHEX_r(GEOSContextHandle_t handle, GEOSWKBWriter *writer, const GEOSGeometry *g, size_t *size)
void GEOSWKTWriter_setRoundingPrecision(GEOSWKTWriter *writer, int precision)
char GEOSisClosed_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char * GEOSisValidReason(const GEOSGeometry *g)
int GEOSBufferParams_setJoinStyle_r(GEOSContextHandle_t handle, GEOSBufferParams *p, int joinStyle)
char GEOSisRing(const GEOSGeometry *g)
int GEOSCoordSeq_getXY_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, double *x, double *y)
char GEOSPreparedContainsXY(const GEOSPreparedGeometry *pg1, double x, double y)
const GEOSGeometry * GEOSGetGeometryN_r(GEOSContextHandle_t handle, const GEOSGeometry *g, int n)
int GEOSCoordSeq_getX_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, unsigned int idx, double *val)
int GEOSPreparedDistance_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2, double *dist)
GEOSWKTWriter * GEOSWKTWriter_create(void)
char * GEOSPreparedRelate_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
int GEOSSegmentIntersection_r(GEOSContextHandle_t extHandle, double ax0, double ay0, double ax1, double ay1, double bx0, double by0, double bx1, double by1, double *cx, double *cy)
char GEOSisValid(const GEOSGeometry *g)
char GEOSCoveredBy(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSGeom_getDimensions(const GEOSGeometry *g)
char GEOSPreparedDisjoint_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
int GEOSHausdorffDistance_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double *dist)
GEOSGeometry * GEOSGeom_createCircularString(GEOSCoordSequence *s)
void GEOSWKBWriter_setIncludeSRID(GEOSWKBWriter *writer, const char writeSRID)
GEOSGeometry * GEOSBuildArea_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSisEmpty(const GEOSGeometry *g)
const GEOSGeometry * GEOSGetGeometryN(const GEOSGeometry *g, int n)
int GEOSMinimumClearance_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *distance)
int GEOSHilbertCode(const GEOSGeometry *geom, const GEOSGeometry *extent, unsigned int level, unsigned int *code)
GEOSGeometry * GEOSConcaveHullByLength(const GEOSGeometry *g, double length, unsigned int allowHoles)
GEOSGeometry * GEOSGeom_createCollection_r(GEOSContextHandle_t handle, int type, GEOSGeometry **geoms, unsigned int ngeoms)
GEOSGeometry * GEOSMaximumInscribedCircle(const GEOSGeometry *g, double tolerance)
GEOSGeoJSONReader * GEOSGeoJSONReader_create_r(GEOSContextHandle_t handle)
void() GEOSInterruptCallback(void)
Definition geos_c.h:332
GEOSGeometry * GEOSGeom_createPoint(GEOSCoordSequence *s)
int GEOS_getWKBByteOrder_r(GEOSContextHandle_t handle)
char GEOSPreparedTouches(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
char GEOSWKBWriter_getIncludeSRID(const GEOSWKBWriter *writer)
GEOSGeometry * GEOSSnap(const GEOSGeometry *input, const GEOSGeometry *snap_target, double tolerance)
GEOSWKBWriter * GEOSWKBWriter_create(void)
struct GEOSSTRtree_t GEOSSTRtree
Definition geos_c.h:162
GEOSCoordSequence * GEOSCoordSeq_create_r(GEOSContextHandle_t handle, unsigned int size, unsigned int dims)
GEOSCoordSequence * GEOSNearestPoints(const GEOSGeometry *g1, const GEOSGeometry *g2)
GEOSGeometry * GEOSSymDifferencePrec(const GEOSGeometry *ga, const GEOSGeometry *gb, double gridSize)
int GEOSGeom_getXMax(const GEOSGeometry *g, double *value)
GEOSGeometry * GEOSRemoveRepeatedPoints_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double tolerance)
GEOSGeometry * GEOSGeom_extractUniquePoints_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSFree(void *buffer)
GEOSBufferParams * GEOSBufferParams_create_r(GEOSContextHandle_t handle)
int GEOSCoordSeq_getX(const GEOSCoordSequence *s, unsigned int idx, double *val)
char * GEOSPreparedRelate(const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSDifferencePrec_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double gridSize)
char * GEOSGeomToWKT(const GEOSGeometry *g)
GEOSGeometry * GEOSSharedPaths(const GEOSGeometry *g1, const GEOSGeometry *g2)
int GEOSArea(const GEOSGeometry *g, double *area)
int GEOSGeomGetLength_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *length)
char GEOSPreparedCrosses_r(GEOSContextHandle_t handle, const GEOSPreparedGeometry *pg1, const GEOSGeometry *g2)
GEOSGeometry * GEOSGeom_createCompoundCurve(GEOSGeometry **curves, unsigned int ncurves)
int GEOSGeomGetY_r(GEOSContextHandle_t handle, const GEOSGeometry *g, double *y)
int GEOSCoordSeq_isCCW_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s, char *is_ccw)
char GEOSisValid_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
void GEOSSTRtree_insert_r(GEOSContextHandle_t handle, GEOSSTRtree *tree, const GEOSGeometry *g, void *item)
GEOSCoordSequence * GEOSCoordSeq_copyFromArrays_r(GEOSContextHandle_t handle, const double *x, const double *y, const double *z, const double *m, unsigned int size)
int GEOSCoordSeq_setX_r(GEOSContextHandle_t handle, GEOSCoordSequence *s, unsigned int idx, double val)
GEOSGeometry * GEOSLineMerge_r(GEOSContextHandle_t handle, const GEOSGeometry *g)
char GEOSisValidDetail(const GEOSGeometry *g, int flags, char **reason, GEOSGeometry **location)
GEOSGeometry * GEOSPolygonize_r(GEOSContextHandle_t handle, const GEOSGeometry *const geoms[], unsigned int ngeoms)
GEOSGeometry * GEOSLineMerge(const GEOSGeometry *g)
GEOSGeometry * GEOSGeom_createEmptyCurvePolygon_r(GEOSContextHandle_t handle)
GEOSGeometry * GEOSGeom_createLinearRing(GEOSCoordSequence *s)
void GEOSWKTWriter_setRoundingPrecision_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer, int precision)
const void * GEOSSTRtree_nearest_generic(GEOSSTRtree *tree, const void *item, const GEOSGeometry *itemEnvelope, GEOSDistanceCallback distancefn, void *userdata)
int GEOSGeom_getYMax(const GEOSGeometry *g, double *value)
int GEOSHausdorffDistanceDensify_r(GEOSContextHandle_t handle, const GEOSGeometry *g1, const GEOSGeometry *g2, double densifyFrac, double *dist)
double GEOSProject(const GEOSGeometry *line, const GEOSGeometry *point)
int(* GEOSTransformXYZCallback)(double *x, double *y, double *z, void *userdata)
Definition geos_c.h:315
char * GEOSWKTWriter_write_r(GEOSContextHandle_t handle, GEOSWKTWriter *writer, const GEOSGeometry *g)
GEOSCoordSequence * GEOSCoordSeq_clone_r(GEOSContextHandle_t handle, const GEOSCoordSequence *s)
GEOSGeometry * GEOSDifferencePrec(const GEOSGeometry *ga, const GEOSGeometry *gb, double gridSize)
GEOSGeometry * GEOSUnaryUnion(const GEOSGeometry *g)
struct GEOSPrepGeom_t GEOSPreparedGeometry
Definition geos_c.h:147