From 2ec06869f8fbaded3cbb99ef8d0a835b8f904a6c Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Sun, 16 Sep 2018 07:13:02 +0000 Subject: [PATCH] Move geofromjson test from tickets to in_geojson so JSON-C guard can be applied. Closes #4178 for PostGIS 3.0.0 git-svn-id: http://svn.osgeo.org/postgis/trunk@16807 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/in_geojson.sql | 3 +++ regress/in_geojson_expected | 1 + regress/tickets.sql | 5 +---- regress/tickets_expected | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/regress/in_geojson.sql b/regress/in_geojson.sql index f11d7fd28..e4c31292e 100644 --- a/regress/in_geojson.sql +++ b/regress/in_geojson.sql @@ -49,3 +49,6 @@ SELECT 'geomfromgeojson_srs_4', ST_AsEWKT(ST_GeomFromGeoJSON('{"type":"GeometryC -- #3583 SELECT '#3583', ST_AsText(ST_GeomFromGeoJSON('{"type":"MultiPolygon", "coordinates":[[[139.10030364990232,35.16777444430609],5842.4224490305424]]}')); + +-- #4164 +SELECT ST_AsText(ST_GeomFromGeoJSON('{"type": "Polygon", "coordinates": [[0,0],[0,5],[5, 5],[5,0],[0,0]]}')); diff --git a/regress/in_geojson_expected b/regress/in_geojson_expected index f5e6f26cd..03df63e94 100644 --- a/regress/in_geojson_expected +++ b/regress/in_geojson_expected @@ -30,3 +30,4 @@ geomfromgeojson_srs_2|GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1)) geomfromgeojson_srs_3|GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1)) geomfromgeojson_srs_4|GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1)) #3583|MULTIPOLYGON Z (EMPTY) +ERROR: The 'coordinates' in GeoJSON polygon are not sufficiently nested diff --git a/regress/tickets.sql b/regress/tickets.sql index 1d599b68f..3ae75f92c 100644 --- a/regress/tickets.sql +++ b/regress/tickets.sql @@ -1098,16 +1098,13 @@ from ( 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]]}')); - -- #4144 DROP TABLE IF EXISTS bug_4144_table; CREATE TABLE bug_4144_table ( geom geometry NOT NULL DEFAULT NULL ); -INSERT INTO bug_4144_table (geom) +INSERT INTO bug_4144_table (geom) VALUES ('GEOMETRYCOLLECTION(POINT(-3.385894e+38 0 0),POINT(0 0 0))'); ANALYZE bug_4144_table; diff --git a/regress/tickets_expected b/regress/tickets_expected index f74000343..b31dc914d 100644 --- a/regress/tickets_expected +++ b/regress/tickets_expected @@ -335,6 +335,5 @@ ERROR: lwgeom_union: GEOS Error: TopologyException: Input geom 0 is invalid: Se #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 NOTICE: table "bug_4144_table" does not exist, skipping #4176|t -- 2.40.0