This is code that used to work previously, but doesn't anymore:
import geopandas as gp
from shapely.geometry import Polygon
a = Polygon([(0, 0), (0, 1), (1, 1), (1, 0)])
b = Polygon([(0, 1), (0, 2), (1, 2), (1, 1)])
c = Polygon([(1, 0), (1, 1), (2, 1), (2, 0)])
d = Polygon([(1, 1), (1, 2), (2, 2), (2, 1)])
df = gp.GeoDataFrame({"ID": ["a", "b", "c", "d"], "geometry": [a, b, c, d]})
The error I get is this:
NotImplementedError: A polygon does not itself provide the array interface. Its rings do.
Why could this be happening? My GeoPandas version is 0.81 and Shapely version is 1.71.
numpy
do you have? I had it work withShapely==1.7.1
,geopandas==0.10.2
,numpy==1.20.3
– Seaworthy