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

CRS representations across services appear to still use PROJ4 strings #25

Closed
annakrystalli opened this issue Oct 26, 2021 · 8 comments
Closed
Assignees
Labels

Comments

@annakrystalli
Copy link
Collaborator

@salvafern I have noticed that sf objects returned for the servers often encode CRSs in the deprecated PROJ4 string format (eg +init=epsg:3034 returned by emodnet_get_layers(service="geology_seabed_substrate_maps", layers = "seabed_substrate_1m", reduce_layers = T)).

I know there's been big changes in the geospatial software landscape in terms of expressing CRSs as a result of changes in versions of the PROJ library > 5 & GDAL > 3 (see for example discussions of handling changes in package rgdal and here in sf. So my questions are:

  • Can we check which versions of PROJ & GDAL the servers are using?
  • Is there are reason CRSs are being expressed using deprecated PROJ4 strings?
  • Do we need to assess:
    • potential risks of reduced accuracy as a result of using deprecated PROJ strings?
    • upcoming problems from using deprecated representations?
@LennertSchepers
Copy link
Member

Can we check which versions of PROJ & GDAL the servers are using?
I did a quick search and I don't think this is possible automatically. For example, looking at GeoServer (one of the most popular open source software for hosting GIS layers and OGC services) it's quite hard to determine the GDAL version used:

"GeoServer and GDAL are under continuous development/improvement so each release series of GeoServer has some requirements in terms of which GDAL
version need to be used. This is usually reported in the documentation unless there are typos or some sections don't get updated properly during updates. Example: since you are using 2.16, you need GDAL 2.x as reported here: https://docs.geoserver.org/stable/en/user/data/raster/gdal.html#installing-gdal-native-libraries " (from https://sourceforge.net/p/geoserver/mailman/message/36779617/ )

It's possible to retrieve the geoserver version (and other server metadata) by a REST API but it requires authentication. (See comment here: https://gis.stackexchange.com/a/269834 and https://docs.geoserver.org/stable/en/user/rest/about.html)

@maelle maelle added this to the rOpenSci submission milestone Apr 26, 2022
@maelle maelle assigned salvafern and unassigned annakrystalli Apr 7, 2023
@maelle
Copy link
Collaborator

maelle commented Feb 28, 2024

@salvafern what work is involved here? Thank you!

@salvafern
Copy link
Collaborator

salvafern commented Mar 4, 2024

I am not sure I am reproducing correctly but I don't see a PROJ4 string now:

library(EMODnetWFS)
t <- emodnet_get_layers(service="geology_seabed_substrate_maps", layers = "seabed_substrate_1m", reduce_layers = T)
# ✔ WFS client created successfully
# ℹ Service: "https://drive.emodnet-geology.eu/geoserver/gtk/wfs"
# ℹ Version: "2.0.0"

sf::st_crs(t)
# Coordinate Reference System:
#   User input: epsg:3034 
# wkt:
#   PROJCRS["ETRS89-extended / LCC Europe",
#           BASEGEOGCRS["ETRS89",
#                       ENSEMBLE["European Terrestrial Reference System 1989 ensemble",
#                                MEMBER["European Terrestrial Reference Frame 1989"],
#                                MEMBER["European Terrestrial Reference Frame 1990"],
#                                MEMBER["European Terrestrial Reference Frame 1991"],
#                                MEMBER["European Terrestrial Reference Frame 1992"],
#                                MEMBER["European Terrestrial Reference Frame 1993"],
#                                MEMBER["European Terrestrial Reference Frame 1994"],
#                                MEMBER["European Terrestrial Reference Frame 1996"],
#                                MEMBER["European Terrestrial Reference Frame 1997"],
#                                MEMBER["European Terrestrial Reference Frame 2000"],
#                                MEMBER["European Terrestrial Reference Frame 2005"],
#                                MEMBER["European Terrestrial Reference Frame 2014"],
#                                ELLIPSOID["GRS 1980",6378137,298.257222101,
#                                          LENGTHUNIT["metre",1]],
#                                ENSEMBLEACCURACY[0.1]],
#                       PRIMEM["Greenwich",0,
#                              ANGLEUNIT["degree",0.0174532925199433]],
#                       ID["EPSG",4258]],
#           CONVERSION["Europe Conformal 2001",
#                      METHOD["Lambert Conic Conformal (2SP)",
#                             ID["EPSG",9802]],
#                      PARAMETER["Latitude of false origin",52,
#                                ANGLEUNIT["degree",0.0174532925199433],
#                                ID["EPSG",8821]],
#                      PARAMETER["Longitude of false origin",10,
#                                ANGLEUNIT["degree",0.0174532925199433],
#                                ID["EPSG",8822]],
#                      PARAMETER["Latitude of 1st standard parallel",35,
#                                ANGLEUNIT["degree",0.0174532925199433],
#                                ID["EPSG",8823]],
#                      PARAMETER["Latitude of 2nd standard parallel",65,
#                                ANGLEUNIT["degree",0.0174532925199433],
#                                ID["EPSG",8824]],
#                      PARAMETER["Easting at false origin",4000000,
#                                LENGTHUNIT["metre",1],
#                                ID["EPSG",8826]],
#                      PARAMETER["Northing at false origin",2800000,
#                                LENGTHUNIT["metre",1],
#                                ID["EPSG",8827]]],
#           CS[Cartesian,2],
#           AXIS["northing (N)",north,
#                ORDER[1],
#                LENGTHUNIT["metre",1]],
#           AXIS["easting (E)",east,
#                ORDER[2],
#                LENGTHUNIT["metre",1]],
#           USAGE[
#             SCOPE["Conformal mapping at scales of 1:500,000 and smaller."],
#             AREA["Europe - European Union (EU) countries and candidates. Europe - onshore and offshore: Albania; Andorra; Austria; Belgium; Bosnia and Herzegovina; Bulgaria; Croatia; Cyprus; Czechia; Denmark; Estonia; Faroe Islands; Finland; France; Germany; Gibraltar; Greece; Hungary; Iceland; Ireland; Italy; Kosovo; Latvia; Liechtenstein; Lithuania; Luxembourg; Malta; Monaco; Montenegro; Netherlands; North Macedonia; Norway including Svalbard and Jan Mayen; Poland; Portugal including Madeira and Azores; Romania; San Marino; Serbia; Slovakia; Slovenia; Spain including Canary Islands; Sweden; Switzerland; Turkey; United Kingdom (UK) including Channel Islands and Isle of Man; Vatican City State."],
#             BBOX[24.6,-35.58,84.73,44.83]],
#           ID["EPSG",3034]]

In any case I would say we move forward by:

  • Check if any EMODnet lot returns PROJ4 strings.
  • If they do: contact each EMODnet lot to ask what version of GDAL they use (ask via EMODnet Central Portal most likely). Ask if there are plans to update.

@maelle
Copy link
Collaborator

maelle commented Mar 5, 2024

Thanks!

Check if any EMODnet lot returns PROJ4 strings.

So you mean making one query per service to check?

@salvafern
Copy link
Collaborator

Yes - if none return the PROJ4 string then we could just close this issue.

@maelle
Copy link
Collaborator

maelle commented Mar 15, 2024

Checks under way! @salvafern could we also ask centrally about the versions of PROJ and GDAL used?

@maelle
Copy link
Collaborator

maelle commented Mar 21, 2024

Does this look ok in terms of projections:

https://gist.github.com/maelle/20c8ba8950a4b68dcb92e5f8f734aca8

@maelle
Copy link
Collaborator

maelle commented Apr 16, 2024

if no error/warning/message from sf, probably ok

@maelle maelle closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants