Framing this post with the question first.
Question
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)
What I Have Tried
- 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
- 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
Result
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.
SO
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?
-a_srs "EPSG:900913"
.