[gdal-dev] gdalbuildvrt & gdal2tiles.py with GeoTIFF across anti-meridian...

Even Rouault even.rouault at spatialys.com
Tue Jan 5 07:32:26 PST 2016


Le mardi 05 janvier 2016 16:20:08, Jan Knepper a écrit :
> All,
> 
> Running across (an) other issue(s)...
> 
> I was able to gdalwarp a .tif overlapping the anti-meridian with
> --config CENTER_LONG 180
> 
> Next step was to use gdalbuildvrt to build a .vrt file in preparation
> for tiling with gdal2tiles.py.
> When trying that this message displays:
> Warning 6: gdalbuildvrt does not support heterogenous projection.
> Skipping ...
> And the skipped file is not included in the .vrt file.
> 
> I tried using the --config CENTER_LONG 180 with gdalbuildvrt which gives
> the same result.
> 
> Then I tried:
> gdalbuildvrt --config CENTER_LONG 180 -allow_projection_difference ...
> 
> This does NOT give the previous message, but after running gdal2tiles.py
> on the .vrt the tiles that should have been generated from the .tif file
> in question appear to be missing...
> Any thing specific I should do to make this work?

The message means that you have files in different projections, like different 
UTM zones, or a mix of files in long/lat geodetic projection and a projected 
coordinate system. You will have first to find a common projected system before 
mosaicing themp with gdalbuildvrt. This can be done with gdalwarp (potentially 
with -of VRT to generate a "warped VRT").

> 
> Something else I noticed is that it seems to be important in what order
> .tif files are submitted to gdalbuildvrt. Many if not all the .tif(s)
> used have an Alpha Channel for transparency because they are 'cut' from
> a .tif. What I see happening is that the transparent part of a /later/
> .tif wipes the non-transparent parts of /earlier/ .tif(s) it overlaps.
> Is there an easy solution for this?

gdalbuildvrt / the VRT format doesn't handle alpha compositing. The source 
files listed after previous ones will override all the channels, including the 
alpha channel.
That would indeed be an interesting improvement to the VRT driver to do proper 
alpha compositing.
The solution for the time being is to use gdalwarp (but of course the result 
will be a "plain" raster, not a virtual one)

> 
> GDAL 1.11.2, released 2015/02/10
> 
> Any help/assistance would be appreciated!
> 
> Thanks!
> Jan

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list