73{
74
76 "LINESTRING(0 1,2 3,4 5)",
77 "{\"type\":\"LineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[0,1],[2,3],[4,5]]}",
78 "EPSG:4326");
79
80
82 "POLYGON((0 1,2 3,4 5,0 1))",
83 "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
84 "EPSG:4326");
85
86
88 "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
89 "{\"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]]]}",
90 "EPSG:4326");
91
92
94 "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
95 "{\"type\":\"MultiLineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
96 "EPSG:4326");
97
98
100 "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
101 "{\"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]]]]}",
102 "EPSG:4326");
103
104
106 "GEOMETRYCOLLECTION EMPTY",
107 "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[]}",
108 "EPSG:4326");
109}
static void do_geojson_test(const char *exp, char *in, char *exp_srs)