I have one JPG (170 MB) and JGW file of a small area projected in EPSG:5514 (Image provider told me.)
JGW file:
0.1250000
0.0000000
0.0000000
-0.1250000
-584310.1875000
-1213026.9375000
I am trying to create a custom map tiles for Leaflet in EPSG:3857.
I have tried to convert source JPG to TIFF
gdal_translate -of Gtiff -a_srs EPSG:5514 -co COMPRESS=JPEG -co JPEG_QUALITY=100 -co PHOTOMETRIC=YCBCR source.jpg output.tiff
Then I have used gdalwarp for reprojection
gdalwarp -of Gtiff -s_srs EPSG:5514 -t_srs EPSG:3857 -co COMPRESS=JPEG -co JPEG_QUALITY=100 -co PHOTOMETRIC=YCBCR output.tiff output_3857.tiff
Then I have transformed it to JPEG and changed the image size for zoom level
gdal_translate -of JPEG -outsize 16384 17700 output_3857.tiff output_zoom6.jpg
As a last step I generated the tiles
gdal2tiles -p raster -w all output_zoom6.jpg tiles
But if I use these tiles in Leaflet and I try to add a marker to the map, marker is in the wrong place...
Marker should be near the center of the image... If I use OpenStreet map tiles, marker is in the correct position, so my tiles are on the wrong place.
Any ideas what I am doing wrong?