Hello everybody,<div>I'm trying to figure out how to get elevation from a .dem file.</div><div><br></div><div>I opened the file:</div><div>...</div><div>pointerToDataSet=(GDALDataset*) GDALOpen("myFile.dem", GA_ReadOnly);</div>
<div>...</div><div><br></div><div><br></div><div>So I caught a grid as a 371x371 matrix, but I can read only the first line, so the first 371 elevations... the error is: <b>...Access window out of range in RasterIO()...</b></div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>I mean If I put coordinates like (<i>0</i>, <i>somethingelse</i>) where 0<<i>somethingelse<</i>370:</div>
<div><div>...</div></div><div><div>pointerToBand->RasterIO( GF_Read, 0, <i>somethingelse</i>, nXSize, 1, elevation,<span class="Apple-tab-span" style="white-space:pre">        </span>nXSize, 1, <span class="Apple-tab-span" style="white-space:pre">        </span>GDT_Float32, 0, 0 );</div>
</div><div>...</div><div>that's ok</div></blockquote><div><br></div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>Instead if I put coordinates (<i>x</i>, <i>somethingelse</i>) where 0<<i>somethingelse</i><370 and 0<<i>x</i>:</div>
<div>...</div><div>pointerToBand->RasterIO( GF_Read, <i>x</i>, <i>somethingelse</i>, nXSize, 1, elevation,<span class="Apple-tab-span" style="white-space: pre; ">        </span>nXSize, 1, <span class="Apple-tab-span" style="white-space: pre; ">        </span>GDT_Float32, 0, 0 );</div>
<div>...</div><div>that doesn't work :(</div><div><br></div></blockquote>I opened myFile.dem with a text editor and I've seen the whole matrix as a linecode values...<br>There's something I cannot understand obviously, any tips would be really appreciated, thanks in advance,<div>
Regards</div><div>Carmelo</div>