[gdal-dev] Weird issue when running gdaltranslate
Even Rouault
even.rouault at mines-paris.org
Tue Apr 1 04:57:30 PDT 2014
Moses,
Hum, your VRT is 2147483647 x 2147483647 large, which is the largest possible
raster that GDAL can handle in theory ! Something must have gone seriously wrong
when building it. I suspect that some input files have weird or inconsistant
georeferencing causing the extent to go to those crazy values.
The GeoTIFF driver fails gracefully with that. Whereas the AAIGRID driver
crashes.
But the original issue is really in your VRT file.
Even
> <Moses.Gone <at> t-systems.com> writes:
>
> >
> >
> >
> > Hi everyone,
> > I am getting this weird error when I try to convert a vrt to a tif.
> > Â
> > Some context: We are tiling a set of tifs(in a list file). First we
> generate a vrt from the list. Then we assign a projection on the generated
> vrt using gdaltranslate. We then clip the output using gdalwarp applying a
> clipping at the same time to the desired
> > BBOX(This is achieved using the âte option). In the warp operation we
> also
> specify the target SRS(using the ât_srs option). Lastly we tile using our
> customized gdal_retile.py. All is fine with the projection and clipping, but
> the resultant tiles are empty-no
> > data just white images.
> > Â
> > So I tried to backtrack my steps, to check at what point is the data being
> lost. Generation of the VRT works fine. However, performing gdaltranslate to
> assign the source SRS on the VRT result into this error:
> > Â
> > bash-2.05$ gdal_translate -of GTiff ffm_dtk200_wdd.vrt test.tif
> > Input file size is 2147483647, 2147483647
> > 0ERROR 1: GTiffCreateCopy():No space for strip arrays
> > ERROR 1: MissingRequired:TIFF directory is missing required "StripOffsets"
> field
> > ERROR 1: MissingRequired:TIFF directory is missing required "StripOffsets"
> field
> > Â
> > I tried to also convert to AAIGrid format, thinking that something is
> wrong converting to Tiff, but also got this error:
> > Â
> > bash-2.05$ gdal_translate -of AAIGrid ffm_dtk200_wdd.vrt test3
> > Input file size is 2147483647, 2147483647
> > 0ERROR 1: CPLMalloc(-4): Silly size requested.
> > Â
> > ERROR 1: ffm_dtk200_wdd.vrt, band 1: The buffer into which the data should
> be read is null
> > Segmentation Fault
> > Â
> > Other tiling jobs following a similar method, with different source data
> works fine though. Could the problem be with the data? If so how comes it
> worked before?
>
> Hi,
>
> Perhaps adding -co BIGTIFF could help. Much better though would be better to
> skip the whole step of creating a temporary tiff file because it is slow and
> unnecessary.
>
> Use buildvrt with -a_srs and resulting vrt contains projection. Even if it
> is missing you should be able to tell it directly for gdalwarp as
>
> gdalwarp -s_srs epsg:xxx -t_srs epsg:yyyy -te .... input.vrt output.tif
>
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list