master
vv01f 2 years ago
parent 827654219e
commit fda4d6b31e
No known key found for this signature in database
GPG Key ID: 02625A16AC1D1FF6
  1. 7
      lookup.py

@ -48,8 +48,11 @@ with open( fn, 'r' ) as fp:
eprint( "looking up: "+strAddress )
location = geolocator.geocode( strAddress )
if location is not None: # its a class
# todo: ceil coords to hide true location in format string
# ~ strCoordPlace = '{:s},{:.6f},{:.6f}'.format( arrAddress[3], location.latitude, location.longitude )
# done: ceil coords to hide true location in format string
# ~ strCoordPlace = '{:s},{:.6f},{:.6f}'.format( arrAddress[3], location.latitude, location.longitude )
# todo: auto deduplicate coords
# ~ strFormatGeoCoord = '{:.'+str(precision)+'f},{:.'+str(precision)+'f}';
# ~ strGeoCoord = strFormatGeoCoord.format( location.longitude, location.latitude )
geojson = '{{"type":"Feature","geometry":{{"type":"Point","coordinates":[{:.'+str(precision)+'f},{:.'+str(precision)+'f}]}},"properties":{{"name":"anonentry","marker":"veb-it"}}}}';
strCoordPlace = geojson.format( location.longitude, location.latitude )
if firstline == False :

Loading…
Cancel
Save