]> granicus.if.org Git - postgis/commitdiff
#1818: oops forgot to add the tests
authorRegina Obe <lr@pcorp.us>
Fri, 3 May 2013 04:05:29 +0000 (04:05 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 3 May 2013 04:05:29 +0000 (04:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11342 b70326c6-7e19-0410-871a-916f4a2858ee

regress/in_geohash.sql [new file with mode: 0644]
regress/in_geohash_expected [new file with mode: 0644]

diff --git a/regress/in_geohash.sql b/regress/in_geohash.sql
new file mode 100644 (file)
index 0000000..a5cc5b8
--- /dev/null
@@ -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 (file)
index 0000000..59edcbc
--- /dev/null
@@ -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)