PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ in_geojson_test_bbox()

static void in_geojson_test_bbox ( void  )
static

Definition at line 107 of file cu_in_geojson.c.

References do_geojson_test().

Referenced by in_geojson_suite_setup().

108 {
109  /* Linestring */
111  "LINESTRING(0 1,2 3,4 5)",
112  "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}",
113  NULL, 0, 1);
114 
115  /* Polygon */
117  "POLYGON((0 1,2 3,4 5,0 1))",
118  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}",
119  NULL, 0, 1);
120 
121  /* Polygon - with internal ring */
123  "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))",
124  "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}",
125  NULL, 0, 1);
126 
127  /* Multiline */
129  "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))",
130  "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}",
131  NULL, 0, 1);
132 
133  /* MultiPolygon */
135  "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))",
136  "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}",
137  NULL, 0, 1);
138 
139  /* GeometryCollection */
141  "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))",
142  "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}",
143  NULL, 0, 1);
144 
145  /* Empty GeometryCollection */
147  "GEOMETRYCOLLECTION EMPTY",
148  "{\"type\":\"GeometryCollection\",\"geometries\":[]}",
149  NULL, 0, 1);
150 }
static void do_geojson_test(const char *exp, char *in, char *exp_srs, int precision, int has_bbox)
Definition: cu_in_geojson.c:21
Here is the call graph for this function:
Here is the caller graph for this function: