]> granicus.if.org Git - postgis/commitdiff
#1077 preliminary regress tests and current outputs (formatting needs cleanup and...
authorRegina Obe <lr@pcorp.us>
Wed, 29 Jun 2011 04:23:29 +0000 (04:23 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 29 Jun 2011 04:23:29 +0000 (04:23 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7516 b70326c6-7e19-0410-871a-916f4a2858ee

extras/tiger_geocoder/tiger_2010/regress/geocode_regress [new file with mode: 0644]
extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql [new file with mode: 0644]
extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress [new file with mode: 0644]
extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql [new file with mode: 0644]

diff --git a/extras/tiger_geocoder/tiger_2010/regress/geocode_regress b/extras/tiger_geocoder/tiger_2010/regress/geocode_regress
new file mode 100644 (file)
index 0000000..7d34b89
--- /dev/null
@@ -0,0 +1,40 @@
+ 529 Main St, Boston, MA 02129 | POINT(-71.0718721304348 42.3835137826087) |      0
+
+ 75 State St, Boston, MA 02109 | POINT(-71.0556974285714 42.3590795714286) |      0
+
+ 100 Federal St, Boston, MA 02110 | POINT(-71.056314 42.354769) |      0
+
+ 529 Main St, Boston, MA 02129 | POINT(-71.0718721304348 42.3835137826087) |      0
+
+ 75 State St, Boston, MA 02109 | POINT(-71.0556974285714 42.3590795714286) |      0
+
+
+ 529 Main St, Boston, MA 02129 | POINT(-71.0718721304348 42.3835137826087) |      0
+
+ 75 State St, Boston, MA 02109 | POINT(-71.0556974285714 42.3590795714286) |      0
+
+ 100 Federal St, Boston, MA 02110 | POINT(-71.056314 42.354769) |      0
+
+ 530 Main St, Boston, MA 02129 | POINT(-71.071734 42.38345) |      0
+
+ 76 State St, Boston, MA 02109 | POINT(-71.0561527692308 42.3589996153846) |      0
+
+ 101 Federal St, Boston, MA 02110 | POINT(-71.0563038 42.3546946) |      0
+
+
+
+ 101 Federal St, Boston, MA 02110 | POINT(-71.0563038 42.3546946) |     10
+
+ 101 Federal St, Boston, MA 02110          | POINT(-71.0563038 42.3546946)             |     10
+ 101 Federal St, Blackstone, MA 01504      | POINT(-71.5246987130121 42.0288604697987) |     15
+ 101 Federal St, Lynn, MA 01905            | POINT(-70.9678344129808 42.4659009057427) |     15
+ 101 Federal St, Lawrence, MA 01810        | POINT(-71.2012528459153 42.6901540310566) |     17
+ 101 Federal St, Andover, MA 01810         | POINT(-71.2012528459153 42.6901540310566) |     17
+ 101 Federal St, Northampton, MA 01062     | POINT(-72.655372 42.32273)                |     17
+ 101 Federal St, Belchertown, MA 01007     | POINT(-72.4120567596665 42.2944575040247) |     17
+ 101 Federal St, Agawam Town, MA 01001     | POINT(-72.622305017362 42.0837072292948)  |     18
+ 101 Federal St, Millers Falls, MA 01349   | POINT(-72.4993935958437 42.5680170002944) |     22
+ 101 Federal St, Greenfield Town, MA 01301 | POINT(-72.5990944761905 42.5900632380952) |     22
+ Federal Ct, Boston, MA 02110              | POINT(-71.0567205 42.354134)              |     24
+ Federal Ln, Dedham, MA 02026              | POINT(-71.183565 42.238295)               |     33
+
diff --git a/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql b/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql
new file mode 100644 (file)
index 0000000..c4622cf
--- /dev/null
@@ -0,0 +1,28 @@
+\timing
+-- Limit 1
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129',1);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('75 State Street, Boston, MA 02109',1);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',1);
+-- default
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129');
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('75 State Street, Boston, MA 02109');
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('100 Federal Street, Boston,MA 02109');
+
+-- 20
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129',20);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('75 State Street, Boston, MA 02109',20);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',20);
+
+-- Limit 1 - Test caching effects
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('530 Main Street, Boston MA, 02129',1);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('76 State Street, Boston MA, 02109',1);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('101 Federal Street, Boston MA, 02109',20);
+
+-- Partial address
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('101 Federal Street, Boston MA',20);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('101 Federal Street, Boston MA',1);
+
+--Test misspellings and missing zip --
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('101 Fedaral Street, Boston, MA',1);
+SELECT pprint_addy(addy) As address, ST_AsText(geomout) As pt, rating FROM geocode('101 Fedaral Street, Boston, MA',50);
+\timing
\ No newline at end of file
diff --git a/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress b/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress
new file mode 100644 (file)
index 0000000..488bbe2
--- /dev/null
@@ -0,0 +1,8 @@
+    3937 |              | 43RD       | Ave              | S             |          | MINNEAPOLIS | MN          | 55406 | t
+
+     529 |              | Main       | St               |               |          | Boston   | MA          | 02129 | t
+
+     529 |              | Main       | St               |               |          | Boston   | MA          | 02129 | t
+
+     529 |              | Main       | St               |               |          | Boston MA |             |     | t
+
diff --git a/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql b/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql
new file mode 100644 (file)
index 0000000..ff8a141
--- /dev/null
@@ -0,0 +1,9 @@
+\timing
+SELECT * FROM normalize_address('3937 43RD AVE S, MINNEAPOLIS, MN 55406');
+-- comma in wrong spot
+SELECT * FROM normalize_address('529 Main Street, Boston MA, 02129');
+-- comma in right spot
+SELECT * FROM normalize_address('529 Main Street, Boston MA, 02129');
+-- partial address
+SELECT * FROM normalize_address('529 Main Street, Boston MA');
+\timing
\ No newline at end of file