[gdal-dev] GDAL/C++ Cut out and possibly reproject a sub-image

tseval thomas at silentwings.no
Sun Apr 15 10:28:48 EDT 2012


Hi folks,

I am programming an application where I want to produce small tiles in a
given projection from a lot of input image files. The input files may be
different projections and resolutions. 

I have read the API tutorials and looked through the GDAL documentation, and
searched this mailing list, but I'm still a bit uncertain as to how I should
implement this. Hopefully someone can give me a few pointers to get started
:-)

I suppose I should use the Warp API to do the actual reprojection and
cutting of the images. And I think I should use a VRT dataset to represent
all the input images?

If I understand correctly, a VRT dataset is a virtual dataset that
represents several input files. I have however not figured out how to
programatically add input files to my dataset? I was looking for something
along the lines of an AddFile() method, but couldn't find any?

Am I wrong in assuming that a VRT is the best way to represent my input
data?

Can I have a target GDALDataset that exists only in memory? I do not need to
store the output image on disk , and it will always be quite small
(typically 256x256 pixels), so I can not see any reason that it needs to be
stored for of out of memory operations either.

Also, I can't exactly see how I should set up the WarpOperation to reproject
and cut only a sub-image of the large VRT dataset?

Any help on this would be greatly appreciated!

Cheers,
Thomas

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GDAL-C-Cut-out-and-possibly-reproject-a-sub-image-tp4883738p4883738.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list