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

Definition at line 178 of file cu_out_geojson.c.

References do_geojson_test().

Referenced by out_geojson_suite_setup().

179 {
180  /* Linestring */
182  "LINESTRING(0 1,2 3,4 5)",
183  "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}",
184  NULL, 0, 1);
185 
186  /* Polygon */
188  "POLYGON((0 1,2 3,4 5,0 1))",
189  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
190  NULL, 0, 1);
191 
192  /* Polygon - with internal ring */
194  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
195  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
196  NULL, 0, 1);
197 
198  /* Multiline */
200  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
201  "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
202  NULL, 0, 1);
203 
204  /* MultiPolygon */
206  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
207  "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
208  NULL, 0, 1);
209 
210  /* GeometryCollection */
212  "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))",
213  "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
214  NULL, 0, 1);
215 
216  /* Empty GeometryCollection */
218  "GEOMETRYCOLLECTION EMPTY",
219  "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
220  NULL, 0, 1);
221 }
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)

Here is the call graph for this function:

Here is the caller graph for this function: