PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void in_geojson_test_geoms ( void  )
static

Definition at line 177 of file cu_in_geojson.c.

References do_geojson_test().

Referenced by in_geojson_suite_setup().

178 {
179  /* Linestring */
181  "LINESTRING(0 1,2 3,4 5)",
182  "{\"type\":\"LineString\",\"coordinates\":[[0,1],[2,3],[4,5]]}",
183  NULL, 0, 0);
184 
185  /* Polygon */
187  "POLYGON((0 1,2 3,4 5,0 1))",
188  "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
189  NULL, 0, 0);
190 
191  /* Polygon - with internal ring */
193  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
194  "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
195  NULL, 0, 0);
196 
197  /* Multiline */
199  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
200  "{\"type\":\"MultiLineString\",\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
201  NULL, 0, 0);
202 
203  /* MultiPolygon */
205  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
206  "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
207  NULL, 0, 0);
208 
209  /* MultiPolygon with internal rings */
210  /* See http://trac.osgeo.org/postgis/ticket/2216 */
212  "MULTIPOLYGON(((4 0,0 -4,-4 0,0 4,4 0),(2 0,0 2,-2 0,0 -2,2 0)),((24 0,20 -4,16 0,20 4,24 0),(22 0,20 2,18 0,20 -2,22 0)),((44 0,40 -4,36 0,40 4,44 0),(42 0,40 2,38 0,40 -2,42 0)))",
213  "{'type':'MultiPolygon','coordinates':[[[[4,0],[0,-4],[-4,0],[0,4],[4,0]],[[2,0],[0,2],[-2,0],[0,-2],[2,0]]],[[[24,0],[20,-4],[16,0],[20,4],[24,0]],[[22,0],[20,2],[18,0],[20,-2],[22,0]]],[[[44,0],[40,-4],[36,0],[40,4],[44,0]],[[42,0],[40,2],[38,0],[40,-2],[42,0]]]]}",
214  NULL, 0, 0);
215 
216  /* GeometryCollection */
218  "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))",
219  "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
220  NULL, 0, 0);
221 
222  /* Empty GeometryCollection */
224  "GEOMETRYCOLLECTION EMPTY",
225  "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
226  NULL, 0, 0);
227 
228 }
static void do_geojson_test(const char *exp, char *in, char *exp_srs, int precision, int has_bbox)
Definition: cu_in_geojson.c:22

Here is the call graph for this function:

Here is the caller graph for this function: