I am using the incorrect GDP for gdal_translate based on gdlainfo command line since image is offset from correct location. Image is at correct location when I use QGis GeoReference using my clicked on corners which are not the same as I used when using the command line gdal_translate. How do I translate the GCP corners to the correct values?? I need to automate my georeferencing.

Command Line Call:

gdalinfo --> Upper Left (0.0, 0.0) Lower Left (0.0,10434.0) Upper Right (11242.0,0.0) Lower Right (11242.0,10434.0) Center ( 5621.0, 5217.0)

gdal_translate -of GTiff -gcp 0 10434 43.0 11.0 -gcp 11242 10434 44.0 11.0 -gcp 0 0 43.0 12.0 -gcp 11242 0 44.0 12.0 myimage.png myimage.tif

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:4326 myimage.tif myimage_2.tif

QGis Call that Works:

gdal_translate -of GTiff -gcp 1001.19 202.821 43 12 -gcp 10826.7 180.285 44 12 -gcp 978.659 9983.29 43 11 -gcp 10826.7 10028.4 44 11 myimage.png myimage_2.png

gdalwarp -r near -tps -co COMPRESS=NONE myimage_2.png myimage.tif

1 Answer 1


My png image had white space around the edges which caused my GCP offset problem. A full answer to plotting a "density" map and generating tiles can be found at https://stackoverflow.com/questions/35185554/generate-density-plot-of-big-data-set-to-overlay-in-google-maps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.