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)",
}
lwfree(ppa);
geojson_lwerror("The 'coordinates' in GeoJSON polygon are not sufficiently nested", 4);
- return NULL;
+ return NULL;
}
}
}
select ST_GeogFromText('SRID=4326;POINT(1.0 2.0)') as a, ST_GeogFromText('SRID=4326;POINT(1.0 1.0)') as b
) as points;
+-- #4164
+SELECT ST_AsText(ST_GeomFromGeoJSON('{"type": "Polygon", "coordinates": [[0,0],[0,5],[5, 5],[5,0],[0,0]]}'));
-- Clean up
DELETE FROM spatial_ref_sys;
#4089|LINESTRING Z (1 1 1,3 3 1)
ERROR: lwgeom_pointonsurface: GEOS Error: TopologyException: Input geom 1 is invalid: Self-intersection
#4081|f|t
+ERROR: The 'coordinates' in GeoJSON polygon are not sufficiently nested