(This question was asked on another forum 3 months ago but received no response. I'd really welcome some help getting over the problem)
My input map is a JPG scan of a not-to-scale map. I would like to warp it to EPSG:3857 so that it can forced to scale. The result is not warping as I'd expect. Se images below.
The approach taken is to add 9 widely dispersed GCPs (ground control points) but no projection to a new TIF file. The GCPs have been added as X, Y, Longitide, Latitude, Z=0. gdal_edit does this step (from Python) without error and gdalinfo in.tif now shows:
Size is 3421, 1925 Coordinate System is `' GCP Projection = GCP[ 0]: Id=1, Info= (462,111) -> (-1.541,50.759,0) GCP[ 1]: Id=2, Info= (732,657) -> (-1.496,50.704,0) GCP[ 2]: Id=3, Info= (1998,1764) -> (-1.285,50.588,0) GCP[ 3]: Id=4, Info= (1911,687) -> (-1.291,50.701,0) GCP[ 4]: Id=5, Info= (1896,108) -> (-1.3,50.762,0) GCP[ 5]: Id=6, Info= (2691,360) -> (-1.158,50.732,0) GCP[ 6]: Id=7, Info= (2739,1098) -> (-1.149,50.659,0) GCP[ 7]: Id=8, Info= (3108,756) -> (-1.084,50.689,0) GCP[ 8]: Id=9, Info= (2163,1320) -> (-1.254,50.635,0) The subsequent warp command is supposed to introduce a spatial reference system:
gdalwarp -of GTiff -t_srs EPSG:3857 in.tif out-warped-3857.tif It runs, but the resulting map is stretched wrongly, from 3421x1925 to 3852x1381. Changing the output projection to EPSG:4326, the result is identical which I wouldn't expect.
There are three images to illustrate:
Questions: Is this the best way to add projection and force a map to scale? Why is the vertical dimension shrinking so much?



gdalwarp -of GTiff -s_srs epsg:4326 -t_srs EPSG:3857 in.tif out-warped-3857.tifshould make difference.