GDAL in C++: Resize Image (gdal_warp?)

المشرف العام

Administrator
طاقم الإدارة
I would like to resize a geotiff using GDAL in C++.

Searching online, I bumped into another question here that explains it is possible through gdal_warp and gdal_translate via terminal. But there were no guidelines for working with C++ to be found online (as far as I checked).

I tried reading the whole image using RasterIO with a buffer of the wanted final size but I'm not sure if the result is what is expected (original image 167x167-391kb, final image 333x333-1.5mb), although it appears to be correct on qGIS and when printing its RasterXSize and RasterYSize.

Also, ultimately I would like it to work with much bigger raster images so using a buffer to read the whole image is not the best option I guess.

Thank you!



أكثر...
 
أعلى