<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hi all</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">reviving this old thread because I'm interested in using the z-value (elevation) from kml files (type wkbMultiLineString25D) in a qgis plugin.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Are there any plans to introduce z-value (25D) support in 2.0?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Experimenting has shown that doing geom.exportToWkt() strips the z-value.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
How can I currently handle z-values? I understand that I would have to parse the wkb directly, is this possible in python? If so can someone give me some pointers?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Other option - external python library like shapely? It seems shapely does support z levels.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Or would it be simpler to parse the kml files by hand using an xml parser, as syntax is relatively simple?</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">regards,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Etienne</div><br><div class="gmail_quote">On Mon, Dec 5, 2011 at 8:02 AM, Marco Hugentobler <span dir="ltr"><<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <table border="0" cellpadding="0" cellspacing="0">
      <tbody>
        <tr>
          <th align="RIGHT" nowrap valign="BASELINE"><br>
          </th>
          <td><br>
          </td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap valign="BASELINE"><br>
          </th>
          <td><br>
          </td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap valign="BASELINE"><br>
          </th>
          <td><br>
          </td>
        </tr>
        <tr>
          <th align="RIGHT" nowrap valign="BASELINE"><br>
          </th>
          <td><br>
          </td>
        </tr>
      </tbody>
    </table>
    <br>
    <br>
    <pre>Hi Paul

Unfortunately, the current geometry system does not handle z- and 
m-values in a sound way.
Some tools consider z and others don't. M-values are even more difficult 
as they cannot be accessed by the QGIS API (z-coordinates can be read by 
parsing the binary format of the geometry).

An overhaul of the geometry system is planned for version 2.

Regards,
Marco

On 05.12.2011 10:42, Paul Lens wrote:
> Hi all,
>
> 1. I made a TIN surface, using the interpolation plugin, from a point 
> shapefile (with "ALTITUDE" field) and  3D line shapefiles. I lost time 
> trying to extract the relevant lines from the line shapefiles without 
> loosing the 3D information (Z values of the nodes).
> If I remember well, I first used "Merge Layers" from the mmqgis 
> plugin, and it kept the Z information. Than, I used the Intersection 
> command in the Vector menu, and the Z information was lost. Finally, 
> after manually selecting the relevant lines and using "save as", I got 
> the expected 3D line shapefile keeping the Z values.
> Is this loss of Z information a known limitation of the gdal vector 
> commands in QGIS (vector menu) and is this limitation affecting all 
> these commands? Or did I do something wrong?
>
> 2. In a second step, I wanted to be able to easily see (through 
> labeling a Z field) or ask (with the identify command) those Z values 
> from the 3D lines, so as to fine tune the interpretation of the 
> topography.
> Again the gdal tool (in Vector menu) "Node Extraction" lost all Z 
> information.
> Is there a workaround to create a point shapefile with a Z field? Or, 
> at least, to keep the Z values in a point shapefile, rasterize it so 
> as to be able to visualize the Z value using  the "Identify" command 
> on the raster?
>
> Thanking all the developers for this wonderful program,
>


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux&  Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
<span class="HOEnZb"><font color="#888888"><a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a>
Technical Advisor QGIS Project Steering Committee

</font></span></pre>
  </div>

<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div><br>