What version of gdal are you using? Starting with 1.10, it gdal_translate should do what you want. Specifying -eco or -epo makes it an error:
-epo: (Error when Partially Outside)(GDAL >= 1.10) If this option is set, -srcwin or -projwin values that falls partially outside the source raster extent will be considered as an error. The default behaviour starting with GDAL 1.10 is to accept such requests, when they were considered as an error before. -eco: (Error when Completely Outside)(GDAL >= 1.10) Same as -epo, except that the criterion for erroring out is when the request falls completely outside the source raster extent. http://www.gdal.org/gdal_translate.html On Fri, Jan 17, 2014 at 8:34 AM, Metzen <os...@gzmarketing.com> wrote: > I'm using gdalbuildvrt to combine a bunch of .dem files into a larger .vrt > file, then using gdal_translate to slice this into 1 deg x 1 deg tiles. > > gdalbuildvrt index.vrt *.dem > > gdal_translate -of USGSDEM -projwin -88.0001042 52.0001042 -86.9998958 > 50.9998958 index.vrt output/N52W088.dem > > The problem comes when I need a 1 x 1 tile of an area that only has partial > data. Then I get "Computed -srcwin falls outside raster size". > > Is there a way I can pad the .vrt with null or 0values so the index.vrt > raster size is larger and I can export a 1 x 1 tile? The area I need to pad > is all ocean, so 0 or null would be fine. > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/gdal-translate-Generate-Full-1-deg-x-1-deg-tile-from-partial-data-tp5098660.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Kyle _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev