diff --git a/schemas/LAS.xsd b/schemas/LAS.xsd index 5d9b1b9c1f..c807efdca9 100644 --- a/schemas/LAS.xsd +++ b/schemas/LAS.xsd @@ -4,15 +4,15 @@ - Common interpretations of the data that may be used. This - type may be extended under the expectation that clients - know how to consume the data. In the case of string-like - data, use uint8_t (common byte) as the interpretation - and transform accordingly. Because nulls (or even - multi-byte strings) might be allowed, there are + Common interpretations of the data that may be used. This + type may be extended under the expectation that clients + know how to consume the data. In the case of string-like + data, use uint8_t (common byte) as the interpretation + and transform accordingly. Because nulls (or even + multi-byte strings) might be allowed, there are no common string interpretations provided by default. - + @@ -38,13 +38,13 @@ Used to describe the storage endianness of the data in the dimension. - + - + @@ -53,7 +53,7 @@ The dimension's position in the block of point data (counting from 1) - + @@ -62,8 +62,8 @@ The size of this dimension in bytes. - - + + @@ -77,7 +77,7 @@ - + @@ -89,13 +89,13 @@ - + The minimum value of this dimension. - + @@ -103,23 +103,23 @@ The maximum value of this dimension. - + - The double offset to use when applying a scaling + The double offset to use when applying a scaling factor to an integer dimension - + The scale of this dimension. Used to support scaled integer types - + @@ -151,28 +151,29 @@ Used to describe the storage orientation of the word. The - orientation of dimension might be point-major or dimension-major. + orientation of dimension might be point-major or dimension-major. A point-major dimension, the default orientation, has its dimensions composed as XYZXYZXYZ. A dimension-major one has data composed as XXXYYYZZZ. - + - + + - + diff --git a/src/XMLSchema.cpp b/src/XMLSchema.cpp index 72610cab02..7e530998c6 100644 --- a/src/XMLSchema.cpp +++ b/src/XMLSchema.cpp @@ -205,8 +205,6 @@ std::string XMLSchema::xml() const (const xmlChar*)"xsi", NULL, (const xmlChar*)"http://www.w3.org/2001/XMLSchema-instance"); - xmlTextWriterWriteAttribute(w, (const xmlChar*)"version", - (const xmlChar*)PDAL_XML_SCHEMA_VERSION); writeXml(w); xmlTextWriterEndElement(w); @@ -622,6 +620,9 @@ void XMLSchema::writeXml(xmlTextWriterPtr w) const (const xmlChar*)"orientation", NULL, (const xmlChar*)orientation.str().c_str()); + xmlTextWriterWriteElementNS(w, (const xmlChar*)"pc", (const xmlChar*)"version", NULL, + (const xmlChar*)PDAL_XML_SCHEMA_VERSION); + xmlTextWriterEndElement(w); xmlTextWriterFlush(w); diff --git a/test/unit/XMLSchemaTest.cpp b/test/unit/XMLSchemaTest.cpp index 63a0029cf2..1c32787d4d 100644 --- a/test/unit/XMLSchemaTest.cpp +++ b/test/unit/XMLSchemaTest.cpp @@ -204,13 +204,16 @@ TEST(XMLSchemaTest, utf8) XMLDimList dims = s1.xmlDims(); EXPECT_EQ(dims.size(), 1U); - XMLDim& dim = *dims.begin(); - EXPECT_EQ(descripValue, dim.m_description); - MetadataNodeList mlist = s1.getMetadata().children(); - EXPECT_EQ(mlist.size(), 1U); - MetadataNode& m = *mlist.begin(); - EXPECT_EQ(m.name(), metaName); - EXPECT_EQ(m.value(), metaValue); + if (dims.size()) + { + XMLDim& dim = *dims.begin(); + EXPECT_EQ(descripValue, dim.m_description); + MetadataNodeList mlist = s1.getMetadata().children(); + EXPECT_EQ(mlist.size(), 1U); + MetadataNode& m = *mlist.begin(); + EXPECT_EQ(m.name(), metaName); + EXPECT_EQ(m.value(), metaValue); + } } TEST(XMLSchemaTest, precision)