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
Lat/Lng vs Lng/Lat order is one of the biggest sources for user bugs/questions/issues, especially when creating Polygon and MultiPolygon objects. Lng/Lat order is what's used in many other tools like geopandas and GeoJSON, but the H3 C library uses Lat/Lng order.
h3-py will stick with Lat/Lng order, but we can alleviate the mistakes caused from switching orders between tools by potentially making the ordering explicit in the name. An additional goal is to make it obvious that our polygon and multipolygon objects are different from shapelyPolygon and MultiPolygon objects.
Some options:
H3Poly and H3MultiPoly (current; users need to read docstrings to know/recall ordering)
LatLngPoly and LatLngMultiPoly (explicit, but a bit long)
constructors like H3Poly(outer, *holes, latlng=True) (short name, "latlng choice" more prominent in the constructor signature than docstring)
I'm leaning towards LatLngPoly and LatLngMultiPoly but wanted to have a separate discussion here for future reference rather than having it hidden in the comments of #301.
I see it as a decision of how forcefully we want to remind the user of the ordering. In ordering of increasing forcefulness:
documentation or function docstrings
constructor signature
class name
The text was updated successfully, but these errors were encountered:
Lat/Lng vs Lng/Lat order is one of the biggest sources for user bugs/questions/issues, especially when creating Polygon and MultiPolygon objects. Lng/Lat order is what's used in many other tools like
geopandas
andGeoJSON
, but the H3 C library uses Lat/Lng order.h3-py
will stick withLat/Lng
order, but we can alleviate the mistakes caused from switching orders between tools by potentially making the ordering explicit in the name. An additional goal is to make it obvious that our polygon and multipolygon objects are different fromshapely
Polygon
andMultiPolygon
objects.Some options:
H3Poly
andH3MultiPoly
(current; users need to read docstrings to know/recall ordering)LatLngPoly
andLatLngMultiPoly
(explicit, but a bit long)H3Poly(outer, *holes, latlng=True)
(short name, "latlng choice" more prominent in the constructor signature than docstring)I'm leaning towards
LatLngPoly
andLatLngMultiPoly
but wanted to have a separate discussion here for future reference rather than having it hidden in the comments of #301.I see it as a decision of how forcefully we want to remind the user of the ordering. In ordering of increasing forcefulness:
The text was updated successfully, but these errors were encountered: