Hi, On Thu, Mar 18, 2010 at 4:43 AM, Howard Butler <[email protected]> wrote: > To that end, I have developed both a sample schema and a sample file that > describes the point layout of point format 0 of the 1.0 specification > > http://liblas.org/wiki/LASSchema > http://liblas.org/wiki/LASSchemaExample
Since I've been staring at xml schemas and documents for the last few days, i have a couple of minor suggestions for the schema: 1. typo: dime[n]sionType. 2. use minOccurs="0" rather than nillable="true". The later requires <description xsi:nil="true" />, the former makes the whole element optional, which is probably what you want :) 3. make elementFormDefault=qualified, otherwise you can't really use a default namespace when creating documents, because the parser will qualify elements (eg. <dimension>) with the default namespace, and suddenly it's invalid because it needs to be unqualified according to the schema... 4. make attributeFormDefault=unqualified so every attribute (eg units="uint8_t") doesn't need to be namespace-prefixed (there is no default namespace for attributes). I've attached an updated schema and example xml file with these changes. HTH, Rob :)
LAS.xsd
Description: Binary data
<?xml version="1.0" encoding="UTF-8"?> <LASSchema xmlns="http://liblas.org/schemas/LAS/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://liblas.org/schemas/LAS/1.0 LAS.xsd"> <dimension> <name>X</name> <description> x coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. </description> <position>0</position> <active>1</active> <size>4</size> <units>byte</units> <interpretation>uint32_t</interpretation> <minimum units="double" value="-131600417.982"/> <maximum units="double" value="404506682.749"/> </dimension> <dimension> <name>Y</name> <description> y coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. </description> <position>1</position> <active>1</active> <size>4</size> <units>byte</units> <interpretation>uint32_t</interpretation> <minimum units="double" value="-586874.0"/> <maximum units="double" value="123456789101112.9876"/> </dimension> <dimension> <name>Z</name> <description> z coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. </description> <position>2</position> <active>1</active> <size>4</size> <units>byte</units> <interpretation>uint32_t</interpretation> <minimum units="double" value="0.00"/> <maximum units="double" value="2512.26"/> </dimension> <dimension> <name>Intensity</name> <description> The intensity value is the integer representation of the pulse return magnitude. This value is optional and system specific. However, it should always be included if available. </description> <position>3</position> <active>1</active> <size>2</size> <units>byte</units> <interpretation>uint16_t</interpretation> <minimum units="uint16_t" value="0"/> <maximum units="uint16_t" value="14224"/> </dimension> <dimension> <name>Return number</name> <description> Return Number: The Return Number is the pulse return number for a given output pulse. A given output laser pulse can have many returns, and they must be marked in sequence of return. The first return will have a Return Number of one, the second a Return Number of two, and so on up to five returns. </description> <position>4</position> <active>1</active> <size>3</size> <units>bit</units> <interpretation>unknown</interpretation> <minimum units="uint16_t" value="0"/> <maximum units="uint16_t" value="5"/> </dimension> <dimension> <name>Number of Returns</name> <description> Number of Returns (for this emitted pulse): The Number of Returns is the total number of returns for a given pulse. For example, a laser data point may be return two (Return Number) within a total number of five returns. </description> <position>5</position> <active>1</active> <size>3</size> <units>bit</units> <interpretation>unknown</interpretation> <minimum units="uint16_t" value="0"/> <maximum units="uint16_t" value="5"/> </dimension> <dimension> <name>Scan direction</name> <description> The Scan Direction Flag denotes the direction at which the scanner mirror was traveling at the time of the output pulse. A bit value of 1 is a positive scan direction, and a bit value of 0 is a negative scan direction (where positive scan direction is a scan moving from the left side of the in-track direction to the right side and negative the opposite). </description> <position>6</position> <active>1</active> <size>1</size> <units>bit</units> <interpretation>unknown</interpretation> <minimum units="uint8_t" value="0"/> <maximum units="uint8_t" value="1"/> </dimension> <dimension> <name>Flight Line Edge</name> <description> The Edge of Flight Line data bit has a value of 1 only when the point is at the end of a scan. It is the last point on a given scan line before it changes direction. </description> <position>7</position> <active>1</active> <size>1</size> <units>bit</units> <interpretation>unknown</interpretation> <minimum units="int8_t" value="0"/> <maximum units="int8_t" value="1"/> </dimension> <dimension> <name>Classification</name> <description> Classification in LAS 1.0 was essentially user defined and optional. LAS 1.1 defines a standard set of ASPRS classifications. In addition, the field is now mandatory. If a point has never been classified, this byte must be set to zero. There are no user defined classes since both point format 0 and point format 1 supply 8 bits per point for user defined operations. Note that the format for classification is a bit encoded field with the lower five bits used for class and the three high bits used for flags. The bit definitions are: </description> <position>8</position> <active>1</active> <size>1</size> <units>byte</units> <interpretation>uint8_t</interpretation> <minimum/> <maximum/> </dimension> <dimension> <name>Scan Angle</name> <description> The Scan Angle Rank is a signed one-byte number with a valid range from -90 to +90. The Scan Angle Rank is the angle (rounded to the nearest integer in the absolute value sense) at which the laser point was output from the laser system including the roll of the aircraft. The scan angle is within 1 degree of accuracy from +90 to –90 degrees. The scan angle is an angle based on 0 degrees being nadir, and –90 degrees to the left side of the aircraft in the direction of flight. </description> <position>9</position> <active>1</active> <size>1</size> <units>byte</units> <interpretation>uint8_t</interpretation> <minimum units="int8_t" value="-90"/> <maximum units="int8_t" value="90"/> </dimension> <dimension> <name>User data</name> <description> This field may be used at the user’s discretion. </description> <position>10</position> <active>1</active> <size>1</size> <units>byte</units> <interpretation>uint8_t</interpretation> <minimum/> <maximum/> </dimension> <dimension> <name>Point Source ID </name> <description> This value indicates the file from which this point originated. Valid values for this field are 1 to 65,535 inclusive with zero being used for a special case discussed below. The numerical value corresponds to the File Source ID from which this point originated. Zero is reserved as a convenience to system implementers. A Point Source ID of zero implies that this point originated in this file. This implies that processing software should set the Point Source ID equal to the File Source ID of the file containing this point at some time during processing. </description> <position>11</position> <active>1</active> <size>2</size> <units>byte</units> <interpretation>uint16_t</interpretation> <minimum/> <maximum/> </dimension> </LASSchema>
_______________________________________________ Liblas-devel mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/liblas-devel
