-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: add projection support in geoarrow output #69
base: main
Are you sure you want to change the base?
Conversation
ee0178b
to
edb3b29
Compare
edb3b29
to
ae00163
Compare
OK, rebased this on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Just two small comments.
} | ||
|
||
private: | ||
std::shared_ptr<S2::Projection> m_s2_projection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why a shared pointer is needed (apart from that this is what is used in s2geography), but that's not a big deal anyway. Feel free to ignore this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We indeed need a shared pointer to pass to s2geography (and it is also what is returned by the s2geography constructors), so then I though that might be easier to just store the shared_ptr on the object, instead of unpacking it / packing it again in a shared_ptr ?
@@ -338,6 +340,10 @@ void init_geoarrow(py::module& m) { | |||
can be a ``pyarrow.DataType`` or ``pyarrow.Field``, and you can | |||
use the ``geoarrow.pyarrow`` package to construct such geoarrow | |||
extension types. | |||
projection : spherely.Projection, default Projection.lnglat() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
projection : spherely.Projection, default Projection.lnglat() | |
projection : :py:class:`Projection`, default :py:meth:`Projection.lnglat` |
Although maybe both are rendered as hyperlinks by sphinx? Either way it needs Projection
be added to the API reference doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I added it to the API docs to see if the linking would go automatically, which I suppose will be the case>? (at least for Geography it works)
But our docs get build with the released s2geography, of course, so this is not yet included
Follow-up on #53