DRAFT: Yet another MEGA (Make ETRS89 Great Again) fix!#4736
DRAFT: Yet another MEGA (Make ETRS89 Great Again) fix!#4736rouault wants to merge 3 commits intoOSGeo:masterfrom
Conversation
|
With my geodetic authority wishful thinking hat on: A broken connection between EPSG:4258 and ETRS89-XXX is a convienient "happy accident" that could be very helpful in communicating The New World Order of individually named realisations of ETRS89. More or less everyone would be better off using their local ETRS89-XXX but communicating that as well as actually making the transition is almost impossible without a good conversation starter (realistically I think the real conversation starter will be ETRS2YYY once we inevitably get it). Wearing all sorts of other hats: This looks like a pragmatic solution that'll keep things running seamlessly. And with the PROJ hat on I am wondering if
is realistically possible? In other words, if EPSG patches things in their end will the fix in this PR be redundant? |
I agree that for a geodesist, things aren't broken. But for a GIS user (most of our users in term of number), they are. And there's no practical workaround we can offer. For example there's no projected CRS based on 'ETRS89-AUT [2002]'.
Hard to tell before seeing how/if they address that. But the timing part isn't good for us. They will discuss that issue at a meeting end of May, among other "small" topics like NATRF2020, so after our 9.8.1 release. |
Absolutely and we should try to unfuck the situation as best as possible, which luckily is what this PR does. But I fear that's not feasible in the long term, so I hope the EPSG guys come up with a solid plan. At the moment they're testing in prod.
Yeah, that's not great timing. Ideally this issue is fixed upstream but doesn't seem likely to have that sorted in time. More likely to have that land in 9.9.0. |
jjimenezshaw
left a comment
There was a problem hiding this comment.
A Belgian friend asked me for this transformation
PROJ_NETWORK=ON projinfo -s EPSG:31370 -t EPSG:3812 -o proj
They are expecting it uses the grid file, but it doesn't. I think this PR does not cover that problem, right?
I think the problem is that BD72 transforms with the grid only into ETRS89-BEL [BEREF2011], while Belgian Lambert 2008 is in ETRS89-BEL [BEREF2002]
nope, that one is trickier indeed. EPSG:3812 which used to be "ETRS89 / Belgian Lambert 2008" was modified to be 'ETRS89-BEL [BEREF2002] / Belgian Lambert 2008' . And they created EPSG:11219 which is 'ETRS89-BEL [BEREF2011] / Belgian Lambert 2008' . The bd72lb72_etrs89lb08 grid is used when using EPSG:11219, and not EPSG:3812 . Which is technically the correct behavior here. The "workaround" for users is to switch to EPSG:11219 ... I'm wondering how much national geodetic authorities have been involved in that process... |
|
I've been made aware that ETRS89 to MGI was semi broken since the EPSG update that added a ETRS89-AUT [2002] datum and migrated the 'MGI to ETRS89 (8)' transformation using the last released grid AT_GIS_GRID_2021_09_28 to be 'MGI to ETRS89-AUT [2002]' and thus leaving user with the older transformation 'MGI to ETRS89 (5)'. This is just one manifestation of a problem that can be seen with ETRS89 in the Netherlands, Romania, etc. Until EPSG perhaps figures out a plan to restore cleanly backward compatibility (they have been made aware of those issues), I've devised the following s/hack/strategy that seems to work (TM): When looking for ETRS89 (EPSG:4258 the datum ensemble) to XXXX transformations, also query the ``alias_name`` table for old names of transformations that start with 'ETRS89 to XXXX' or 'XXXX to ETRS89', and are aliases to 'ETRS89-YYY to XXXX[something]' or 'XXXX to ETRS89-YYY[something]' newly named transformation. And then consider those 'migrated' transformations to be also used for plain ETRS89, because they used to be used for it! No new test cases, but actually reverting to old reference values before commit 047e5db (update to EPSG 12.033) that changed them.
0348d63 to
7963d39
Compare
|
@OSGeo/proj-committers @jjimenezshaw How do we want to handle the semi-broken status of 9.8.0 ? Just marking it as "retracted" in some documentation would not be enough for all automated packaging systems that look at new github releases and automatically publish a new packaged version. I believe we need a 9.8.1. What should that 9.8.1 be:
|
|
I agree that going backwards in a revision is quite estrange. So we need 9.8.1. I would wait at least this week to see the reaction from EPSG. |
A 4th option, equivalent in result to the above one but easier to do, would be to start from the current state of 9.8, and re-import the version of the EPSG database before the ETRS89-XXX changes (or at the least the problematic ones. No one has complained about 9.7.1, so that's probably a safe baseline for the database version). The main impact would be revert some changes in the test suite. |
|
It sounds to me like the best approach is to
I don't expect the EPSG to do magic in a short time frame so I assume 2 is inevitable. [0] The version used in 9.7.1 is a good starting point, it should be researched if we can get away with a more recent one. |
|
I recommend the first line of the release notes for PROJ be a warning about this here: https://github.com/OSGeo/PROJ/releases/tag/9.8.0 I would then suggest going for a 9.8.1 downgrade of the catalog at the soonest possible date as mentioned here, but without waiting on the EPSG folks.
This is all in the "no fun" category :( |
That's a good idea, Kurt. @rouault, @jjimenezshaw the issues you've encountered generally haven't been reported here at the PROJ issue tracker. In this issue is mentioned problems with ETRS89 transformations in Austria, the Netherlands and Romania. There's email communication about problems in Belgium too. Is this the full (known) picture or are there more known cases? It would be good to be able to clearly state in warnings and release notes in which cases you need to pay extra attention. I haven't heard of any issues involving ETRS89-DNK but I'll have to do some testing to rule it out at this point. |
|
Some tests I've done comparing 9.8.0 with 9.7.1 below. I should stress this should be done as a "random sampling" experiment. There are far more potential combinations than the one I've tested. For Italy the testing is definitely very partial due to the lack of public availability of the grids (little poke at the eyes of our friends at IGM ;-)) and creation of 2 datums ETRS89-ITA [IGM95] and ETRS89-ITA [RDN2008] . And I haven't tested vertical transformations KO
Different result, but likely fine?
OK
Not clear, but likely changing in good direction
Not clear if it is a bug or feature
|
|
"Catalonia ETRS89 <--> ED50 : KO" is fixed / worked around by this PR. But Serbia ETRS89 <--> MGI 1901 not . |
|
@rouault Is KO short for knocked out? In general this sample looks better than I expected, but doesn't neglect the problems already identified. Do you have the transformations above in a script that's easy to run again? Could be useful in combination with I've poked around with the Danish transformations and as far as I can tell everything is working as expected.
It is, the Swedish realisation of ETRS89 has always been known as SWEREF99. The same goes for a number of countries across Europe and those should all be fine. |
yep: non working/broken
just pasted my above report in with reference output of 9.7.1 being |
|
I tried some vertical transformations, and they are apparently giving something not 0 for the z |
These values all look about right to me. The difference between ellipsoid and geoid is in the range 40-50 m in Europe. |
and I've checked they are the same for 9.7.1 and 9.8 branch without this PR |
|
I've now tried to narrow down the EPSG update that introduced most problems. Using git bisect I come to the conclusion that EPSG v. 12.033 is the culprit introduced in 047e5dbc74ef872828 . Unfortunately that's the first EPSG update in the 9.8.0 milestone, so that's about six months of EPSG updates that'll get reverted if we base 9.8.1 on the latest revision that doesn't break ETRS89. |
working on reverting to 12.029 (only in 9.8 branch. we have time to figure out a better fix for master) |
It has been found that the introduction of the new members ETRS89-XXX since EPSG 12.033 could cause issues at least for Austria, Belgium, Netherlands, Romania, Catalonia and Serbia (not guaranteed to be an exhaustive list) when transforming between ETRS89 / EPSG:4258, or projected CRS based on it, and other datums. Fixing or workaround this might non immediatedly available changes ( OSGeo#4736 is a partial fix, but requires additional changes on EPSG side).
available in #4741 . I don't think we have lost that much in content. AFAICS 99% of the EPSG 12.029 to 12.054 changes were ETRS89 related. One of the loss identified is the recently added record for no_kv_HREF2025A_NN2000_EUREF89 grid, but this relies on the new NN2000:2025 height vertical CRS. Could likely be manually reapplied, but hopefully @himsve will agree that can wait for the more deep topics of this issue to have been sorted out first. Also some SIRGAS-Chile updates (new realization). |
It has been found that the introduction of the new members ETRS89-XXX since EPSG 12.033 could cause issues at least for Austria, Belgium, Netherlands, Romania, Catalonia and Serbia (not guaranteed to be an exhaustive list) when transforming between ETRS89 / EPSG:4258, or projected CRS based on it, and other datums. Fixing or workaround this might non immediatedly available changes ( OSGeo#4736 is a partial fix, but requires additional changes on EPSG side).
That's good.
I suspect there's very few of those cases. I think we can take that risk. I'm starting to loose track of the various PR's. We have this one (#4736) which I guess we can put on the backburner for a bit because the worst problems are adressed in #4741 that downgrades the EPSG 10.029. And then there's #4739 which backports this PR but conflicts somewhat with #4736. Is my understanding correct? |
For the 9.8 branch, the strategy is indeed to apply #4741 with the downgrade to EPSG 12.029, for a 9.8.1 to be published very soon, and defer on #4739 (9.8 backport of this PR) which I marked as DRAFT so it is not accidentally merged. For the master branch, we can wait a bit to decide the strategy. This PR (#4736) might or might not be useful depending on what kind of changes the next EPSG release will contain. |
|
Do we have a reason to delay the release of 9.8.1 with #4741 applied ? I can volunteer to do it |
Yeah, I agree. Let's see how things play out. Maybe put this PR as a draft as well so it doesn't get merged unintentionally?
No, let's get it out there. Thanks for volunteering! |
|
@rouault wrote
I fear that it was the National Land Survey of Finland who asked EPSG to create ETRS89-FIN. And by the same a large bunch of new EPSG codes were created for us, and some others were updated, for example, our most common EPSG:3067 is now using ETRS89-FIN https://epsg.org/crs/wkt/id/3067. |
actually was a two step process. First EUREF-FIN was created some time ago (it is already there in 9.7.1), and then it was renamed to "ETRS89-FIN [EUREF-FIN]" in the more recent releases when the processus of creating national realizations was generalized. I'd wish there would be a @epsg.org public mailing list and a public issue tracker, to avoid all the 1-1 discussions that occur currently. That would help more effective community and shared knowledge building to happen (I wanted to CC Roger Lott about that but can't find its github handle...) . |
|
As a suggestion to avoid future problems (maybe this should be in the mailing list), we can have a set of unit test with the expected values from the different geodetic agencies. For instance, the transformation in Belgium between EPSG:31370 and EPSG:3812 is expected to work in a specific way by the NGI. If we have test for such specific transformation, we can detect changes both in PROJ code or in EPSG pretty early. I would suggest that the agencies suggest themselves what they want to test as src_crs, dst_crs, src_point, dst_point, (tolerance). Also it is important to consider with (and maybe also without) access to cdn.proj.org. The Belgian problem described above is about using a grid or a Helmert transformation, something that would trigger without grid files anyhow. Don't forget about vertical systems and geoid models. |
We need to encourage this. Yesterday I started on a Danish test setup that could be shared as an example, but I got slowed down due to the issue reported in #4740. Once that's sorted it should be easy for geodetic agencies to set up tests for their EPSG submissions.
A template gie file with a header section for contact information would go a long way. Add a "For geodetic authorities" page on the websites on how to fill it out and contribute to the project and I think we are on the right track. A campaign to get in touch with the right people would of course also be necessary but I am confident I can get the message out on the right channels. |
bootstrap of the effort at #4744 |
Thanks, that's a good start! I have more thoughts on this, hopefully I can find some time later this week to act on them. |
|
I hope the GeoTools folks are following along so they can step over the troubles when the day comes that they update their EPSG db. |
I sent a message to the GeoServer/GeoTools developer group https://discourse.osgeo.org/t/please-notice-the-troubles-with-epsg-version-12-033/153374 |
Hi @kbevers, I can help out with a communication campaign for the Europe region. I have a contact list of geodetic authorities. Contact me on email when you want to work on this. ~Jeffrey |
Database: import aliases for coordinate operations involving ETRS89
Yet another MEGA (Make ETRS89 Great Again) fix!
I've been made aware that ETRS89 to MGI was semi broken since the EPSG
update that added a ETRS89-AUT [2002] datum and migrated the 'MGI to
ETRS89 (8)' transformation using the last released grid AT_GIS_GRID_2021_09_28
to be 'MGI to ETRS89-AUT [2002]' and thus leaving user with the older
transformation 'MGI to ETRS89 (5)'.
This is just one manifestation of a problem that can be seen with ETRS89
in the Netherlands, Romania, etc.
Until EPSG perhaps figures out a plan to restore cleanly backward
compatibility (they have been made aware of those issues), I've devised
the following s/hack/strategy that seems to work (TM):
When looking for ETRS89 (EPSG:4258 the datum ensemble) to XXXX
transformations, also query the
alias_nametable for old namesof transformations that start with 'ETRS89 to XXXX' or
'XXXX to ETRS89', and are aliases to 'ETRS89-YYY to XXXX[something]'
or 'XXXX to ETRS89-YYY[something]' newly named transformation. And then
consider those 'migrated' transformations to be also used for plain
ETRS89, because they used to be used for it!
No new test cases, but actually reverting to old reference values before
commit 047e5db (update to EPSG 12.033)
that changed them.
(to be backported to 9.8 manually)