[Gdal-dev] Re: Computing srcwin fails

Frank Warmerdam warmerdam at pobox.com
Wed Oct 12 09:30:07 EDT 2005


On 10/12/05, Morten Nielsen <mn at blominfo.dk> wrote:
> >The problem is that gdal_translate does not support "srcwin"
> >regions that fall off the source raster, even partially.  You might
> >be better off using gdalwarp for at least these tiles.  Gdalwarp
> >is "savvy" about sampling from an input that only partly
> >intersects the desired tile area.
>
> I resolved the issue by adding a small black dummy image to the VRT that
> where placed further out of the image, which then extended the bounds of
> the VRT. Then I could just do as I usually do :-)
>
> ...but why not let gdal_translate support writing a srcwin that is
> partially covered by the input image's extents?

Morten,

I suppose since gdal_translate is internally creating a VRT
file to effect the subwindowing, I might as well remove the
restriction about staying on the image bounds.  I can just create
an extended in-memory VRT much as you have.  If you would like
to file an enhancement request in bugzilla, I will try to do this at
some point.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list