<div dir="ltr">am pretty new working with gdal and GIS, so please forgive my inexperience;<br>i have read alot about how to request tiles but am still a bit confused;<br> <br>am trying to get the tiles according to the elevation data that i have (dt2);<br>
lets say i will request this tile from map street poDataset = (GDALDataset *) GDALOpen( "<a href="http://tile.openstreetmap.org/15/23687/15190.png">http://tile.openstreetmap.org/15/23687/15190.png</a>", GA_ReadOnly );<br>
<br>now my first question is:<br><br>since i have the elevation data i will be able to request different tiles from the same server by changing the zoom level x and y ?<br><br>my second question is:<br><br>how can i convert the buffer that i got here to the actual image or tile?<br>
poDataset = (GDALDataset *) GDALOpen( "<a href="http://tile.openstreetmap.org/15/23687/15190.png">http://tile.openstreetmap.org/15/23687/15190.png</a>", GA_ReadOnly );<br> GDALRasterBand *poBand;<br>
poBand = poDataset->GetRasterBand( 1 );<br><br> int xsize = poDataset->GetRasterXSize();<br> int ysize = poDataset->GetRasterYSize();<br> float*buffer = new float[xsize * ysize];<br> poBand->RasterIO(GF_Read, 0, 0, xsize, ysize, buffer, xsize, ysize, GDT_Float32, 0, 0);<br>
for (int j = 0; j < ysize; ++j) {<br> for (int k = 0; k < xsize; ++k) {<br> qDebug() << buffer[j * xsize + k] << " ";<br> }<br> qDebug() << endl;<br>
}<br> }<br> poDataset->FlushCache();<br><br><br>i will appreciate any directions comments or examples<br></div>