From: Regina Obe Date: Fri, 3 May 2013 04:05:29 +0000 (+0000) Subject: #1818: oops forgot to add the tests X-Git-Tag: 2.1.0beta2~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d43ae76550eb6619a034d9a0a2a630a8b5efefed;p=postgis #1818: oops forgot to add the tests git-svn-id: http://svn.osgeo.org/postgis/trunk@11342 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/in_geohash.sql b/regress/in_geohash.sql new file mode 100644 index 000000000..a5cc5b87a --- /dev/null +++ b/regress/in_geohash.sql @@ -0,0 +1,15 @@ +-- FromGeoHash +SELECT 'box2dfromgeohash_01', ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0'); +SELECT 'box2dfromgeohash_02', ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 0); +SELECT 'box2dfromgeohash_03', ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', -1); +SELECT 'box2dfromgeohash_04', ST_Box2dFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 30); + +SELECT 'geomfromgeohash_01', ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0')); +SELECT 'geomfromgeohash_02', ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 0)); +SELECT 'geomfromgeohash_03', ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', -1)); +SELECT 'geomfromgeohash_04', ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 30)); + +SELECT 'pointfromgeohash_01', ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0')); +SELECT 'pointfromgeohash_02', ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 0)); +SELECT 'pointfromgeohash_03', ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', -1)); +SELECT 'pointfromgeohash_04', ST_AsText(ST_PointFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 30)); diff --git a/regress/in_geohash_expected b/regress/in_geohash_expected new file mode 100644 index 000000000..59edcbc15 --- /dev/null +++ b/regress/in_geohash_expected @@ -0,0 +1,12 @@ +box2dfromgeohash_01|BOX(-115.172816 36.114646,-115.172816 36.114646) +box2dfromgeohash_02|BOX(-180 -90,180 90) +box2dfromgeohash_03|BOX(-115.172816 36.114646,-115.172816 36.114646) +box2dfromgeohash_04|BOX(-115.172816 36.114646,-115.172816 36.114646) +geomfromgeohash_01|POLYGON((-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646)) +geomfromgeohash_02|POLYGON((-180 -90,-180 90,180 90,180 -90,-180 -90)) +geomfromgeohash_03|POLYGON((-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646)) +geomfromgeohash_04|POLYGON((-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646,-115.172816 36.114646)) +pointfromgeohash_01|POINT(-115.172816 36.114646) +pointfromgeohash_02|POINT(0 0) +pointfromgeohash_03|POINT(-115.172816 36.114646) +pointfromgeohash_04|POINT(-115.172816 36.114646)