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

◆ in_geojson_test_bbox()

static void in_geojson_test_bbox ( void  )
static

Definition at line 111 of file cu_in_geojson.c.

112{
113 /* Linestring */
115 "LINESTRING(0 1,2 3,4 5)",
116 "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}",
117 NULL);
118
119 /* Polygon */
121 "POLYGON((0 1,2 3,4 5,0 1))",
122 "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
123 NULL);
124
125 /* Polygon - with internal ring */
127 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
128 "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
129 NULL);
130
131 /* Multiline */
133 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
134 "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
135 NULL);
136
137 /* MultiPolygon */
139 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
140 "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
141 NULL);
142
143 /* GeometryCollection */
145 "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))",
146 "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
147 NULL);
148
149 /* Empty GeometryCollection */
151 "GEOMETRYCOLLECTION EMPTY",
152 "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
153 NULL);
154}
static void do_geojson_test(const char *exp, char *in, char *exp_srs)

References do_geojson_test().

Referenced by in_geojson_suite_setup().

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