mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-13 14:24:08 +00:00
tiger import: convert counties to str
For python2 the gdal features come out as str and cannot be combined with unicode strings.
This commit is contained in:
@@ -161,9 +161,9 @@ def parse_shp_for_geom_and_tags( filename ):
|
|||||||
statefp = poFeature.GetField("STATEFP")
|
statefp = poFeature.GetField("STATEFP")
|
||||||
countyfp = poFeature.GetField("COUNTYFP")
|
countyfp = poFeature.GetField("COUNTYFP")
|
||||||
if (statefp != None) and (countyfp != None):
|
if (statefp != None) and (countyfp != None):
|
||||||
county_name = county_fips_data[statefp + '' + countyfp]
|
county_name = county_fips_data.get(statefp + '' + countyfp)
|
||||||
if county_name:
|
if county_name:
|
||||||
tags["tiger:county"] = county_name
|
tags["tiger:county"] = county_name.encode("utf-8")
|
||||||
|
|
||||||
# tlid = poFeature.GetField("TLID")
|
# tlid = poFeature.GetField("TLID")
|
||||||
# if tlid != None:
|
# if tlid != None:
|
||||||
|
|||||||
Reference in New Issue
Block a user