Framing this post with the question first.


Can a GeoTIFF based off of the Google Mercator projection be warped or transformed to display WGS84 lat/long coordinates as opposed to northing/easting?

The Facts

I have software that will ingest images with their corresponding ESRI worldfiles. What we have done in the past is take a screenshot of Google Maps, and then apply a basic transformation with two or more GCPs. This would produce a simple 6 line Worldfile.

The software has been updated to a more GIS-centric piece of software. So those same images with their worldfiles are not displaying properly. See below example. The result is an image that is stretched, although the coordinates, which are tied to the mouse cursor, display the appropriate lat/long coordinates. (Example, -73.737605 , 41.192486)

enter image description here

What I Have Tried

  1. Using GDAL translate. I understand now that Google Maps uses EPSG:900913 Web Mercator as a projection, so when I use the WGS84 coordinates I get from Google Maps to build the GCP data, the result is the same as my software. The coordinates are displaying in lat/long, seem very close to being accurate, and the image is visibly stretched. Here is the GDAL command I used.

gdal_translate -gcp 336.8 1254.8 -73.737605 41.192486 -gcp 1489.2 1048.0 -73.73415 41.19296 -gcp 304.5 1782.5 -73.73771 41.19132 example.jpg example.tif

  1. I came across an article on here : "https://gis.stackexchange.com/questions/174771/georeferencing-image-from-google-maps-using-gdal-translate" . How I interpreted this article is that the google map image I captured must be georeferenced with the Google Mercator projection in order for it to be accurate. There were instructions on creating a batch file to convert standard lat/long to Google Mercator, and to then use the northing/easting values with the GDAL Translate function.

gdal_translate -gcp 336.8 1254.8 -8208432.64 5040774.9 -gcp 1489.2 1048.0 -8208048.03 5040845.02 -gcp 304.5 1782.5 -8208444.33 5040602.41 -co "TFW=YES" example.jpg exampleGOOGLE.tif


Now when I open the exampleGOOGLE.Tif in an application like QGIS, the image presents just like the original screenshot, and is georeferenced, however when I move the cursor around, I get the coordinates in that northing/easting format, and not the lat/long in decimal degrees, which is what is desired.


Using GDAL, in PowerShell, is there a known way to correctly georeference a Google Maps image, with Ground control points, and have that GeoTIFF configured for WGS84 lat/long without getting the stretched image?

  • 2
    It seems to me nothing more than the geographic coordinates of the ground control points being wrong, imprecise or inaccurate. Converting to another coordinate system will not improve their accuracy. Please provide information on how you obtain the geographic coordinates of the gcps so that we can help you find where the inaccuracy was introduced. May 25 at 1:34
  • I use software that I developed that will give me the pixel location of a point on an image. I also back that data up with QGIS and GIMP, and come up with the same pixel locations for the GCPs I have selected. I feel really confident that the Pixel coordinates of the GCPs are accurate. If I use Lat/Long from google maps (-73.737605,41.192486), with GDAL Translate, I get a stretched image, if I convert those to Google Mercator (-8208432.64,5040774.90) The image looks perfect, but when I get the coordinates under the cursor, they are in Google Mercator, and I need Lat/Long. May 25 at 13:19
  • Coordinates under the cursor in QGIS? They are the coordinates of the map. If you want the cursor coordinates in latlon you must show the map projected in latlon (EPSG:4326). But it has nothing to do with the image georeferencig, for which I think you must include the CRS of the image into the gdal_translate command, like -a_srs "EPSG:900913". May 25 at 17:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy