Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jorisvandenbossche
Copy link
Collaborator

@jorisvandenbossche jorisvandenbossche commented Nov 11, 2024

Follow-up on #53

@jorisvandenbossche
Copy link
Collaborator Author

OK, rebased this on main after merging #53, so this PR is now ready

Copy link
Owner

@benbovy benbovy left a 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;
Copy link
Owner

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.

Copy link
Collaborator Author

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()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants