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

Remove the invalid default CRS #233

Closed
wants to merge 3 commits into from
Closed

Conversation

m-mohr
Copy link
Member

@m-mohr m-mohr commented Sep 7, 2021

Remove crs = "EPSG:4326" from examples due to the following reasons:

  1. EPSG:4326 is not a valid value according to the process specification. So specifying it reduces portability.
  2. EPSG 4326 (given as 4326) is the default CRS anyway, so it is redundant.

Also, the Python client should not send the crs as null.

I have not updated the Notebooks.

@m-mohr m-mohr force-pushed the remove_invalid_default_crs branch 5 times, most recently from b4309bd to faae692 Compare September 7, 2021 09:32
@soxofaan
Copy link
Member

soxofaan commented Sep 7, 2021

Getting rid of invalid "EPSG:4326" is fine for me

But I'm not sure we should remove it completely instead of replacing it with valid int 4326: even tough it is the default value, it has documentation value to keep it (at least) in the examples.

@m-mohr
Copy link
Member Author

m-mohr commented Sep 7, 2021

I've added a non 4326 example to the filter_bbox documentation.

If all examples use 4326 and we want some non-default examples, we should probably replace some with non 4326 bboxes as examples instead.

soxofaan pushed a commit that referenced this pull request Sep 7, 2021
@soxofaan
Copy link
Member

soxofaan commented Sep 7, 2021

To simplify review, I already cherry-picked a large part of the original PR in 75e4a58

@@ -131,7 +131,7 @@ pixels to 0 and all other pixels to 1 using a simple comparison::
s2_sceneclassification = (
connection.load_collection("TERRASCOPE_S2_TOC_V2", bands=["SCENECLASSIFICATION_20M"])
.filter_temporal(extent=["2016-01-01", "2016-03-10"])
.filter_bbox(west=5.1518, east=5.1533,south=51.1819,north=51.1846, crs=4326)
.filter_bbox(west=5.1518, east=5.1533,south=51.1819,north=51.1846)
Copy link
Member

Choose a reason for hiding this comment

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

I would keep these two cases of crs 4326 because of its documentation value

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess it would make sense to describe somewhere that 4326 is the default and can be omitted - or use another CRS for the example.

Copy link
Member

Choose a reason for hiding this comment

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

yeah that line (and other lines) "need work" anyway: you have to scroll horizontally to see everything on https://open-eo.github.io/openeo-python-client/basics.html#example-applying-a-mask

}
if crs is not None:
extent.update(crs=crs)
Copy link
Member

Choose a reason for hiding this comment

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

There should be a bit of test coverage of this (and on datacube.py too)

@m-mohr
Copy link
Member Author

m-mohr commented Sep 8, 2021

fyi: I'll need to get back to this after my vacation, so this will stay open and unresolved for about 3 weeks.

@m-mohr m-mohr self-assigned this Sep 8, 2021
@soxofaan
Copy link
Member

soxofaan commented Sep 8, 2021

No problem, I kept some things open because I wanted to improve unit test coverage of them first
I can resolve the remaining bits myself

@soxofaan
Copy link
Member

The remaining bits are now also incorporated in (1fe248f)

(closes this PR)

@soxofaan soxofaan closed this Sep 15, 2021
@soxofaan soxofaan deleted the remove_invalid_default_crs branch September 15, 2021 07:43
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.

None yet

2 participants