You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the problem is the vstack operation is expecting a 2D array, but LineString objects don't have a shape attribute.
do this instead
road_poly = Polygon(np.vstack((np.array(l_outer_border.coords), np.flipud(np.array(l_inner_border.coords)))))
the problem is the vstack operation is expecting a 2D array, but LineString objects don't have a shape attribute. do this instead road_poly = Polygon(np.vstack((np.array(l_outer_border.coords), np.flipud(np.array(l_inner_border.coords)))))
ValueError Traceback (most recent call last)
Cell In[13], line 14
12 l_inner_border = LineString(inner_border)
13 l_outer_border = LineString(outer_border)
---> 14 road_poly = Polygon(np.vstack((l_outer_border, np.flipud(l_inner_border))))
15 print("Is loop/ring? ", l_center_line.is_ring)
16 road_poly
File <array_function internals>:200, in flipud(*args, **kwargs)
File /usr/local/lib/python3.11/site-packages/numpy/lib/twodim_base.py:154, in flipud(m)
152 m = asanyarray(m)
153 if m.ndim < 1:
--> 154 raise ValueError("Input must be >= 1-d.")
155 return m[::-1, ...]
ValueError: Input must be >= 1-d.
The text was updated successfully, but these errors were encountered: