static void in_geojson_test_geoms(void)
{
+
+ /* Incorrect Polygon (#4164) */
+ // do_geojson_test(
+ // "POLYGON((0 0,0 5,5 5,5 0,0 0))",
+ // "{\"type\": \"Polygon\", \"coordinates\": [[0,0],[0,5],[5, 5],[5,0],[0,0]]}",
+ // NULL);
+
/* Linestring */
do_geojson_test(
"LINESTRING(0 1,2 3,4 5)",
{
json_object* coords = NULL;
coords = json_object_array_get_idx( points, j );
- parse_geojson_coord(coords, hasz, ppa[i]);
+ if (LW_FAILURE == parse_geojson_coord(coords, hasz, ppa[i]))
+ {
+ int k;
+ for (k = 0; k <= i; k++)
+ {
+ ptarray_free(ppa[k]);
+ }
+ lwfree(ppa);
+ geojson_lwerror("The 'coordinates' in GeoJSON polygon are not sufficiently nested", 4);
+ return NULL;
+ }
}
}