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

◆ out_geojson_test_srid()

static void out_geojson_test_srid ( void  )
static

Definition at line 132 of file cu_out_geojson.c.

133{
134 /* Linestring */
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 /* Polygon */
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 /* Polygon - with internal ring */
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 /* Multiline */
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 /* MultiPolygon */
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 /* GeometryCollection */
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 /* Empty GeometryCollection */
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)

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: