<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
10.05.2012 19:03, tseval написал:
<blockquote cite="mid:1336662226590-4965891.post@n6.nabble.com"
type="cite">
<pre wrap="">Hi,
I'm trying to cut and reproject a large image with overviews using the c++
api. This runs extremely slow when I produce highly downsampled cutouts
covering large areas of the original image.
I understand the the Warp API doesn't use the overviews when resampling, so
I wanted to make a temporary dataset from one of the downscaled overviews
and do the warping on this dataset instead.
First of all, is this a sensible way of doing things? If so, what driver
should I use? I guess VRT? I have been trying to create a VRT by doing
something like this:
        double scaleX = (double)ovrW/origW;
        double scaleY = (double)ovrH/origH;
        GDALDataset* vrtDS = vrtDriver->Create("", ovrW, ovrH, _numBands,
_dataType, NULL);
        GDALSetProjection(vrtDS, _srcProjectionWKT);
        double geoTransform[6];
        srcDS->GetGeoTransform(geoTransform);
        geoTransform[XFM_PIXEL_SIZE_EW] = scaleX*geoTransform[XFM_PIXEL_SIZE_EW];
        geoTransform[XFM_PIXEL_SIZE_NS] = scaleY*geoTransform[XFM_PIXEL_SIZE_NS];
        vrtDS->SetGeoTransform(geoTransform);
But how am I supposed to set the bands in the VRT from the downscaled
overview bands in the original image?
Any help on this would be greatly appreciated :)
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Creating-a-VRT-dataset-from-overviews-in-C-tp4965891.html">http://osgeo-org.1560.n6.nabble.com/Creating-a-VRT-dataset-from-overviews-in-C-tp4965891.html</a>
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
Hi,<br>
<br>
You can try to use this patch to enable overviews in VRT <a
href="http://trac.osgeo.org/gdal/ticket/2076">http://trac.osgeo.org/gdal/ticket/2076</a><br>
or waits as I accomplish my work on fixing this situation.<a
href="http://trac.osgeo.org/gdal/ticket/2076"> </a><br>
<br>
Best regards,<br>
Dmitry<br>
<a href="http://trac.osgeo.org/gdal/ticket/2076"></a>
</body>
</html>