I have 2 columns in a CSV called Longitude and Latitude which are being parsed using my Python AWS Lambda Code.
I am using the shapely module with the following code to convert the long/lats into geometry format
g = wkt.loads('POINT(-2.5378432182396935 55.20394960316738)')
new = wkb.dumps(g, hex=True, srid=4326)
print (new)
Is there a way to call the two columns so that each entry is individually given their wkb, rather than put each point in individually?
e.g.
g = wkt.loads('POINT('longitude' 'latitude')')
new = wkb.dumps(g, hex=True, srid=4326)
print (new)
You could instantiate a
MultiPointobject (instead of going through wkt) using lat/lon pairs: