I'm trying to combine a 30 arc second global elevation coverage GeoTIFF
gdalinfo GEBCO_2014_1D_EPSG4326.tif Driver: GTiff/GeoTIFFFiles: GEBCO_2014_1D_EPSG4326.tifSize is 43200, 21600Coordinate System is `'Origin = (-180.000000000000000,90.000000000000000)Pixel Size = (0.008333333333333,-0.008333333333333)Image Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left (-180.0000000, 90.0000000) Lower Left (-180.0000000, -90.0000000) Upper Right ( 180.0000000, 90.0000000) Lower Right ( 180.0000000, -90.0000000) Center ( 0.0000000, 0.0000000) Band 1 Block=43200x1 Type=Int16, ColorInterp=Gray... with a very small area of 1/3 arc coverage.
gdalinfo asc/puerto-rico.tif Driver: GTiff/GeoTIFFFiles: asc/puerto-rico.tifSize is 24301, 11881Coordinate System is:GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]]Origin = (-67.600046296295005,18.800046283695000)Pixel Size = (0.000092592590000,-0.000092592590000)Metadata: AREA_OR_POINT=AreaImage Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left ( -67.6000463, 18.8000463) ( 67d36' 0.17"W, 18d48' 0.17"N)Lower Left ( -67.6000463, 17.6999537) ( 67d36' 0.17"W, 17d41'59.83"N)Upper Right ( -65.3499538, 18.8000463) ( 65d20'59.83"W, 18d48' 0.17"N)Lower Right ( -65.3499538, 17.6999537) ( 65d20'59.83"W, 17d41'59.83"N)Center ( -66.4750000, 18.2500000) ( 66d28'30.00"W, 18d15' 0.00"N)Band 1 Block=24301x1 Type=Int16, ColorInterp=Gray NoData Value=-9999Using this merge command, note the 1/3 file is first as gdal_merge.py defaults to using the pixel size of the first input file. If the arguments are the other way around then the output file does not contain the level of detail contained in the 1/3 arc second file.
gdal_merge.py -o output.tif puerto-rico.tif GEBCO_2014_1D_EPSG4326.tifHowever this just continues for a very long time to 10GB+, I assume it is resampling the 30 arc second data to 1/3 arc second.
ls -lh *.tif-rwxrwxrwx 1 root root 1.8G Jul 16 16:09 GEBCO_2014_1D_EPSG4326.tif-rwxrwxrwx 1 root root 13G Aug 3 11:51 output.tif-rwxrwxrwx 1 root root 551M Aug 3 11:43 puerto-rico.tifQuestions
أكثر...
gdalinfo GEBCO_2014_1D_EPSG4326.tif Driver: GTiff/GeoTIFFFiles: GEBCO_2014_1D_EPSG4326.tifSize is 43200, 21600Coordinate System is `'Origin = (-180.000000000000000,90.000000000000000)Pixel Size = (0.008333333333333,-0.008333333333333)Image Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left (-180.0000000, 90.0000000) Lower Left (-180.0000000, -90.0000000) Upper Right ( 180.0000000, 90.0000000) Lower Right ( 180.0000000, -90.0000000) Center ( 0.0000000, 0.0000000) Band 1 Block=43200x1 Type=Int16, ColorInterp=Gray... with a very small area of 1/3 arc coverage.
gdalinfo asc/puerto-rico.tif Driver: GTiff/GeoTIFFFiles: asc/puerto-rico.tifSize is 24301, 11881Coordinate System is:GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]]Origin = (-67.600046296295005,18.800046283695000)Pixel Size = (0.000092592590000,-0.000092592590000)Metadata: AREA_OR_POINT=AreaImage Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left ( -67.6000463, 18.8000463) ( 67d36' 0.17"W, 18d48' 0.17"N)Lower Left ( -67.6000463, 17.6999537) ( 67d36' 0.17"W, 17d41'59.83"N)Upper Right ( -65.3499538, 18.8000463) ( 65d20'59.83"W, 18d48' 0.17"N)Lower Right ( -65.3499538, 17.6999537) ( 65d20'59.83"W, 17d41'59.83"N)Center ( -66.4750000, 18.2500000) ( 66d28'30.00"W, 18d15' 0.00"N)Band 1 Block=24301x1 Type=Int16, ColorInterp=Gray NoData Value=-9999Using this merge command, note the 1/3 file is first as gdal_merge.py defaults to using the pixel size of the first input file. If the arguments are the other way around then the output file does not contain the level of detail contained in the 1/3 arc second file.
gdal_merge.py -o output.tif puerto-rico.tif GEBCO_2014_1D_EPSG4326.tifHowever this just continues for a very long time to 10GB+, I assume it is resampling the 30 arc second data to 1/3 arc second.
ls -lh *.tif-rwxrwxrwx 1 root root 1.8G Jul 16 16:09 GEBCO_2014_1D_EPSG4326.tif-rwxrwxrwx 1 root root 13G Aug 3 11:51 output.tif-rwxrwxrwx 1 root root 551M Aug 3 11:43 puerto-rico.tifQuestions
- Is there a more optimal way of merging two files of different resolutions?
- Is there a limitation on the GeoTIFF file format which means this is not possible?
- Is there another way of solving this problem using geoserver?
- Alternative formats which support this?
أكثر...