[gdal-dev] Implementing driver to support-of output format
Mateusz Loskot
mateusz at loskot.net
Sun Mar 5 14:55:10 PST 2017
On 5 March 2017 at 22:54, Even Rouault <even.rouault at spatialys.com> wrote:
> On dimanche 5 mars 2017 22:47:54 CET Mateusz Loskot wrote:
>>
>> Which, if any, part is responsible for the magic that changes the
>> pixel data form Byte to Uint16 during the RasterIO?
>
> Hi Mateusz,
>
> if you look at apps/gdal_translate_lib.cpp, you'll see that, except cases
> without any arguments like gdal_translate in out -of output_format where the
> 'in' dataset is passed as the source dataset of CretaeCopy(), as soon as you
> add some transformation like changing data type, subsetting, etc, a
> in-memory VRT will be created to do that transformation. And it is that
> in-memory VRT that is passed as the source dataset to the CreateCopy()
> implementation of the output driver. That should answer all your following
> questions.
Hi Even,
Right, I looked there and noticed the use of VRT, but its purpose wasn't clear
(or I didn't look deep enough).
Yes, that answers my question, thank you.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the gdal-dev
mailing list