option A (current): use the same names than in shapely, i.e., Point, LineString, MultiPoint, etc.
option B: use a prefix to clearly distinguish those subclasses from shapely's Geometry subclasses, e.g., S2Point, S2LineString, etc.
With option A, it is easy to switch between shapely and s2shapely (provided that they both yield the same API) but using subclasses from both shapely and s2shapely may be less convenient.
With option B, we could do from shapely import Point ; from s2shapely import S2Point without name conflicts, but it is not easy to just reuse the same code with shapely vs. s2shapely interchangeably.
Note: the base classes have different names: shapely.Geometry vs. s2shapely.Geography.
I think we can close this. Keeping the same names makes sense given that the package name differs enough from shapely and the name of the base class is different.
How should we name the Geography subclasses?
Point
,LineString
,MultiPoint
, etc.S2Point
,S2LineString
, etc.With option A, it is easy to switch between shapely and s2shapely (provided that they both yield the same API) but using subclasses from both shapely and s2shapely may be less convenient.
With option B, we could do
from shapely import Point ; from s2shapely import S2Point
without name conflicts, but it is not easy to just reuse the same code with shapely vs. s2shapely interchangeably.Note: the base classes have different names:
shapely.Geometry
vs.s2shapely.Geography
.