aboutsummaryrefslogtreecommitdiff
path: root/src/wkt2_grammar.y
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-07-01 14:14:24 +0200
committerGitHub <noreply@github.com>2020-07-01 14:14:24 +0200
commitc99cfa8ee743251faba9bc04ee5cf5a6010359eb (patch)
tree6043af1187f971fa1af9aa7a064b43be18bfc22e /src/wkt2_grammar.y
parent42cd77130675504b6a1db5b128b41c8d5df19f9d (diff)
downloadPROJ-c99cfa8ee743251faba9bc04ee5cf5a6010359eb.tar.gz
PROJ-c99cfa8ee743251faba9bc04ee5cf5a6010359eb.zip
WKT parser: do not raise warning when parsing a WKT2:2015 TIMECRS whose TIMEUNIT is at the CS level, and not inside (#2276)
Adresses testTemporal() and testCompoundWithTime() cases of https://github.com/OSGeo/PROJ/issues/2275#issuecomment-650765730
Diffstat (limited to 'src/wkt2_grammar.y')
-rw-r--r--src/wkt2_grammar.y17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/wkt2_grammar.y b/src/wkt2_grammar.y
index 6773d1e1..8462615e 100644
--- a/src/wkt2_grammar.y
+++ b/src/wkt2_grammar.y
@@ -561,7 +561,7 @@ conversion_factor: unsigned_numeric_literal
// coordinate_system: spatial_cs | temporalcountmeasure_cs | ordinatedatetime_cs
-coordinate_system_scope_extent_identifier_remark: spatial_cs_scope_extent_identifier_remark | temporalcountmeasure_cs_scope_extent_identifier_remark | ordinaldatetime_cs_scope_extent_identifier_remark
+coordinate_system_scope_extent_identifier_remark: spatial_cs_scope_extent_identifier_remark | wkt2015temporal_cs_scope_extent_identifier_remark | temporalcountmeasure_cs_scope_extent_identifier_remark | ordinaldatetime_cs_scope_extent_identifier_remark
spatial_cs_scope_extent_identifier_remark: cs_keyword left_delimiter spatial_cs_type
wkt_separator dimension
@@ -575,6 +575,18 @@ opt_separator_spatial_axis_list_opt_separator_cs_unit_scope_extent_identifier_re
| wkt_separator spatial_axis opt_separator_spatial_axis_list_opt_separator_cs_unit_scope_extent_identifier_remark
| wkt_separator no_opt_separator_scope_extent_identifier_remark
+wkt2015temporal_cs_scope_extent_identifier_remark: cs_keyword left_delimiter T_TEMPORAL
+ wkt_separator dimension
+ opt_separator_identifier_list
+ right_delimiter
+ wkt_separator temporalcountmeasure_axis
+ opt_separator_cs_unit_scope_extent_identifier_remark
+
+opt_separator_cs_unit_scope_extent_identifier_remark:
+ | wkt_separator cs_unit
+ | wkt_separator cs_unit wkt_separator no_opt_separator_scope_extent_identifier_remark
+ | wkt_separator no_opt_separator_scope_extent_identifier_remark
+
temporalcountmeasure_cs_scope_extent_identifier_remark: cs_keyword left_delimiter temporalcountmeasure_cs_type
wkt_separator dimension
opt_separator_identifier_list
@@ -597,8 +609,7 @@ cs_keyword: T_CS
spatial_cs_type: T_AFFINE | T_CARTESIAN | T_CYLINDRICAL | T_ELLIPSOIDAL | T_LINEAR | T_PARAMETRIC | T_POLAR | T_SPHERICAL | T_VERTICAL
-// T_TEMPORAL: WKT2_2015
-temporalcountmeasure_cs_type: T_TEMPORAL | T_TEMPORALCOUNT | T_TEMPORALMEASURE
+temporalcountmeasure_cs_type: T_TEMPORALCOUNT | T_TEMPORALMEASURE
ordinaldatetime_cs_type: T_ORDINAL | T_TEMPORALDATETIME