Python-GIS-book / site

Website for the Introduction to Python for Geographic Data Analysis textbook
https://pythongis.org
43 stars 14 forks source link

6.1: shapely -> shapely.geometry #159

Closed CJBarry closed 3 months ago

CJBarry commented 5 months ago

The code needs shapely.geometry.Point, not simply shapely.Point.

martinfleis commented 4 months ago

That is incorrect. With shapely >=2, all geometry objects are exposed on top level. So shapely.Point is correct and is a recommended pattern.

HTenkanen commented 3 months ago

Indeed, as @martinfleis points out (thanks!), with the latest shapely versions, you can import the geometry objects directly on top level.