PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void out_geojson_test_geoms ( void  )
static

Definition at line 223 of file cu_out_geojson.c.

References do_geojson_test(), and do_geojson_unsupported().

Referenced by out_geojson_suite_setup().

224 {
225  /* Linestring */
227  "LINESTRING(0 1,2 3,4 5)",
228  "{\"type\":\"LineString\",\"coordinates\":[[0,1],[2,3],[4,5]]}",
229  NULL, 0, 0);
230 
231  /* Polygon */
233  "POLYGON((0 1,2 3,4 5,0 1))",
234  "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
235  NULL, 0, 0);
236 
237  /* Polygon - with internal ring */
239  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
240  "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
241  NULL, 0, 0);
242 
243  /* Multiline */
245  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
246  "{\"type\":\"MultiLineString\",\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
247  NULL, 0, 0);
248 
249  /* MultiPolygon */
251  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
252  "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
253  NULL, 0, 0);
254 
255  /* GeometryCollection */
257  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
258  "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
259  NULL, 0, 0);
260 
261  /* Empty GeometryCollection */
263  "GEOMETRYCOLLECTION EMPTY",
264  "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
265  NULL, 0, 0);
266 
267  /* Nested GeometryCollection */
269  "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))",
270  "GeoJson: geometry not supported.");
271 
272  /* CircularString */
274  "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)",
275  "lwgeom_to_geojson: 'CircularString' geometry type not supported");
276 
277  /* CompoundCurve */
279  "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))",
280  "lwgeom_to_geojson: 'CompoundCurve' geometry type not supported");
281 
282  /* CurvePolygon */
284  "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))",
285  "lwgeom_to_geojson: 'CurvePolygon' geometry type not supported");
286 
287  /* MultiCurve */
289  "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))",
290  "lwgeom_to_geojson: 'MultiCurve' geometry type not supported");
291 
292  /* MultiSurface */
294  "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)))",
295  "lwgeom_to_geojson: 'MultiSurface' geometry type not supported");
296 }
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)
static void do_geojson_unsupported(char *in, char *out)

Here is the call graph for this function:

Here is the caller graph for this function: