111{
112
114 "LINESTRING(0 1,2 3,4 5)",
115 "{\"type\":\"LineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[0,1],[2,3],[4,5]]}",
116 "EPSG:4326", 0, 0);
117
118
120 "POLYGON((0 1,2 3,4 5,0 1))",
121 "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
122 "EPSG:4326", 0, 0);
123
124
126 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
127 "{\"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]]]}",
128 "EPSG:4326", 0, 0);
129
130
132 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
133 "{\"type\":\"MultiLineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
134 "EPSG:4326", 0, 0);
135
136
138 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
139 "{\"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]]]]}",
140 "EPSG:4326", 0, 0);
141
142
144 "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
145 "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
146 "EPSG:4326", 0, 0);
147
148
150 "GEOMETRYCOLLECTION EMPTY",
151 "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[]}",
152 "EPSG:4326", 0, 0);
153}
static void do_geojson_test(char *in, char *out, char *srs, int precision, int has_bbox)