Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging. That might fix your issue in GDAL merge warp has black block can't removeGDAL merge warp has black block can't remove as well, since it adds an alpha channel too.

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging. That might fix your issue in GDAL merge warp has black block can't remove as well, since it adds an alpha channel too.

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging. That might fix your issue in GDAL merge warp has black block can't remove as well, since it adds an alpha channel too.

added 164 characters in body
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging. That might fix your issue in GDAL merge warp has black block can't remove as well, since it adds an alpha channel too.

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging.

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging. That might fix your issue in GDAL merge warp has black block can't remove as well, since it adds an alpha channel too.

added 150 characters in body
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif
 

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging.

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

Your source data is in GDA94, supposed to be Vicgrid94 covering Philip Island. gdalwarp transforms correctly to a target CRS of epsg:3857, but gdal_translate will not do that.

-a_srs has a different purpose: just assign a CRS, no reprojection.

So you have to use:

gdalwarp -of GTiff -s_srs epsg:3111 -a_srs epsg:3857 test.vrt  25k.tif
 

BTW I used this batch to merge and tile a set of maps in a local projection:

for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt
gdalbuildvrt -allow_projection_difference index25.vrt NL25\*.vrt
gdal2tiles --s_srs EPSG:28992 --zoom 15-16 index25.vrt tiles
pause

No big tif file needed, and gdal2tiles reprojects to EPSG:3857 itself. The -expand rgba is needed for paletted source files, so I wrapped those in a vrt for each source file before merging.

added 150 characters in body
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163
Loading
Source Link
AndreJ
  • 77.1k
  • 5
  • 88
  • 163
Loading