Skip to content

Instantly share code, notes, and snippets.

@scogle
Created Aug 10, 2012
Embed
What would you like to do?
try:
if line[20]:
geo = geocode(line[20])
f.write( '\tbldg:siteAddress "%s"^^xsd:string ;\n' % line[20] )
f.write( '\tbldg:siteLocationLat "%s"^^xsd:decimal ;\n' % geo['lat'] )
f.write( '\tbldg:siteLocationLong "%s"^^xsd:decimal ;\n' % geo['lng'] )
f.write( '\twgs84_pos:lat "%s"^^xsd:decimal ;\n' % geo['lat'] )
f.write( '\twgs84_pos:long "%s"^^xsd:decimal ;\n' % geo['lng'] )
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment