<p>> Could you provide some snippet of your code + ideally a piece of data?<br>
> As I see, we don't have any tests of 25D geometries for S-57 so I'm<br>
> interested in updating the test suite accordingly.</p>
<hr>
<p>A part of the code traverses thourgh all layers and extract each feature...</p>
<p><code><font color="darkblue">while((poFeature = poLayer->GetNextFeature()) != NULL)</font></code></p>
<p>...with appurtenant feature definition...</p>
<p><code><font color="darkblue">poFDefn = poLayer->GetLayerDefn()</font></code></p>
<p>...and geometry...</p>
<p><code><font color="darkblue">poGeometry = poFeature->GetGeometryRef()</font></code></p>
<p>These properties - feature, feature definition and geometry - are passed as parameters to a parser function...</p>
<p><code><font color="darkblue">parseGeometry(..., poGeometry, poFDefn, poFeature, ...);</font></code></p>
<p>In the parserGeometry function there the geometry type is retieved...</p>
<p><code><font color="darkblue">OGRwkbGeometryType geometryType = poFDefn->GetGeomType();</font></code></p>
<p>...and a switch is used to check what type is it...</p>
<p><code><font color="darkblue">
switch(geometryType)<br>
{<br>
...<br>
case wkbPoint:<br>
poPoint = (OGRPoint *) poGeometry;<br>
double dX = poPoint->getX();<br>
double dY = poPoint->getY();<br>
...<br>
case wkbPoint25D:<br>
poPoint = (OGRPoint *) poGeometry;<br>
double dX = poPoint->getX();<br>
double dY = poPoint->getY();<br>
double dY = poPoint->getZ();<br>
...<br>
}
</font></code></p>
<p>I the switch have cases for all the different geometry types - wkbUnknown, wkbPoint, wkbLineString, wkbPolygon, wkbMultiPoint, wkbMultiLineString, wkbMultiPolygon, wkbGeometryCollection, wkbNone, wkbLinearRing, wkbPoint25D, wkbLineString25D, wkbPolygon25D, wkbMultiPoint25D, wkbMultiLineString25D, wkbMultiPolygon25D, wkbGeometryCollection25D - but, as stated before, the code never hits on any of the 2.5D types cases.</p>
<p>The maps I am user are downloaded from NOAA (<a href="http://chartmaker.ncd.noaa.gov/mcd/enc/download.htm" target="_top" rel="nofollow">http://chartmaker.ncd.noaa.gov/mcd/enc/download.htm).</a> One map I have used is one called <a href="http://www.nabble.com/file/p12916176/US2AK91M.000" target="_top">US2AK91M.000</a>. This is converter into a simple dat-file (<a href="http://www.nabble.com/file/p12916176/s57output.dat" target="_top">s57output.dat</a>) containing XYZ-data. The Z-data has until now, always been 0 (zero), but the XY-data are ok as far as I can tell.</p>
<img src="http://www.nabble.com/file/p12916176/US2AK91M_000_pic.jpg" border="0" />
<p><i>Above is an image drawn with GNUPlot from dat-file generated by the code.</i></p>
<p>Don't know if this helps in identifying the problem.</p>
<p></p>
<p></p>
<p></p>
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Problems-retrieving-z-values-tf4522698.html#a12916176">Re: Problems retrieving z-values</a><br>
Sent from the <a href="http://www.nabble.com/GDAL---Dev-f1192.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br>