1

For WA I'm getting wrong results from my local setup. For the this address:

"1150 Varnum St NE, Washington, DC 20017"

SELECT g.rating, ST_X(geomout) As lon, ST_Y(geomout) As lat, (addy).* FROM geocode('1150 Varnum St NE, Washington, DC 20017', 1) As g;

I'm not getting any result:

SELECT g.rating, ST_X(geomout) As lon, ST_Y(geomout) As lat, (addy).* FROM geocode('1150 Varnum St NE, Washington, DC 20017', 1) As g;
 rating | lon | lat | address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal | location | stateabbrev | zip | parsed 
--------+-----+-----+---------+--------------+------------+------------------+---------------+----------+----------+-------------+-----+--------
(0 rows)

If I replace Washington, DC with WA

1150 Varnum St NE, WA 20017

I do get a result:

SELECT g.rating, ST_X(geomout) As lon, ST_Y(geomout) As lat, (addy).* FROM geocode('1150 Varnum St NE, WA 20017', 1) As g;



rating |        lon        |       lat        | address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal | location | stateabbrev |  zip  | parsed 
--------+-------------------+------------------+---------+--------------+------------+------------------+---------------+----------+----------+-------------+-------+--------
     55 | -117.640723859113 | 48.0459212150471 |         |              | Vernon     | St               |               |          | Burien   | WA          | 98148 | t

But this result is actually wrong:

(-117.640723859113, 48.0459212150471)

Which are way different from the ones from the census site:

(-76.993, 38.94287)

I search if WA tables are loaded and got this result:

SELECT count(*) FROM tiger_data.wa_edges;
  count  
---------
 2746400
1
  • 1
    As @JGH said, Washington state (WA) and Washington DC are totally unrelated and on opposite coasts. Your question confuses these, which makes me think you didn't understand this. Can you search your tables for tiger_data.dc_edges? Or look for fips code 11, such as a file like tl_2016_11001_edges.
    – neuhausr
    Commented Sep 14, 2017 at 16:04

1 Answer 1

4
+50

You are probably missing the District of Columbia data. Using what you have for the state of Washington, you get the "best" result, which is fairly bad (wrong town and postal code)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.