summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a71200a)
For python2 the gdal features come out as str and
cannot be combined with unicode strings.
statefp = poFeature.GetField("STATEFP")
countyfp = poFeature.GetField("COUNTYFP")
if (statefp != None) and (countyfp != None):
statefp = poFeature.GetField("STATEFP")
countyfp = poFeature.GetField("COUNTYFP")
if (statefp != None) and (countyfp != None):
- county_name = county_fips_data[statefp + '' + countyfp]
+ county_name = county_fips_data.get(statefp + '' + countyfp)
- tags["tiger:county"] = county_name
+ tags["tiger:county"] = county_name.encode("utf-8")
# tlid = poFeature.GetField("TLID")
# if tlid != None:
# tlid = poFeature.GetField("TLID")
# if tlid != None: