我已将老虎数据加载到我的 postgres 数据库中。
SELECT count(*) FROM tiger_data.county_all;
count-> 3233
SELECT count(*) FROM tiger_data.state_all;
count-> 56
扩展正在工作
SELECT na.address,
na.streetname,na.streettypeabbrev,
na.zip
FROM normalize_address('1 Devonshire Place, Boston, MA 02109') AS na;
返回
address | streetname | streettypeabbrev | zip
---------+------------+------------------+-------
1 | Devonshire | Pl | 02109
还设置了数据库的搜索路径
ALTER DATABASE geocoder
SET search_path TO '"$user", public, tiger';
但是,当我运行查询来搜索某些内容时,我得到空结果。
SELECT g.rating,
ST_AsText(ST_SnapToGrid(g.geomout,0.00001)) As wktlonlat,
(addy).address As stno, (addy).streetname As street,
(addy).streettypeabbrev As styp, (addy).location As city,
(addy).stateabbrev As st,(addy).zip
FROM geocode('424 3rd St, Davis, CA 95616',1) As g;
什么都不返回
我按照本教程 如何在不到 5 天内制作 PostGIS TIGER 地理编码 器但我仍然无法让它工作。
任何帮助将不胜感激。
谢谢。