I have a coordinates list looking like so
myCoordinates
> [(2, -6), (21, 19)]
I want to convert them into shapely geometry
objects so that I can do some calculations with them:
from shapely.geometry import Point
for i in myCoordinates:
c = [Point(i[0], i[1])]
print c
> [<shapely.geometry.point.Point object at 0x1044033d0>]
However, that only gives me one (!) geometry object.
But when I do this
circles = [Point(random.random(), random.random()).buffer(random.random() * 0.1) for i in range(3)]
I get three geometry objects.
print circles
> [<shapely.geometry.polygon.Polygon object at 0x1043f6890>, <shapely.geometry.polygon.Polygon object at 0x10442f8d0>, <shapely.geometry.polygon.Polygon object at 0x10442f910>]
What am I doing wrong? Why is it only converting one Point into a geometry object and not the two in my list?