diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-10-10 14:23:42 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-10-10 14:23:50 +0200 |
| commit | 5163741254088b7f3fbb651349463cd2942df4f6 (patch) | |
| tree | f99750451df364d1410c6e17073d8b513cb6b82e /src/wkt2_grammar.y | |
| parent | a5dd7bbb8512a10280001491bd3fecc599fd4eca (diff) | |
| download | PROJ-5163741254088b7f3fbb651349463cd2942df4f6.tar.gz PROJ-5163741254088b7f3fbb651349463cd2942df4f6.zip | |
WKT2:2019 import/export: handle DATUM (at top level object) with PRIMEM
This is a peculiarity of the WKT grammar. Despite ISO 19111 saying that the
prime meridian is a component of the datum, in WKT, they are placed at the
same level, for backward compatibility with earlier WKT versions. So handle
exporting and importing that. The fix is only for situation where DATUM is
the top level object (was working fine otherwise), which is a uncommon use
case. And to limit the amount of issue, on export emit the prime meridian only
if it is not Greenwich.
Diffstat (limited to 'src/wkt2_grammar.y')
| -rw-r--r-- | src/wkt2_grammar.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wkt2_grammar.y b/src/wkt2_grammar.y index 8462615e..4f30b5b2 100644 --- a/src/wkt2_grammar.y +++ b/src/wkt2_grammar.y @@ -209,7 +209,7 @@ input: map_projection datum: - geodetic_reference_frame_without_pm | datum_ensemble | + geodetic_reference_frame_with_opt_pm | datum_ensemble | vertical_reference_frame | engineering_datum | parametric_datum | temporal_datum @@ -967,6 +967,10 @@ irm_longitude_opt_separator_identifier_list: // Geodetic reference frame +geodetic_reference_frame_with_opt_pm: + geodetic_reference_frame_without_pm + | geodetic_reference_frame_without_pm wkt_separator prime_meridian + geodetic_reference_frame_without_pm: geodetic_reference_frame_keyword left_delimiter datum_name wkt_separator ellipsoid opt_separator_datum_anchor_identifier_list |
