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

Better documentation and validation/normalization of CRS code usage #437

Closed
soxofaan opened this issue Jun 8, 2023 · 3 comments
Closed

Comments

@soxofaan
Copy link
Member

soxofaan commented Jun 8, 2023

A Terrascope user got a cryptic error message

...
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.openeo.geotrellis.ProjectedPolygons.fromExtent.
: org.locationtech.proj4j.UnknownAuthorityCodeException: 32616
	at org.locationtech.proj4j.CRSFactory.createFromName(CRSFactory.java:85)
...

after some digging it turned out that the CRS was wrongly encoded in process graph, something like:

      "process_id": "load_collection",
        ...
        "spatial_extent": {
          "west": 300000,
          ...
          "north": 2100000,
          "crs": "32616"
        },

In Terrascope backend we support "crs": 32616 and "crs": "EPSG:32616", but not "crs": "32616".
Apparently we document these subtleties not very good in the openeo python client docs.

It would also be better if we already catch this error client side (so bit of validation/normalization of crs in various places)

@jdries
Copy link
Collaborator

jdries commented Jun 30, 2023

extra idea: support pyproj.CRS as input

@JohanKJSchreurs
Copy link
Contributor

This PR below will also help to alleviate this problem:

Nonetheless, we do need to document more clearly how to use the CRS / EPSG codes.

JohanKJSchreurs added a commit that referenced this issue Aug 18, 2023
JohanKJSchreurs added a commit that referenced this issue Sep 4, 2023
…todoc_typehints)

Error:
Extension error (sphinx_autodoc_typehints):
Handler <function process_docstring at 0x7f5ae8e9c950> for event 'autodoc-process-docstring' threw an exception (exception: module 'matplotlib.colors' has no attribute 'ColorMap')

Cause:
Typehint was previously using different casing for `Colormap`.
Also, this type hint was encoded as a string before, but now we can use a regular type hint.
soxofaan pushed a commit that referenced this issue Sep 12, 2023
@soxofaan
Copy link
Member Author

can be closed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment