mapillary-python-sdk icon indicating copy to clipboard operation
mapillary-python-sdk copied to clipboard

Fix Polygon creation in {shape,geojson}_features_controller

Open ducksoup opened this issue 1 year ago • 0 comments

shapely.geometry.shape expects as input a GeoJSON-like mapping which, in the case of a polygon, should contain a list of lists of points. The current code instead tries to append all points to a single flat list. This causes errors such as:

Traceback (most recent call last):
  File "shapely/speedups/_speedups.pyx", line 252, in shapely.speedups._speedups.geos_linearring_from_py
AttributeError: 'list' object has no attribute '__array_interface__'

This PR fixes this issue.

ducksoup avatar Feb 28 '23 09:02 ducksoup