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

◆ out_geojson_test_bbox()

static void out_geojson_test_bbox ( void  )
static

Definition at line 155 of file cu_out_geojson.c.

156{
157 /* Linestring */
159 "LINESTRING(0 1,2 3,4 5)",
160 "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}",
161 NULL, 0, 1);
162
163 /* Polygon */
165 "POLYGON((0 1,2 3,4 5,0 1))",
166 "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
167 NULL, 0, 1);
168
169 /* Polygon - with internal ring */
171 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
172 "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
173 NULL, 0, 1);
174
175 /* Multiline */
177 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
178 "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
179 NULL, 0, 1);
180
181 /* MultiPolygon */
183 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
184 "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
185 NULL, 0, 1);
186
187 /* GeometryCollection */
189 "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))",
190 "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
191 NULL, 0, 1);
192
193 /* Empty GeometryCollection */
195 "GEOMETRYCOLLECTION EMPTY",
196 "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
197 NULL, 0, 1);
198}
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)

References do_geojson_test().

Referenced by out_geojson_suite_setup().

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