示例#1
0
def artificial_schema():
    xml_schema = """<?xml version="1.0" encoding="UTF-8"?>
            <pc:PointCloudSchema xmlns:pc="http://pointcloud.org/schemas/PC/1.1"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <pc:dimension>
                <pc:position>1</pc:position>
                <pc:size>4</pc:size>
                <pc:description>X coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>X</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>2</pc:position>
                <pc:size>4</pc:size>
                <pc:description>Y coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>Y</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>3</pc:position>
                <pc:size>4</pc:size>
                <pc:description>Z coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>Z</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>4</pc:position>
                <pc:size>2</pc:size>
               <pc: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.</pc:description>
                <pc:name>Intensity</pc:name>
                <pc:interpretation>uint16_t</pc:interpretation>
                <pc:scale>1</pc:scale>
              </pc:dimension>
              <pc:metadata>
                <Metadata name="compression">dimensional</Metadata>
              </pc:metadata>
            </pc:PointCloudSchema>
    """
    import pg_pointcloud_classes as pgp
    schema = pgp.pcschema()
    schema.parsexml(xml_schema)
    return schema
示例#2
0
def artificial_schema():
    xml_schema = """<?xml version="1.0" encoding="UTF-8"?>
            <pc:PointCloudSchema xmlns:pc="http://pointcloud.org/schemas/PC/1.1"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <pc:dimension>
                <pc:position>1</pc:position>
                <pc:size>4</pc:size>
                <pc:description>X coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>X</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>2</pc:position>
                <pc:size>4</pc:size>
                <pc:description>Y coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>Y</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>3</pc:position>
                <pc:size>4</pc:size>
                <pc:description>Z coordinate as a long integer. You must use the
                        scale and offset information of the header to
                        determine the double value.</pc:description>
                <pc:name>Z</pc:name>
                <pc:interpretation>int32_t</pc:interpretation>
                <pc:scale>0.01</pc:scale>
              </pc:dimension>
              <pc:dimension>
                <pc:position>4</pc:position>
                <pc:size>2</pc:size>
               <pc: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.</pc:description>
                <pc:name>Intensity</pc:name>
                <pc:interpretation>uint16_t</pc:interpretation>
                <pc:scale>1</pc:scale>
              </pc:dimension>
              <pc:metadata>
                <Metadata name="compression">dimensional</Metadata>
              </pc:metadata>
            </pc:PointCloudSchema>
    """
    import pg_pointcloud_classes as pgp
    schema = pgp.pcschema()
    schema.parsexml(xml_schema)
    return schema
示例#3
0
			    <pc:dimension>
			    <pc:position>13</pc:position>
			    <pc:size>1</pc:size>
			    <pc:description>le numero du retour dont ona tiré le point (entre 1 et 4)</pc:description>
			    <pc:name>num_echo</pc:name>
			    <pc:interpretation>uint8_t</pc:interpretation>
			    <pc:scale>1</pc:scale>
				<pc:offset>0</pc:offset>
			  </pc:dimension>
			    <pc:dimension>
			    <pc:position>14</pc:position>
			    <pc:size>1</pc:size>
			    <pc:description>le nombre d echos obtenu par le rayon quia  donné ce point </pc:description>
			    <pc:name>nb_of_echo</pc:name>
			    <pc:interpretation>uint8_t</pc:interpretation>
			    <pc:scale>1</pc:scale>
				<pc:offset>0</pc:offset>
			  </pc:dimension> 
			  
			  
			  <pc:metadata>
			    <Metadata name="compression">dimensional</Metadata>
			  </pc:metadata>
			</pc:PointCloudSchema>
			"""
   
schema = pc.pcschema()
print schema
schema.parsexml(xml_schema)
print schema