This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Error importing tiger 2011 data into nominatim

1

When trying to import the the Tiger 2011 data into nominatim, I get the following parse error:

./utils/imports.php --parse-tiger-2011 data/tiger/ftp2.census.gov/geo/tiger/TIGER2011/EDGES
Processing 01001...
  File "/usr/src/nominatim/utils/tigerAddressImport.py", line 3340
    raise KeyError, 'missing FIPS code', fips
                  ^
SyntaxError: invalid syntax
Failed parse (/usr/src/nominatim/data/tiger/ftp2.census.gov/geo/tiger/TIGER2011/EDGES/tl_2011_01001_edges.zip)

I am following the directions from the answer to this question: https://help.openstreetmap.org/questions/12150/missing-house-numbers-in-local-nominatim-instance

Does this still work?

asked 11 Apr '13, 00:24

montanalow's gravatar image

montanalow
40225
accept rate: 0%


One Answer:

3

It still works. Make sure that you use python 2.x and not python 3.

answered 11 Apr '13, 14:07

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

2

Thanks, I was use using python 3, and that was the problem. Works perfect with python 2.

(11 Apr '13, 14:33) montanalow

I just finished the import, and it looks like FIPS codes > 60000 are not handled by tigerAddressImport.py, so they generate they same error, even though there is tiger EDGE data.

It looks like FIPS 60010 is American Somoa (not one of the 50 states), so I'm guessing this is intended behavior.

(12 Apr '13, 01:23) montanalow

Indeed, that is a known limitation. It should only be a matter of adding the FIPS codes in tigerAddressImport.py to make it work.

(12 Apr '13, 07:04) lonvia

Source code available on GitHub .