I’m trying to improve the result of gdalwarp
operation.
The image width and height are 6732
x4721
GCP’s are:
-gcp 0 0 38.005301407753 55.048725423557
-gcp 6732 0 38.184943751144 55.048725423557
-gcp 6732 4721 38.184943751144 54.976478430872
-gcp 0 4721 38.005301407753 54.976478430872
gdal2tiles-multiprocess.py
was taken from this repo on github commenthol/gdal2tiles-leaflet
.
I’ve executed following commands in unix shell:
$ sudo gdal_translate -of GTiff -gcp 0 0 38.005301407753 55.048725423557 -gcp 6732 0 38.184943751144 55.048725423557 -gcp 6732 4721 38.184943751144 54.976478430872 -gcp 0 4721 38.005301407753 54.976478430872 test.png test.tif
Input file size is 6732, 4721
0...10...20...30...40...50...60...70...80...90...100 - done.
$ sudo gdaladdo -r average_magphase -clean -ro test.tif 2 4 6 8 16
0...10...20...30...40...50...60...70...80...90...100 - done.
$ sudo gdalwarp -s_srs epsg:4326 -t_srs epsg:4326 -r bilinear test.tif warped_test.tif
Creating output file that is 7629P x 3068L.
Processing input file test.tif.
Using band 4 of source image as alpha.
Using band 4 of destination image as alpha.
0...10...20...30...40...50...60...70...80...90...100 - done.
$ sudo python gdal2tiles-multiprocess.py -z 17 -w none warped_test.tif dist
Generating Base Tiles:
0...10...20...30...40...50...60...70...80...90...100 - done.
Generating Overview Tiles:
What I have got for now:
- Original image (
test.png
) - Result image on map (
gdal2tiles.jpg
) gdal_translate
operation result (test.tif
) – it is just-the-same as the “original image” (it’s on the dropbox)gdalwrap
operation result (warped_test.tif
) – I think there is the problem – it’s height has been shrunk down and after tiling there was some quality loss (maybe I’m wrong). It’s on the dropbox too.
As you can see on the “result image on map”, there is strong aliasing, which does not exists on the “original image”.
How can I get rid of this aliasing?
The link to all resources in comment below.