Skip to content

Commit

Permalink
WKT parser: do not raise warning when parsing a WKT2:2015 TIMECRS who…
Browse files Browse the repository at this point in the history
…se TIMEUNIT is at the CS level, and not inside (#2281)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
PROJ-BOT and github-actions[bot] committed Jul 2, 2020
1 parent ed32eb0 commit 1c1585c
Show file tree
Hide file tree
Showing 4 changed files with 1,250 additions and 1,194 deletions.
13 changes: 9 additions & 4 deletions src/iso19111/io.cpp
Expand Up @@ -2642,10 +2642,15 @@ WKTParser::Private::buildCS(const WKTNodeNNPtr &node, /* maybe null */
}
} else if (ci_equal(csType, "temporal")) { // WKT2-2015
if (axisCount == 1) {
return DateTimeTemporalCS::create(
csMap,
axisList[0]); // FIXME: there are 3 possible subtypes of
// TemporalCS
if (isNull(
parentNode->GP()->lookForChild(WKTConstants::TIMEUNIT)) &&
isNull(parentNode->GP()->lookForChild(WKTConstants::UNIT))) {
return DateTimeTemporalCS::create(csMap, axisList[0]);
} else {
// Default to TemporalMeasureCS
// TemporalCount could also be possible
return TemporalMeasureCS::create(csMap, axisList[0]);
}
}
} else if (ci_equal(csType, "TemporalDateTime")) { // WKT2-2019
if (axisCount == 1) {
Expand Down

0 comments on commit 1c1585c

Please sign in to comment.