I am using shapely
to convert longitudes and latitudes contained in a CSV to WKB format.
For context, the CSV is parsed using a python AWS Lambda code.
The format of the file being parsed is as follows:
Name | Comments | Yes/No | Latitude | Longitude |
---|---|---|---|---|
Test_1 | This is a test | Yes | 56.872993679521244 | -4.141840954280135 |
Test_2 | This is a test | No | 55.20394960316738 | -2.5378432182396935 |
I have then tried to convert these to WKB by calling the longtiude/latitude columns
g = ('Point(longitude, latitude)')
new = wkb.dumps(g, hex=True, srid=4326)
print (new)
but I am getting the error 'str' object has no attribute '_geom'
How can I overcome this? The CSV has 100s of rows and I don't want to have to convert each long/lat individually - I just wanted to call the two columns and it would produce the WKB for each point.