from shapely.geometry import MultiPoint, Point a=Point(1, 1.5) b=Point(2, 1.5) c=MultiPoint([a,b])
I am trying to create a MultiPoint column from two Point columns. Using the example code above, I can obtain a multipoint c but the data length is doubled, which I cannot use for an entire dataset. I tried different brackets, none has worked.
My dataset has 42 rows and contains columns of centroid_x (Point(a,b)) and centroid_y (Point(a,b)), which are original and destination locations. When I creating a MultiPoint column that combining (centroid_x and centroid_y), it comes out with 84 rows. I tried
list(zip(tuple(a), tuple(b))). It solved the row number issues, but couldn't work for MultiPoint. PS: the method I used works fine with LineString.