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

◆ out_geojson_test_geoms()

static void out_geojson_test_geoms ( void  )
static

Definition at line 200 of file cu_out_geojson.c.

201{
202 /* Linestring */
204 "LINESTRING(0 1,2 3,4 5)",
205 "{\"type\":\"LineString\",\"coordinates\":[[0,1],[2,3],[4,5]]}",
206 NULL, 0, 0);
207
208 /* Polygon */
210 "POLYGON((0 1,2 3,4 5,0 1))",
211 "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
212 NULL, 0, 0);
213
214 /* Polygon - with internal ring */
216 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
217 "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
218 NULL, 0, 0);
219
220 /* Multiline */
222 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
223 "{\"type\":\"MultiLineString\",\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
224 NULL, 0, 0);
225
226 /* MultiPolygon */
228 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
229 "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
230 NULL, 0, 0);
231
232 /* GeometryCollection */
234 "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
235 "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
236 NULL, 0, 0);
237
238 /* Empty GeometryCollection */
240 "GEOMETRYCOLLECTION EMPTY",
241 "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
242 NULL, 0, 0);
243
244 /* Nested GeometryCollection */
246 "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
247 "GeoJson: geometry not supported.");
248
249 /* CircularString */
251 "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)",
252 "lwgeom_to_geojson: 'CircularString' geometry type not supported");
253
254 /* CompoundCurve */
256 "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))",
257 "lwgeom_to_geojson: 'CompoundCurve' geometry type not supported");
258
259 /* CurvePolygon */
261 "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))",
262 "lwgeom_to_geojson: 'CurvePolygon' geometry type not supported");
263
264 /* MultiCurve */
266 "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))",
267 "lwgeom_to_geojson: 'MultiCurve' geometry type not supported");
268
269 /* MultiSurface */
271 "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))",
272 "lwgeom_to_geojson: 'MultiSurface' geometry type not supported");
273}
static void do_geojson_unsupported(char *in, char *out)
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)

References do_geojson_test(), and do_geojson_unsupported().

Referenced by out_geojson_suite_setup().

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