0

For Example I created a MultiPoint with shapely and the Zip Codes and added a Buffer of 0.01 to get an Area, but how do I find out how to set the Buffer appropriate for the Points or perhaps for each single Point?

from shapely.geometry import MultiPoint
from geopy.geocoders import GoogleV3

geocoder = GoogleV3()
zipCodes = [12043, 12045, 12047, 12049, 12051, 12053, 12055, 12057, 12059]
country = 'Germany'

coordinates = list(map(lambda x: geocoder.geocode(str(x) + country), zipCodes))

coordinates = list(map(lambda x: (x.latitude, x.longitude), coordinates))

region = MultiPoint(coordinates)
region.buffer(0.01)

That's how the region looks at the moment:

That's how the region looks at the moment

Georgy
  • 12,464
  • 7
  • 65
  • 73
Paul
  • 500
  • 3
  • 8
  • StackOverflow doesn't really like questions asking to "recommend a library", but you might be after something like [Geocoder](http://geocoder.readthedocs.io/) – asongtoruin Mar 21 '17 at 09:54
  • I'm not clear exactly what you're trying to achieve. You have a multipoint shape and a buffer already; what do you want that you don't already have? – larsks Dec 14 '17 at 18:54
  • The Point is to get a shapely MultiPoint Object that reflects the actual borders of the ZIP region or of multiple combined ZIP regions. – Paul Dec 18 '17 at 16:24

0 Answers0