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

Definition at line 132 of file cu_in_geojson.c.

References do_geojson_test().

Referenced by in_geojson_suite_setup().

133 {
134  /* Linestring */
136  "LINESTRING(0 1,2 3,4 5)",
137  "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}",
138  NULL, 0, 1);
139 
140  /* Polygon */
142  "POLYGON((0 1,2 3,4 5,0 1))",
143  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
144  NULL, 0, 1);
145 
146  /* Polygon - with internal ring */
148  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
149  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
150  NULL, 0, 1);
151 
152  /* Multiline */
154  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
155  "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
156  NULL, 0, 1);
157 
158  /* MultiPolygon */
160  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
161  "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
162  NULL, 0, 1);
163 
164  /* GeometryCollection */
166  "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))",
167  "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
168  NULL, 0, 1);
169 
170  /* Empty GeometryCollection */
172  "GEOMETRYCOLLECTION EMPTY",
173  "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
174  NULL, 0, 1);
175 }
static void do_geojson_test(const char *exp, char *in, char *exp_srs, int precision, int has_bbox)
Definition: cu_in_geojson.c:22

Here is the call graph for this function:

Here is the caller graph for this function: