PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ in_geojson_test_geoms()

static void in_geojson_test_geoms ( void  )
static

Definition at line 156 of file cu_in_geojson.c.

157{
158 /* Linestring */
160 "LINESTRING(0 1,2 3,4 5)",
161 "{\"type\":\"LineString\",\"coordinates\":[[0,1],[2,3],[4,5]]}",
162 NULL);
163
164 /* Polygon */
166 "POLYGON((0 1,2 3,4 5,0 1))",
167 "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
168 NULL);
169
170 /* Polygon - with internal ring */
172 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
173 "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
174 NULL);
175
176 /* Multiline */
178 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
179 "{\"type\":\"MultiLineString\",\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
180 NULL);
181
182 /* MultiPolygon */
184 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
185 "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
186 NULL);
187
188 /* MultiPolygon with internal rings */
189 /* See http://trac.osgeo.org/postgis/ticket/2216 */
191 "MULTIPOLYGON(((4 0,0 -4,-4 0,0 4,4 0),(2 0,0 2,-2 0,0 -2,2 0)),((24 0,20 -4,16 0,20 4,24 0),(22 0,20 2,18 0,20 -2,22 0)),((44 0,40 -4,36 0,40 4,44 0),(42 0,40 2,38 0,40 -2,42 0)))",
192 "{'type':'MultiPolygon','coordinates':[[[[4,0],[0,-4],[-4,0],[0,4],[4,0]],[[2,0],[0,2],[-2,0],[0,-2],[2,0]]],[[[24,0],[20,-4],[16,0],[20,4],[24,0]],[[22,0],[20,2],[18,0],[20,-2],[22,0]]],[[[44,0],[40,-4],[36,0],[40,4],[44,0]],[[42,0],[40,2],[38,0],[40,-2],[42,0]]]]}",
193 NULL);
194
195 /* GeometryCollection */
197 "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
198 "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
199 NULL);
200
201 /* Empty GeometryCollection */
203 "GEOMETRYCOLLECTION EMPTY",
204 "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
205 NULL);
206
207 /* Empty Point */
209 "POINT EMPTY",
210 "{\"type\":\"Point\",\"coordinates\":[]}",
211 NULL);
212
213 /* Empty LineString */
215 "LINESTRING EMPTY",
216 "{\"type\":\"LineString\",\"coordinates\":[]}",
217 NULL);
218
219 /* Empty Polygon */
221 "POLYGON EMPTY",
222 "{\"type\":\"Polygon\",\"coordinates\":[]}",
223 NULL);
224
225 /* Empty MultiPoint */
227 "MULTIPOINT EMPTY",
228 "{\"type\":\"MultiPoint\",\"coordinates\":[]}",
229 NULL);
230
231 /* Empty MultiPolygon */
233 "MULTIPOLYGON EMPTY",
234 "{\"type\":\"MultiPolygon\",\"coordinates\":[]}",
235 NULL);
236}
static void do_geojson_test(const char *exp, char *in, char *exp_srs)

References do_geojson_test().

Referenced by in_geojson_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: