133{
134
136 "LINESTRING(0 1,2 3,4 5)",
137 "{\"type\":\"LineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[0,1],[2,3],[4,5]]}",
138 "EPSG:4326", 0, 0);
139
140
142 "POLYGON((0 1,2 3,4 5,0 1))",
143 "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
144 "EPSG:4326", 0, 0);
145
146
148 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
149 "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
150 "EPSG:4326", 0, 0);
151
152
154 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
155 "{\"type\":\"MultiLineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
156 "EPSG:4326", 0, 0);
157
158
160 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
161 "{\"type\":\"MultiPolygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
162 "EPSG:4326", 0, 0);
163
164
166 "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
167 "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
168 "EPSG:4326", 0, 0);
169
170
172 "GEOMETRYCOLLECTION EMPTY",
173 "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[]}",
174 "EPSG:4326", 0, 0);
175}
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)