aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/io.cpp65
-rw-r--r--src/wkt1_generated_parser.c322
-rw-r--r--src/wkt1_grammar.y4
3 files changed, 213 insertions, 178 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp
index 503b6be5..b8e835d7 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -4145,11 +4145,19 @@ createBoundCRSSourceTransformationCRS(const crs::CRSPtr &sourceCRS,
CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
const auto *nodeP = node->GP();
- auto &datumNode =
+ const auto &nodeValue = nodeP->value();
+ auto &vdatumNode =
nodeP->lookForChild(WKTConstants::VDATUM, WKTConstants::VERT_DATUM,
WKTConstants::VERTICALDATUM, WKTConstants::VRF);
auto &ensembleNode = nodeP->lookForChild(WKTConstants::ENSEMBLE);
- if (isNull(datumNode) && isNull(ensembleNode)) {
+ // like in ESRI VERTCS["WGS_1984",DATUM["D_WGS_1984",
+ // SPHEROID["WGS_1984",6378137.0,298.257223563]],
+ // PARAMETER["Vertical_Shift",0.0],
+ // PARAMETER["Direction",1.0],UNIT["Meter",1.0]
+ auto &geogDatumNode = ci_equal(nodeValue, WKTConstants::VERTCS)
+ ? nodeP->lookForChild(WKTConstants::DATUM)
+ : null_node;
+ if (isNull(vdatumNode) && isNull(geogDatumNode) && isNull(ensembleNode)) {
throw ParsingException("Missing VDATUM or ENSEMBLE node");
}
@@ -4164,28 +4172,50 @@ CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
}
auto &dynamicNode = nodeP->lookForChild(WKTConstants::DYNAMIC);
- auto datum =
- !isNull(datumNode)
- ? buildVerticalReferenceFrame(datumNode, dynamicNode).as_nullable()
- : nullptr;
+ auto vdatum =
+ !isNull(geogDatumNode)
+ ? VerticalReferenceFrame::create(
+ PropertyMap()
+ .set(IdentifiedObject::NAME_KEY,
+ buildGeodeticReferenceFrame(geogDatumNode,
+ PrimeMeridian::GREENWICH,
+ null_node)
+ ->nameStr())
+ .set("VERT_DATUM_TYPE", "2002"))
+ .as_nullable()
+ : !isNull(vdatumNode)
+ ? buildVerticalReferenceFrame(vdatumNode, dynamicNode)
+ .as_nullable()
+ : nullptr;
auto datumEnsemble =
!isNull(ensembleNode)
? buildDatumEnsemble(ensembleNode, nullptr, false).as_nullable()
: nullptr;
auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
- const auto &nodeValue = nodeP->value();
if (isNull(csNode) && !ci_equal(nodeValue, WKTConstants::VERT_CS) &&
!ci_equal(nodeValue, WKTConstants::VERTCS) &&
!ci_equal(nodeValue, WKTConstants::BASEVERTCRS)) {
ThrowMissing(WKTConstants::CS_);
}
- auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
- auto verticalCS = nn_dynamic_pointer_cast<VerticalCS>(cs);
+ auto verticalCS = nn_dynamic_pointer_cast<VerticalCS>(
+ buildCS(csNode, node, UnitOfMeasure::NONE));
if (!verticalCS) {
ThrowNotExpectedCSType("vertical");
}
+ if (vdatum && vdatum->getWKT1DatumType() == "2002" &&
+ &(verticalCS->axisList()[0]->direction()) == &(AxisDirection::UP)) {
+ verticalCS =
+ VerticalCS::create(
+ util::PropertyMap(),
+ CoordinateSystemAxis::create(
+ util::PropertyMap().set(IdentifiedObject::NAME_KEY,
+ "ellipsoidal height"),
+ "h", AxisDirection::UP, verticalCS->axisList()[0]->unit()))
+ .as_nullable();
+ }
+
auto &props = buildProperties(node);
if (esriStyle_ && dbContext_) {
@@ -4246,10 +4276,10 @@ CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
"North American Vertical Datum 1988");
propsDatum.set(Identifier::CODE_KEY, 5103);
propsDatum.set(Identifier::CODESPACE_KEY, Identifier::EPSG);
- datum =
+ vdatum =
VerticalReferenceFrame::create(propsDatum).as_nullable();
const auto dummyCRS =
- VerticalCRS::create(PropertyMap(), datum, datumEnsemble,
+ VerticalCRS::create(PropertyMap(), vdatum, datumEnsemble,
NN_NO_CHECK(verticalCS));
const auto model(Transformation::create(
propsModel, dummyCRS, dummyCRS, nullptr,
@@ -4265,7 +4295,7 @@ CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
if (!isNull(geoidModelNode)) {
auto &propsModel = buildProperties(geoidModelNode);
const auto dummyCRS = VerticalCRS::create(
- PropertyMap(), datum, datumEnsemble, NN_NO_CHECK(verticalCS));
+ PropertyMap(), vdatum, datumEnsemble, NN_NO_CHECK(verticalCS));
const auto model(Transformation::create(
propsModel, dummyCRS, dummyCRS, nullptr,
OperationMethod::create(PropertyMap(),
@@ -4275,10 +4305,10 @@ CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
}
auto crs = nn_static_pointer_cast<CRS>(VerticalCRS::create(
- props, datum, datumEnsemble, NN_NO_CHECK(verticalCS)));
+ props, vdatum, datumEnsemble, NN_NO_CHECK(verticalCS)));
- if (!isNull(datumNode)) {
- auto &extensionNode = datumNode->lookForChild(WKTConstants::EXTENSION);
+ if (!isNull(vdatumNode)) {
+ auto &extensionNode = vdatumNode->lookForChild(WKTConstants::EXTENSION);
const auto &extensionChildren = extensionNode->GP()->children();
if (extensionChildren.size() == 2) {
if (ci_equal(stripQuotes(extensionChildren[0]), "PROJ4_GRIDS")) {
@@ -6524,12 +6554,13 @@ BaseObjectNNPtr WKTParser::createFromWKT(const std::string &wkt) {
auto vertCRS =
d->buildVerticalCRS(WKTNode::createFrom(
wkt, indexEnd, 0, indexEnd));
- return CompoundCRS::create(
+ return CompoundCRS::createLax(
util::PropertyMap().set(
IdentifiedObject::NAME_KEY,
horizCRS->nameStr() + " + " +
vertCRS->nameStr()),
- {NN_NO_CHECK(horizCRS), vertCRS});
+ {NN_NO_CHECK(horizCRS), vertCRS},
+ d->dbContext_);
}
}
}
diff --git a/src/wkt1_generated_parser.c b/src/wkt1_generated_parser.c
index 0934ae9d..0bcffe31 100644
--- a/src/wkt1_generated_parser.c
+++ b/src/wkt1_generated_parser.c
@@ -424,16 +424,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 32
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 227
+#define YYLAST 230
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 36
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 69
+#define YYNNTS 70
/* YYNRULES -- Number of rules. */
-#define YYNRULES 105
+#define YYNRULES 107
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 272
+#define YYNSTATES 274
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
@@ -489,10 +489,10 @@ static const yytype_uint16 yyrline[] =
156, 158, 159, 162, 165, 168, 172, 174, 175, 176,
177, 180, 184, 187, 190, 193, 196, 199, 202, 205,
208, 211, 212, 213, 214, 217, 220, 223, 224, 227,
- 229, 230, 231, 234, 237, 239, 240, 241, 244, 247,
- 250, 255, 255, 257, 260, 265, 268, 270, 273, 276,
- 279, 282, 285, 288, 291, 294, 297, 300, 303, 306,
- 309, 311, 313, 314, 315, 318
+ 229, 230, 231, 234, 236, 236, 239, 241, 242, 243,
+ 246, 249, 252, 257, 257, 259, 262, 267, 270, 272,
+ 275, 278, 281, 284, 287, 290, 293, 296, 299, 302,
+ 305, 308, 311, 313, 315, 316, 317, 320
};
#endif
@@ -520,12 +520,12 @@ static const char *const yytname[] =
"inverse_flattening", "prime_meridian", "longitude", "angular_unit",
"linear_unit", "unit", "conversion_factor", "geocentric_cs",
"opt_three_axis_extension_authority", "three_axis", "authority",
- "vert_cs", "esri_vert_cs", "opt_axis_authority", "vert_datum", "vdatum",
- "opt_extension_authority", "datum_type", "compd_cs", "head_cs",
- "tail_cs", "twin_axis", "axis", "towgs84", "towgs84_parameters",
- "three_parameters", "seven_parameters", "dx", "dy", "dz", "ex", "ey",
- "ez", "ppm", "fitted_cs", "to_base", "base_cs", "local_cs",
- "opt_axis_list_authority", "local_datum", YY_NULLPTR
+ "vert_cs", "esri_vert_cs", "opt_axis_authority", "vert_datum",
+ "vdatum_or_datum", "vdatum", "opt_extension_authority", "datum_type",
+ "compd_cs", "head_cs", "tail_cs", "twin_axis", "axis", "towgs84",
+ "towgs84_parameters", "three_parameters", "seven_parameters", "dx", "dy",
+ "dz", "ex", "ey", "ez", "ppm", "fitted_cs", "to_base", "base_cs",
+ "local_cs", "opt_axis_list_authority", "local_datum", YY_NULLPTR
};
#endif
@@ -541,10 +541,10 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-#define YYPACT_NINF -135
+#define YYPACT_NINF -141
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-135)))
+ (!!((Yystate) == (-141)))
#define YYTABLE_NINF -1
@@ -555,34 +555,34 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 119, 10, 10, 10, 10, 10, 10, 10, 10, 29,
- -135, -135, -22, -135, -135, -135, -135, -135, -135, -135,
- -135, -135, -135, 3, -2, 0, 18, 19, 21, 43,
- 47, 53, -135, 66, -135, 81, 86, 86, 79, 84,
- 17, 116, -135, -135, 83, -135, -135, 69, 10, 78,
- 80, 10, 82, 10, 90, -135, 92, 10, 10, 10,
- 10, -135, -135, -135, -135, -135, 96, 10, 97, 106,
- 102, 126, 126, 105, 131, 11, -1, 60, 110, 116,
- 116, 117, 119, 112, 131, 10, 113, 138, 10, 115,
- 118, 122, 10, 120, -135, -135, 10, 121, 11, -135,
- -135, -135, -135, 123, 133, 11, 125, 11, -135, 127,
- -135, 11, 122, 134, 135, -1, 10, 136, 137, 131,
- 131, -135, 123, 140, -6, 11, 142, -1, -135, 13,
- 11, 110, -135, 116, 11, -135, 116, -135, 135, 147,
- 146, 11, 143, 144, 12, 11, 151, 143, -135, 148,
- 11, 152, 10, 10, -135, 135, -135, 153, -135, -135,
- 10, 135, -135, -135, -135, 125, -135, 11, 11, 149,
- -135, -135, 58, 11, 156, 10, 135, -135, 123, -135,
- -135, 135, 11, 58, 11, -135, -135, 135, 154, 155,
- -135, 11, 157, -135, -135, -135, -135, -6, 11, 135,
- -135, 123, 158, -135, -135, 159, 162, -135, -135, 11,
- -135, 135, 123, -135, 160, -135, 11, 124, 166, -135,
- 145, -135, 149, -135, -135, -135, 147, 168, -135, 11,
- -135, -135, 163, -135, -135, -135, 147, -135, 11, 11,
- 11, -135, -135, -135, 135, -135, 170, 165, -135, -135,
- -135, 11, -135, 167, 147, -135, 172, -135, -135, 169,
- 174, -135, 171, 176, -135, 173, 178, -135, 175, 180,
- -135, -135
+ 119, 41, 41, 41, 41, 41, 41, 41, 41, 31,
+ -141, -141, 6, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, 16, 32, 34, 42, 55, 68, 69,
+ 70, 23, -141, 37, -141, 99, 101, 101, 95, 19,
+ 4, 141, -141, -141, 89, -141, -141, 80, 41, 82,
+ 85, 41, 86, 41, -141, 87, -141, -141, 90, 41,
+ 41, 41, 41, -141, -141, -141, -141, -141, 92, 41,
+ 94, 123, 97, 125, 125, 103, 127, 63, -4, 30,
+ 113, 141, 141, 120, 119, 115, 127, 41, 116, 142,
+ 41, 117, 121, 126, 41, 124, -141, -141, 41, 133,
+ 63, -141, -141, -141, -141, 134, 132, 63, 135, 63,
+ -141, 136, -141, 63, 126, 137, 138, -4, 41, 140,
+ 143, 127, 127, -141, 134, 144, 28, 63, 145, -4,
+ -141, -3, 63, 113, -141, 141, 63, -141, 141, -141,
+ 138, 139, 146, 63, 147, 148, 13, 63, 152, 147,
+ -141, 149, 63, 156, 41, 41, -141, 138, -141, 157,
+ -141, -141, 41, 138, -141, -141, -141, 135, -141, 63,
+ 63, 153, -141, -141, 61, 63, 158, 41, 138, -141,
+ 134, -141, -141, 138, 63, 61, 63, -141, -141, 138,
+ 154, 155, -141, 63, 159, -141, -141, -141, -141, 28,
+ 63, 138, -141, 134, 160, -141, -141, 161, 162, -141,
+ -141, 63, -141, 138, 134, -141, 163, -141, 63, 164,
+ 167, -141, 165, -141, 153, -141, -141, -141, 139, 170,
+ -141, 63, -141, -141, 166, -141, -141, -141, 139, -141,
+ 63, 63, 63, -141, -141, -141, 138, -141, 171, 168,
+ -141, -141, -141, 63, -141, 169, 139, -141, 173, -141,
+ -141, 172, 176, -141, 174, 177, -141, 175, 179, -141,
+ 178, 182, -141, -141
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -594,54 +594,54 @@ static const yytype_uint8 yydefact[] =
2, 22, 28, 31, 30, 23, 24, 68, 25, 26,
27, 3, 4, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 5, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 0, 101, 29, 0, 0, 0,
- 0, 0, 0, 0, 0, 80, 0, 0, 0, 0,
- 0, 98, 8, 9, 10, 11, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 14, 0,
+ 0, 0, 6, 7, 0, 103, 29, 0, 0, 0,
+ 0, 0, 0, 0, 75, 0, 74, 82, 0, 0,
+ 0, 0, 0, 100, 8, 9, 10, 11, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 70, 57, 74, 0, 0, 0, 34,
- 33, 81, 82, 75, 0, 0, 17, 0, 21, 0,
- 99, 0, 0, 0, 41, 0, 0, 47, 0, 0,
- 0, 78, 75, 0, 0, 0, 0, 0, 69, 0,
- 0, 14, 12, 0, 0, 19, 0, 97, 41, 0,
- 0, 0, 37, 0, 0, 0, 0, 37, 56, 61,
- 0, 0, 0, 0, 72, 41, 67, 0, 35, 36,
- 0, 41, 77, 79, 15, 17, 16, 0, 0, 102,
- 42, 44, 0, 0, 0, 0, 41, 50, 75, 46,
- 55, 41, 0, 0, 0, 73, 59, 41, 0, 0,
- 71, 0, 0, 76, 18, 20, 105, 0, 0, 41,
- 40, 75, 0, 32, 52, 0, 0, 49, 48, 0,
- 45, 41, 75, 64, 0, 60, 0, 0, 0, 13,
- 0, 103, 102, 100, 39, 38, 0, 0, 90, 0,
- 87, 86, 0, 54, 63, 62, 0, 58, 0, 0,
- 0, 104, 83, 53, 41, 85, 0, 0, 66, 84,
- 43, 0, 91, 0, 0, 51, 0, 65, 92, 88,
- 0, 93, 0, 0, 94, 0, 0, 95, 0, 0,
- 96, 89
+ 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 70, 57, 76, 0, 0,
+ 0, 34, 33, 83, 84, 77, 0, 0, 17, 0,
+ 21, 0, 101, 0, 0, 0, 41, 0, 0, 47,
+ 0, 0, 0, 80, 77, 0, 0, 0, 0, 0,
+ 69, 0, 0, 14, 12, 0, 0, 19, 0, 99,
+ 41, 0, 0, 0, 37, 0, 0, 0, 0, 37,
+ 56, 61, 0, 0, 0, 0, 72, 41, 67, 0,
+ 35, 36, 0, 41, 79, 81, 15, 17, 16, 0,
+ 0, 104, 42, 44, 0, 0, 0, 0, 41, 50,
+ 77, 46, 55, 41, 0, 0, 0, 73, 59, 41,
+ 0, 0, 71, 0, 0, 78, 18, 20, 107, 0,
+ 0, 41, 40, 77, 0, 32, 52, 0, 0, 49,
+ 48, 0, 45, 41, 77, 64, 0, 60, 0, 0,
+ 0, 13, 0, 105, 104, 102, 39, 38, 0, 0,
+ 92, 0, 89, 88, 0, 54, 63, 62, 0, 58,
+ 0, 0, 0, 106, 85, 53, 41, 87, 0, 0,
+ 66, 86, 43, 0, 93, 0, 0, 51, 0, 65,
+ 94, 90, 0, 95, 0, 0, 96, 0, 0, 97,
+ 0, 0, 98, 91
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -135, -135, -57, 14, -75, -73, -135, 107, 55, -135,
- 22, -135, -135, -135, 130, -135, 177, -135, 73, 87,
- 68, -87, -134, -135, -31, 179, -135, -135, -135, -135,
- 141, -135, -135, -63, -76, -135, -135, -135, -135, -92,
- 150, 185, -135, -135, -135, -117, 108, -135, -135, -135,
- -135, -125, -135, -135, -135, -135, -135, -135, -135, -135,
- -135, -135, -135, -135, -135, -135, -135, -3, -135
+ -141, -141, -59, 12, -77, -55, -141, 56, 44, -141,
+ 45, -141, -141, -141, 130, -141, 180, -141, 98, 88,
+ 67, -89, -140, -141, -27, 48, -141, -141, -141, -141,
+ 150, -141, -141, -43, -79, -141, -141, -141, -141, -121,
+ 151, 185, -141, -141, -141, -141, -119, 105, -141, -141,
+ -141, -141, -137, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, -141, -141, -141, -141, -141, -2, -141
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 9, 23, 24, 45, 61, 62, 97, 105, 63,
- 134, 64, 65, 109, 10, 11, 12, 13, 98, 99,
- 173, 141, 161, 86, 14, 49, 145, 117, 205, 244,
- 89, 181, 147, 100, 94, 187, 15, 184, 212, 154,
- 16, 17, 125, 52, 54, 130, 122, 18, 56, 103,
- 201, 155, 178, 229, 230, 231, 232, 253, 259, 262,
- 265, 268, 271, 19, 66, 111, 20, 198, 68
+ -1, 9, 23, 24, 45, 63, 64, 99, 107, 65,
+ 136, 66, 67, 111, 10, 11, 12, 13, 100, 101,
+ 175, 143, 163, 88, 14, 49, 147, 119, 207, 246,
+ 91, 183, 149, 102, 96, 189, 15, 186, 214, 156,
+ 16, 17, 127, 52, 55, 56, 132, 124, 18, 58,
+ 105, 203, 157, 180, 231, 232, 233, 234, 255, 261,
+ 264, 267, 270, 273, 19, 68, 113, 20, 200, 70
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -649,56 +649,58 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint16 yytable[] =
{
- 95, 79, 80, 81, 47, 150, 106, 107, 113, 152,
- 176, 93, 92, 33, 169, 153, 25, 26, 27, 28,
- 29, 30, 31, 128, 1, 96, 2, 152, 152, 32,
- 132, 34, 135, 35, 175, 36, 137, 162, 199, 160,
- 160, 21, 22, 148, 42, 43, 101, 202, 170, 211,
- 156, 168, 177, 37, 38, 163, 39, 149, 214, 166,
- 165, 208, 70, 167, 159, 73, 171, 75, 190, 2,
- 179, 78, 222, 152, 193, 185, 4, 5, 40, 153,
- 200, 83, 41, 5, 225, 160, 42, 43, 44, 207,
- 2, 213, 195, 196, 209, 235, 48, 51, 203, 114,
- 216, 242, 118, 53, 69, 221, 123, 210, 67, 215,
- 126, 247, 224, 71, 85, 72, 219, 74, 206, 57,
- 58, 59, 60, 223, 234, 76, 1, 77, 2, 257,
- 143, 82, 84, 3, 233, 4, 5, 87, 88, 6,
- 91, 237, 7, 8, 92, 104, 108, 112, 115, 116,
- 119, 121, 238, 120, 245, 124, 127, 251, 129, 96,
- 133, 152, 136, 248, 249, 250, 188, 189, 153, 139,
- 140, 144, 146, 240, 192, 151, 255, 157, 172, 174,
- 180, 186, 191, 183, 197, 204, 164, 194, 142, 217,
- 218, 228, 220, 226, 227, 236, 239, 243, 246, 252,
- 254, 258, 256, 261, 260, 264, 263, 267, 266, 270,
- 269, 131, 110, 90, 158, 182, 50, 55, 46, 241,
- 138, 0, 0, 0, 0, 0, 0, 102
+ 97, 81, 82, 83, 171, 152, 178, 115, 47, 94,
+ 164, 1, 154, 2, 25, 26, 27, 28, 29, 30,
+ 31, 172, 98, 130, 162, 179, 108, 109, 154, 48,
+ 134, 32, 137, 95, 201, 177, 139, 204, 53, 2,
+ 162, 33, 150, 154, 34, 213, 4, 5, 216, 155,
+ 158, 170, 103, 202, 5, 165, 42, 43, 44, 168,
+ 72, 210, 224, 75, 215, 77, 173, 35, 192, 36,
+ 181, 80, 21, 22, 195, 187, 154, 37, 223, 151,
+ 167, 85, 155, 169, 227, 50, 161, 54, 162, 209,
+ 38, 244, 197, 198, 211, 237, 42, 43, 205, 116,
+ 218, 249, 120, 39, 40, 41, 125, 212, 2, 217,
+ 128, 48, 226, 51, 69, 71, 221, 73, 208, 259,
+ 74, 76, 78, 225, 236, 79, 1, 84, 2, 86,
+ 145, 87, 89, 3, 235, 4, 5, 90, 93, 6,
+ 94, 239, 7, 8, 59, 60, 61, 62, 106, 110,
+ 114, 117, 121, 118, 247, 123, 122, 253, 98, 126,
+ 155, 154, 133, 250, 251, 252, 190, 191, 129, 131,
+ 135, 138, 141, 142, 194, 146, 257, 166, 148, 153,
+ 159, 182, 174, 176, 185, 188, 193, 206, 199, 219,
+ 220, 230, 240, 242, 222, 228, 229, 241, 238, 245,
+ 254, 248, 260, 256, 258, 263, 266, 262, 269, 265,
+ 268, 272, 196, 271, 112, 144, 184, 160, 46, 140,
+ 57, 0, 243, 0, 92, 0, 0, 0, 0, 0,
+ 104
};
static const yytype_int16 yycheck[] =
{
- 75, 58, 59, 60, 35, 122, 79, 80, 84, 15,
- 144, 74, 13, 35, 139, 21, 2, 3, 4, 5,
- 6, 7, 8, 98, 7, 26, 9, 15, 15, 0,
- 105, 28, 107, 35, 22, 35, 111, 129, 172, 27,
- 27, 31, 32, 119, 33, 34, 77, 172, 140, 183,
- 125, 138, 144, 35, 35, 130, 35, 120, 183, 134,
- 133, 178, 48, 136, 127, 51, 141, 53, 155, 9,
- 145, 57, 197, 15, 161, 150, 16, 17, 35, 21,
- 172, 67, 35, 17, 201, 27, 33, 34, 35, 176,
- 9, 183, 167, 168, 181, 212, 10, 18, 173, 85,
- 187, 226, 88, 19, 35, 197, 92, 182, 25, 184,
- 96, 236, 199, 35, 8, 35, 191, 35, 175, 3,
- 4, 5, 6, 198, 211, 35, 7, 35, 9, 254,
- 116, 35, 35, 14, 209, 16, 17, 35, 12, 20,
- 35, 216, 23, 24, 13, 35, 29, 35, 35, 11,
- 35, 29, 28, 35, 229, 35, 35, 244, 35, 26,
- 35, 15, 35, 238, 239, 240, 152, 153, 21, 35,
- 35, 35, 35, 28, 160, 35, 251, 35, 35, 35,
- 29, 29, 29, 35, 35, 29, 131, 165, 115, 35,
- 35, 29, 35, 35, 35, 35, 30, 29, 35, 29,
- 35, 29, 35, 29, 35, 29, 35, 29, 35, 29,
- 35, 104, 82, 72, 127, 147, 37, 40, 33, 222,
- 112, -1, -1, -1, -1, -1, -1, 77
+ 77, 60, 61, 62, 141, 124, 146, 86, 35, 13,
+ 131, 7, 15, 9, 2, 3, 4, 5, 6, 7,
+ 8, 142, 26, 100, 27, 146, 81, 82, 15, 10,
+ 107, 0, 109, 76, 174, 22, 113, 174, 19, 9,
+ 27, 35, 121, 15, 28, 185, 16, 17, 185, 21,
+ 127, 140, 79, 174, 17, 132, 33, 34, 35, 136,
+ 48, 180, 199, 51, 185, 53, 143, 35, 157, 35,
+ 147, 59, 31, 32, 163, 152, 15, 35, 199, 122,
+ 135, 69, 21, 138, 203, 37, 129, 39, 27, 178,
+ 35, 228, 169, 170, 183, 214, 33, 34, 175, 87,
+ 189, 238, 90, 35, 35, 35, 94, 184, 9, 186,
+ 98, 10, 201, 18, 25, 35, 193, 35, 177, 256,
+ 35, 35, 35, 200, 213, 35, 7, 35, 9, 35,
+ 118, 8, 35, 14, 211, 16, 17, 12, 35, 20,
+ 13, 218, 23, 24, 3, 4, 5, 6, 35, 29,
+ 35, 35, 35, 11, 231, 29, 35, 246, 26, 35,
+ 21, 15, 106, 240, 241, 242, 154, 155, 35, 35,
+ 35, 35, 35, 35, 162, 35, 253, 133, 35, 35,
+ 35, 29, 35, 35, 35, 29, 29, 29, 35, 35,
+ 35, 29, 28, 28, 35, 35, 35, 30, 35, 29,
+ 29, 35, 29, 35, 35, 29, 29, 35, 29, 35,
+ 35, 29, 167, 35, 84, 117, 149, 129, 33, 114,
+ 40, -1, 224, -1, 74, -1, -1, -1, -1, -1,
+ 79
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -706,33 +708,33 @@ static const yytype_int16 yycheck[] =
static const yytype_uint8 yystos[] =
{
0, 7, 9, 14, 16, 17, 20, 23, 24, 37,
- 50, 51, 52, 53, 60, 72, 76, 77, 83, 99,
- 102, 31, 32, 38, 39, 39, 39, 39, 39, 39,
+ 50, 51, 52, 53, 60, 72, 76, 77, 84, 100,
+ 103, 31, 32, 38, 39, 39, 39, 39, 39, 39,
39, 39, 0, 35, 28, 35, 35, 35, 35, 35,
35, 35, 33, 34, 35, 40, 77, 60, 10, 61,
- 61, 18, 79, 19, 80, 52, 84, 3, 4, 5,
- 6, 41, 42, 45, 47, 48, 100, 25, 104, 35,
- 39, 35, 35, 39, 35, 39, 35, 35, 39, 38,
- 38, 38, 35, 39, 35, 8, 59, 35, 12, 66,
- 66, 35, 13, 69, 70, 40, 26, 43, 54, 55,
- 69, 60, 76, 85, 35, 44, 41, 41, 29, 49,
- 50, 101, 35, 70, 39, 35, 11, 63, 39, 35,
- 35, 29, 82, 39, 35, 78, 39, 35, 40, 35,
- 81, 43, 40, 35, 46, 40, 35, 40, 82, 35,
- 35, 57, 54, 39, 35, 62, 35, 68, 70, 69,
- 81, 35, 15, 21, 75, 87, 40, 35, 55, 69,
- 27, 58, 75, 40, 44, 41, 40, 41, 57, 87,
- 75, 40, 35, 56, 35, 22, 58, 75, 88, 40,
- 29, 67, 56, 35, 73, 40, 29, 71, 39, 39,
- 57, 29, 39, 57, 46, 40, 40, 35, 103, 58,
- 75, 86, 87, 40, 29, 64, 38, 57, 81, 57,
- 40, 58, 74, 75, 87, 40, 57, 35, 35, 40,
- 35, 75, 87, 40, 57, 81, 35, 35, 29, 89,
- 90, 91, 92, 40, 57, 81, 35, 40, 28, 30,
- 28, 103, 87, 29, 65, 40, 35, 87, 40, 40,
- 40, 57, 29, 93, 35, 40, 35, 87, 29, 94,
- 35, 29, 95, 35, 29, 96, 35, 29, 97, 35,
- 29, 98
+ 61, 18, 79, 19, 61, 80, 81, 52, 85, 3,
+ 4, 5, 6, 41, 42, 45, 47, 48, 101, 25,
+ 105, 35, 39, 35, 35, 39, 35, 39, 35, 35,
+ 39, 38, 38, 38, 35, 39, 35, 8, 59, 35,
+ 12, 66, 66, 35, 13, 69, 70, 40, 26, 43,
+ 54, 55, 69, 60, 76, 86, 35, 44, 41, 41,
+ 29, 49, 50, 102, 35, 70, 39, 35, 11, 63,
+ 39, 35, 35, 29, 83, 39, 35, 78, 39, 35,
+ 40, 35, 82, 43, 40, 35, 46, 40, 35, 40,
+ 83, 35, 35, 57, 54, 39, 35, 62, 35, 68,
+ 70, 69, 82, 35, 15, 21, 75, 88, 40, 35,
+ 55, 69, 27, 58, 75, 40, 44, 41, 40, 41,
+ 57, 88, 75, 40, 35, 56, 35, 22, 58, 75,
+ 89, 40, 29, 67, 56, 35, 73, 40, 29, 71,
+ 39, 39, 57, 29, 39, 57, 46, 40, 40, 35,
+ 104, 58, 75, 87, 88, 40, 29, 64, 38, 57,
+ 82, 57, 40, 58, 74, 75, 88, 40, 57, 35,
+ 35, 40, 35, 75, 88, 40, 57, 82, 35, 35,
+ 29, 90, 91, 92, 93, 40, 57, 82, 35, 40,
+ 28, 30, 28, 104, 88, 29, 65, 40, 35, 88,
+ 40, 40, 40, 57, 29, 94, 35, 40, 35, 88,
+ 29, 95, 35, 29, 96, 35, 29, 97, 35, 29,
+ 98, 35, 29, 99
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
@@ -745,10 +747,10 @@ static const yytype_uint8 yyr1[] =
56, 57, 57, 58, 59, 60, 61, 62, 62, 62,
62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 73, 73, 73, 74, 75, 76, 76, 77,
- 78, 78, 78, 79, 80, 81, 81, 81, 82, 83,
- 84, 85, 85, 86, 87, 88, 89, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 102, 103, 103, 103, 104
+ 78, 78, 78, 79, 80, 80, 81, 82, 82, 82,
+ 83, 84, 85, 86, 86, 87, 88, 89, 90, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 103, 104, 104, 104, 105
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -761,10 +763,10 @@ static const yytype_uint8 yyr2[] =
2, 0, 2, 5, 4, 10, 6, 0, 3, 3,
2, 8, 1, 1, 6, 1, 1, 1, 6, 1,
10, 0, 3, 3, 2, 5, 5, 8, 1, 7,
- 0, 3, 2, 6, 3, 0, 3, 2, 1, 8,
- 1, 1, 1, 3, 5, 4, 1, 1, 5, 13,
- 1, 1, 1, 1, 1, 1, 1, 7, 1, 1,
- 10, 3, 0, 2, 3, 6
+ 0, 3, 2, 6, 1, 1, 3, 0, 3, 2,
+ 1, 8, 1, 1, 1, 3, 5, 4, 1, 1,
+ 5, 13, 1, 1, 1, 1, 1, 1, 1, 7,
+ 1, 1, 10, 3, 0, 2, 3, 6
};
diff --git a/src/wkt1_grammar.y b/src/wkt1_grammar.y
index 4a767997..b5f27e61 100644
--- a/src/wkt1_grammar.y
+++ b/src/wkt1_grammar.y
@@ -224,7 +224,7 @@ vert_cs:
| esri_vert_cs
esri_vert_cs:
- T_VERTCS begin_node_name ',' vdatum ',' opt_parameter_list_linear_unit end_node
+ T_VERTCS begin_node_name ',' vdatum_or_datum ',' opt_parameter_list_linear_unit end_node
opt_axis_authority:
| ',' axis opt_authority
@@ -233,6 +233,8 @@ opt_axis_authority:
vert_datum:
T_VERT_DATUM begin_node_name ',' datum_type opt_extension_authority end_node
+vdatum_or_datum: vdatum | datum
+
vdatum:
T_VDATUM begin_node_name end_node