forked from geopandas/geopandas
/
_geos.pxi
154 lines (119 loc) · 9.5 KB
/
_geos.pxi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# The beginnings of a Cython definition of GEOS. In the future much of this
# could be auto-generated.
from libc.stdint cimport uintptr_t
cdef extern from "geos_c.h":
ctypedef void *GEOSContextHandle_t
ctypedef struct GEOSGeometry
ctypedef struct GEOSCoordSequence
ctypedef struct GEOSPreparedGeometry
ctypedef struct GEOSWKTReader
ctypedef struct GEOSWKBReader
ctypedef struct GEOSWKBWriter
GEOSCoordSequence *GEOSCoordSeq_create_r(GEOSContextHandle_t, unsigned int, unsigned int) nogil
GEOSCoordSequence *GEOSGeom_getCoordSeq_r(GEOSContextHandle_t, GEOSGeometry *) nogil
int GEOSCoordSeq_getSize_r(GEOSContextHandle_t, GEOSCoordSequence *, unsigned int *) nogil
int GEOSCoordSeq_setX_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double) nogil
int GEOSCoordSeq_setY_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double) nogil
int GEOSCoordSeq_setZ_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double) nogil
int GEOSCoordSeq_getX_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double *) nogil
int GEOSCoordSeq_getY_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double *) nogil
int GEOSCoordSeq_getZ_r(GEOSContextHandle_t, GEOSCoordSequence *, int, double *) nogil
GEOSGeometry *GEOSGeom_createPoint_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
GEOSGeometry *GEOSGeom_createLineString_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
GEOSGeometry *GEOSGeom_createLinearRing_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
GEOSGeometry *GEOSGeom_clone_r(GEOSContextHandle_t, GEOSGeometry *) nogil
GEOSCoordSequence *GEOSCoordSeq_clone_r(GEOSContextHandle_t, GEOSCoordSequence *) nogil
GEOSGeometry *GEOSGeom_createEmptyPolygon()
GEOSGeometry *GEOSGeom_createEmptyPolygon_r(GEOSContextHandle_t handle) nogil
void GEOSGeom_destroy_r(GEOSContextHandle_t, GEOSGeometry *) nogil
char GEOSContains_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSCoveredBy_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSCovers_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSCrosses_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSDisjoint_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSIntersects_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSOverlaps_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSTouches_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSWithin_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedContains_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedContainsProperly_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedCoveredBy_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedCovers_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedCrosses_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedDisjoint_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedIntersects_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedOverlaps_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedTouches_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
char GEOSPreparedWithin_r(GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) nogil
GEOSPreparedGeometry *GEOSPrepare_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSPreparedGeometry *GEOSPrepare(const GEOSGeometry*)
void GEOSPreparedGeom_destroy_r(GEOSContextHandle_t, const GEOSPreparedGeometry* ) nogil
void GEOSPreparedGeom_destroy(const GEOSPreparedGeometry* )
char GEOSHasZ(const GEOSGeometry*) nogil
char GEOSHasZ_r(GEOSContextHandle_t, GEOSGeometry *) nogil
char GEOSisRing_r(GEOSContextHandle_t, GEOSGeometry *) nogil
char GEOSisClosed_r(GEOSContextHandle_t, GEOSGeometry *) nogil
char GEOSEquals(const GEOSGeometry * , const GEOSGeometry *) nogil
char GEOSEquals_r(GEOSContextHandle_t , const GEOSGeometry * , const GEOSGeometry *) nogil
char GEOSEqualsExact(const GEOSGeometry * , const GEOSGeometry * , double) nogil
char GEOSEqualsExact_r(GEOSContextHandle_t , const GEOSGeometry * , const GEOSGeometry * , double) nogil
GEOSGeometry *GEOSDifference(const GEOSGeometry*, const GEOSGeometry*)
GEOSGeometry *GEOSSymDifference(const GEOSGeometry*, const GEOSGeometry*)
GEOSGeometry *GEOSBoundary(const GEOSGeometry*)
GEOSGeometry *GEOSUnion(const GEOSGeometry*, const GEOSGeometry*)
GEOSGeometry *GEOSUnaryUnion(const GEOSGeometry*)
GEOSGeometry *GEOSGetCentroid(const GEOSGeometry*)
GEOSGeometry *GEOSDifference_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSSymDifference_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSBoundary_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSUnion_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSUnaryUnion_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSGetCentroid_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSPointOnSurface_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSConvexHull_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSConvexHull(GEOSContextHandle_t, const GEOSGeometry*)
GEOSGeometry *GEOSEnvelope(const GEOSGeometry*)
GEOSGeometry *GEOSEnvelope_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSGeometry *GEOSGetExteriorRing(const GEOSGeometry*)
GEOSGeometry *GEOSGetExteriorRing_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
int GEOSGeomTypeId(const GEOSGeometry*) nogil
int GEOSGeomTypeId_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
int GEOSArea_r(GEOSContextHandle_t, const GEOSGeometry*, double *) nogil
int GEOSLength_r(GEOSContextHandle_t, const GEOSGeometry*, double *) nogil
int GEOSDistance_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double *) nogil
int GEOSDistanceIndexed_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double *) nogil
int GEOSHausdorffDistance_r(GEOSContextHandle_t, const GEOSGeometry *, const GEOSGeometry *, double *) nogil
int GEOSHausdorffDistanceDensify_r(GEOSContextHandle_t, const GEOSGeometry *, const GEOSGeometry *,double, double *) nogil
int GEOSFrechetDistance_r(GEOSContextHandle_t, const GEOSGeometry *,const GEOSGeometry *, double *) nogil
int GEOSFrechetDistanceDensify_r(GEOSContextHandle_t, const GEOSGeometry *, const GEOSGeometry *, double , double *) nogil
int GEOSGeomGetLength_r(GEOSContextHandle_t, const GEOSGeometry *, double *) nogil
double GEOSProject_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
double GEOSProjectNormalized_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
char GEOSisValid_r(GEOSContextHandle_t, const GEOSGeometry* ) nogil
char GEOSisEmpty_r(GEOSContextHandle_t, const GEOSGeometry* ) nogil
char GEOSisSimple_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
char GEOSisRing_r(GEOSContextHandle_t, const GEOSGeometry* ) nogil
char GEOSHasZ_r(GEOSContextHandle_t, const GEOSGeometry* g) nogil
char GEOSisClosed_r(GEOSContextHandle_t, const GEOSGeometry *) nogil
GEOSGeometry *GEOSDifference_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSSymDifference_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSUnion_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSIntersection_r(GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) nogil
GEOSGeometry *GEOSBufferWithStyle_r(GEOSContextHandle_t, const GEOSGeometry*, double, int, int, int, double) nogil
GEOSWKTReader *GEOSWKTReader_create_r(GEOSContextHandle_t) nogil
void GEOSWKTReader_destroy_r(GEOSContextHandle_t, GEOSWKTReader*) nogil
GEOSGeometry *GEOSWKTReader_read_r(GEOSContextHandle_t, GEOSWKTReader* , const char *) nogil
GEOSWKBReader *GEOSWKBReader_create_r(GEOSContextHandle_t) nogil
void GEOSWKBReader_destroy_r(GEOSContextHandle_t, GEOSWKBReader*) nogil
GEOSGeometry *GEOSWKBReader_read_r(GEOSContextHandle_t, GEOSWKBReader* , const unsigned char *, size_t) nogil
GEOSWKBWriter *GEOSWKBWriter_create_r(GEOSContextHandle_t) nogil
void GEOSWKBWriter_destroy_r(GEOSContextHandle_t , GEOSWKBWriter* ) nogil
unsigned char *GEOSWKBWriter_write_r(GEOSContextHandle_t, GEOSWKBWriter*, const GEOSGeometry*, size_t *) nogil
GEOSGeometry *GEOSGeom_createCollection_r(GEOSContextHandle_t, int, GEOSGeometry**, unsigned int) nogil
int GEOSGetNumCoordinates_r(GEOSContextHandle_t, const GEOSGeometry*) nogil
GEOSContextHandle_t GEOS_init_r()
void GEOS_finish_r(GEOSContextHandle_t)
cdef GEOSPreparedGeometry *geos_from_prepared(shapely_geom) except *:
"""Get the Prepared GEOS geometry pointer from the given shapely geometry."""
cdef uintptr_t geos_geom = shapely_geom.__geom__
return <GEOSPreparedGeometry *>geos_geom