I have a set of about 200 geotiff files over the UK for which I need to generate a .vrt. When I use gdalbuildvrt
, it spits out multiple warnings (on about 25% of the files), which say:
Warning 6: gdalbuildvrt does not support heterogeneous projection: expected British National Grid (10 Figure Grid Reference), got OSGB 1936 / British National Grid. Skipping {*filename*}
The GDALInfo on one of these 'problematic' files is
Driver: GTiff/GeoTIFF
Files: M726-AIR_004_1-GSGS_geo_clip.tif
Size is 18896, 18898
Coordinate System is:
PROJCS["OSGB 1936 / British National Grid",
GEOGCS["OSGB 1936",
DATUM["OSGB_1936",
SPHEROID["Airy 1830",6377563.396,299.3249612664951,
AUTHORITY["EPSG","7001"]],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",49],
PARAMETER["central_meridian",-2],
PARAMETER["scale_factor",0.9996012717],
PARAMETER["false_easting",400000],
PARAMETER["false_northing",-100000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","27700"]]
Origin = (420000.189984170487151,1147000.544881728477776)
Pixel Size = (2.116805338468027,-2.116697291374624)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
TIFFTAG_XRESOLUTION=600
TIFFTAG_YRESOLUTION=600
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 420000.190, 1147000.545) ( 1d38'20.88"W, 60d12'26.73"N)
Lower Left ( 420000.190, 1106999.199) ( 1d38'34.90"W, 59d50'53.59"N)
Upper Right ( 459999.344, 1147000.545) ( 0d55' 3.07"W, 60d12'12.60"N)
Lower Right ( 459999.344, 1106999.199) ( 0d55'45.13"W, 59d50'39.65"N)
Center ( 439999.767, 1126999.872) ( 1d16'56.00"W, 60d 1'34.90"N)
Band 1 Block=18896x56 Type=Byte, ColorInterp=Red
Band 2 Block=18896x56 Type=Byte, ColorInterp=Green
Band 3 Block=18896x56 Type=Byte, ColorInterp=Blue
The GDALInfo on one of the 'normal' files is
Driver: GTiff/GeoTIFF
Files: M726-AIR_001_1-GSGS_geo_clip.tif
Size is 18896, 18898
Coordinate System is:
PROJCS["British National Grid (10 Figure Grid Reference)",
GEOGCS["OSGB 1936",
DATUM["OSGB_1936",
SPHEROID["Airy 1830",6377563.396,299.3249646000043,
AUTHORITY["EPSG","7001"]],
TOWGS84[375,-111,431,0,0,0,0],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",49],
PARAMETER["central_meridian",-2],
PARAMETER["scale_factor",0.9996012717],
PARAMETER["false_easting",400000],
PARAMETER["false_northing",-100000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (429001.304246288083959,1219999.760539699811488)
Pixel Size = (2.116883494595527,-2.116617239070123)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2015:11:17 12:48:48
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
TIFFTAG_SOFTWARE=Adobe Photoshop CS6 (Windows)
TIFFTAG_XRESOLUTION=600
TIFFTAG_YRESOLUTION=600
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 429001.304, 1219999.761) ( 1d27'57.76"W, 60d51'44.43"N)
Lower Left ( 429001.304, 1179999.928) ( 1d28'19.06"W, 60d30'11.49"N)
Upper Right ( 469001.935, 1219999.761) ( 0d43'47.01"W, 60d51'26.65"N)
Lower Right ( 469001.935, 1179999.928) ( 0d44'37.68"W, 60d29'53.97"N)
Center ( 449001.620, 1199999.844) ( 1d 6'10.38"W, 60d40'50.95"N)
Band 1 Block=18896x4 Type=Byte, ColorInterp=Red
Band 2 Block=18896x4 Type=Byte, ColorInterp=Green
Band 3 Block=18896x4 Type=Byte, ColorInterp=Blue
I have had only occasional need to use gdal utilities in the past, so I'm not an expert. I was thinking I would use gdalwarp
to 'fix' the problematic files so they match the others. But since the problematic files all list a PROJCS
authority (AUTHORITY["EPSG","27700"]
) but the 'normal' ones don't list an authority for the PROJCS
, should I instead warp all the 'normal' ones to match the 'problematic' ones?
The visible differences (that stand out to me) are the very slight differences in the flattening parameter and the presence of a TOWGS84
parameter in the 'normal' GEOGCS[DATUM[]]
.
Edited to add: When I tried using gdalwarp
to apply EPSG:27700 to one of the 'normal' files, it seemed to process the file without complaint, but the file size jumped from 61MB to over 1GB. Due to my current space limitations, this 17x increase in file size won't easily work.
What might be a good way to resolve this heterogeneous projection issue so gdalbuiltvrt
can succeed?