From: Sandro Santilli Date: Wed, 19 Dec 2012 18:18:57 +0000 (+0000) Subject: Put JSON input test where it belongs (#2156) X-Git-Tag: 2.1.0beta2~279 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be8369ada31514dcd4b7d0f0d4bce6dc55e87af0;p=postgis Put JSON input test where it belongs (#2156) This time do not include other unrelated changes... git-svn-id: http://svn.osgeo.org/postgis/trunk@10861 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/in_geojson.sql b/regress/in_geojson.sql index e77ad32af..7310397b3 100644 --- a/regress/in_geojson.sql +++ b/regress/in_geojson.sql @@ -10,3 +10,6 @@ select 'geomfromgeojson_06',st_astext(st_geomfromgeojson(st_asgeojson('MULTIPOLY select '#1434: Next two errors'; select '#1434.1',ST_GeomFromGeoJSON('{ "type": "Point", "crashme": [100.0, 0.0] }'); select '#1434.2',ST_GeomFromGeoJSON('crashme');; + +-- #2130 -- +SELECT '#2130', ST_NPoints(ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,32],[-117,32],[-117,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-117,32],[-117,32],[-117,32],[-117,32]],[[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,33]]]]}')); diff --git a/regress/in_geojson_expected b/regress/in_geojson_expected index 8e218c78a..a3f59d4b7 100644 --- a/regress/in_geojson_expected +++ b/regress/in_geojson_expected @@ -7,3 +7,4 @@ geomfromgeojson_06|MULTIPOLYGON(((0 0,1 1,1 0,0 0))) #1434: Next two errors ERROR: Unable to find 'coordinates' in GeoJSON string ERROR: unexpected character (at offset 0) +#2130|8 diff --git a/regress/tickets.sql b/regress/tickets.sql index 6afba5fb9..6bb9ba979 100644 --- a/regress/tickets.sql +++ b/regress/tickets.sql @@ -802,7 +802,6 @@ FROM (SELECT 'POLYGON((1 1 1, 5 1 1,5 5 1, 1 5 1,1 1 1))'::geometry as a, 'LINES SELECT '#2108', ST_AsEWKT(ST_Line_Interpolate_Point('SRID=3395;LINESTRING M EMPTY'::geometry, 0.5)); SELECT '#2117', ST_AsEWKT(ST_PointOnSurface('SRID=3395;MULTIPOLYGON M EMPTY'::geometry)); -SELECT '#2130', ST_NPoints(ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,32],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,32],[-117,32],[-117,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-116,32],[-117,32],[-117,32],[-117,32],[-117,32]],[[-117,33],[-117,33],[-117,33],[-117,33],[-117,33],[-117,32],[-117,33]]]]}')); SELECT '#2145', round(ST_Length(St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000))::numeric,0); diff --git a/regress/tickets_expected b/regress/tickets_expected index 670ed1fe2..7bcf711c9 100644 --- a/regress/tickets_expected +++ b/regress/tickets_expected @@ -235,5 +235,4 @@ ERROR: invalid GML representation #2112b|1|LINESTRING(1 1 1,1 0 1) #2108|SRID=3395;POINTM EMPTY #2117|SRID=3395;POINTM EMPTY -#2130|8 #2145|6792004