[gdal-dev] Quicklook creation with Python/GDAL
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue Jun 23 13:06:10 EDT 2009
Markus,
If I understand your problem correctly you should be able to use
GDALDataset::BuildOverviews() and/or GDALRegenerateOverviews() for this
task.
To avoid a temporary file, you can use a GDAL virtual
file<http://www.gdal.org/gdal_vrttut.html>
.
There is an example python code using these functions at
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_ovr.py . You
can find the documentation for the C++ version of these functions at
http://www.gdal.org/classGDALDataset.html#2aa6f88b3bbc840a5696236af11dde15and
http://www.gdal.org/gdal_8h.html#f42fd5ddd2d160492b23d62e75e42c82 .
You may need to use the trunk version of GDAL (refer to
http://trac.osgeo.org/gdal/wiki/DownloadSource#Subversion) for these
functions.
I hope this can solve your problem.
Best regards,
--
Chaitanya kumar CH.
On Tue, Jun 23, 2009 at 4:29 PM, Markus Reinhold <leaffan at gmx.net> wrote:
> Hej everyone,
> currently I was able to finish a small Python project utilizing GDAL for
> creating quicklooks of satellite imagery. What I am doing right now is
> retrieving the statistics of input bands, applying a standard deviation
> stretch and saving the result as PNG-dataset. This works quite well,
> however my problems start right here. To actually resize the created
> dataset and to merge three separate bands into a single PNG-file I'm
> using the Python Imaging Library, which needs single files to read from
> in order to do any processing. There is no problem with small to
> medium-sized images. But I'm running into trouble trying to create a
> quicklook for some standard panchromatic Quickbird imagery (ca. 30000 x
> 30000 pixels, 0.6 m GSD at UInt16 -> about 1.9 GB file size) as the PNG
> file that is created temporarily gets very big. The neccessary I/O
> operations naturally take quite some time. So my question is the
> following: Is there any possibility to do resizing a dataset with GDAL
> means - to spare the creation of a temporary file?
> Thank you very much for any ideas.
> Regards,
> Markus Reinhold
>
> --
>
> ********************************************************
> Dipl.-Kartograph Markus Reinhold
>
> Chair of Geoinformatics, Geohydrology and Modeling
> Friedrich-Schiller-University Jena
> Löbdergraben 32
> D - 07743 Jena
> Germany
>
> Phone.: (+49)(0)3641 / 9 488 65
> E-Mail: markus.reinhold at uni-jena.de
> ********************************************************
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090623/83201d39/attachment.html
More information about the gdal-dev
mailing list