I am trying to create a tile base map. I have an image that I want to create the tile from and I am using GDAL.
I managed to create the tiles but when I view the result it seems that the tiled map is:
- It is flipped
- The proportions are not right
This is the map overlay image:
This is the result of the tiling:
I checked many times that the coordinates are good by comparing the image corners on an orthophoto.
An other thing is that in google earth with the same coordinates the map image fits precisely to google map.
EDITED
gdalinfo map_overlay.png
with this output:
Driver: PNG/Portable Network Graphics Files: map_overlay.png Size is 3527, 2494 Coordinate System is `' Image Structure Metadata:
INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 2494.0) Upper Right ( 3527.0, 0.0) Lower Right ( 3527.0, 2494.0) Center ( 1763.5, 1247.0) Band 1 Block=3527x1 Type=Byte, ColorInterp=Red Mask Flags: PER_DATASET ALPHA Band 2 Block=3527x1 Type=Byte, ColorInterp=Green Mask Flags: PER_DATASET ALPHA Band 3 Block=3527x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA Band 4 Block=3527x1 Type=Byte, ColorInterp=Alpha
Then translate:
gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 31.7431761644 35.1680410195 -gcp 3527 0 31.7493769674 35.1784535489 -gcp 3527 2492 31.7431011291 35.1784951643 -gcp 0 2494 31.7431761644 35.1680410195 map_overlay.png map_overlay.vrt
with this output:
Input file size is 3527, 2494
and lastly:
gdal2tiles.py -z 14-21 map_overlay.vrt
The overlay is a simple .png image without any special data.
I will appreciate any help.
Shani
gdal_translate
parameters you posted here: you are associating (lat,lon) = (31.7431761644, 35.1680410195) with two distinct points at (0,0) and (0,2494). Is this really the command you issued, or is it a copy-and-paste error?