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

Presence/occurrences viewer in the debug UI seem to require lat/lon coordinates #179

Open
frousseu opened this issue Oct 10, 2024 · 5 comments

Comments

@frousseu
Copy link
Contributor

When occurrences are in a projected coordinate system, they are not well displayed in the occurrence viewer. They seem to be at the edges of the 180/-180 coordinates, suggesting the map requires coordinates in a geographic system.

@tpoisot
Copy link

tpoisot commented Oct 10, 2024

I know @gottacatchenall and I had this conversation / mental breakdown the other day, but since RFC7946 says WGS84 for point and polygon data, maybe we should be compliant to the standard and enforce points in WGS84. I think it would clear up a lot of potential issues, and then it's a front-end / user responsibility to project when required?

@frousseu frousseu changed the title Presence/occurrences viewer in the UI seem to require lat/lon coordinates Presence/occurrences viewer in the debug UI seem to require lat/lon coordinates Oct 10, 2024
@frousseu
Copy link
Contributor Author

So, just want to add that the problem is specific to the debug UI, not the results viewer (which I had forgotten).

I think enforcing WGS84 would be a bit of a pain, since a lot of methods require projected coordinates.

@jmlord
Copy link
Contributor

jmlord commented Oct 10, 2024

So, just want to add that the problem is specific to the debug UI, not the results viewer (which I had forgotten).

Yes, @glaroc added a logic in the viewer, where it uses the first thing that looks like a projection in the outputs to project everything, except those that look like WGS84 with a range check. While this is true most of the time, it could be false if a pipeline uses more than one projection system.

We could add similar logic to the Debug UI, but I was hoping for a real way to fix this, such as embedding it in the yml that an output can refer to a projection system in a neighboring output in order to project correctly. Too complicated UI?

@tpoisot
Copy link

tpoisot commented Oct 10, 2024

I think enforcing WGS84 would be a bit of a pain, since a lot of methods require projected coordinates.

It would, but it comes with the benefit of no surprises - we're returning points / polygons as GeoJSON. If a method requires projection, it should be handled internally by the script that requires it. I think no surprises for users >> ease of development.

@glaroc
Copy link
Contributor

glaroc commented Oct 10, 2024

The current GEOJSON spec implies that all coordinates are in WGS84. However, many of the lists of presences or pseudoabsence we have are in CSV. It would be simpler to always force this to be in WGS84, but there will likely be pipelines at some point that will require more precision that what is possible with WGS84. My feeling is that we should eventually promote the use of GeoPackage instead for all spatial data, while finding a way to add metadata for the layers present in the GPKG. But we currently don't support viewer GPKG in the UI (on the top of my to-do list for the viewer).

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

No branches or pull requests

4 participants