2

I am trying to follow this tutorial to convert a JPEG image of a WGS-84 Web Mercator world map to a GeoTIFF file using QGIS, but am failing to do it correctly-- the map comes out with black-hole-like warping:

Original jpg: enter image description here

Geotiff output (transformation type: inverse-spline): enter image description here

I am inputting EPSG:3857 coordinates using this online tool, and in QGIS I set the Target SRS to EPSG:3857.

Here are some debugging steps I tried:

  • Swap lon/lat values to lat/lon: did not fix, lon/lat seems correct
  • Change transformation type to any of the other options (linear, projective, polynomial, etc): they all produce different types of skewing and warping
  • Try adding more points, or spreading them around in different formations: did not fix, just changed the locations of the warp holes

Does anyone have an idea of what I'm doing wrong?

I'm simply trying to generate a raster tileset for Mapbox, which requires a geotiff file, so if anyone would like to suggest any other free methods of doing this for a GIS-newbie, I'd love to hear them!

Edit:

Here's a screenshot of my georeferencer transformation settings: enter image description here

3
  • Can you include a picture of the image that you are trying to georeference to? Can you include a screen shot of the transformation setting in the QGIS georeferencer?
    – GBG
    Commented Jun 10, 2022 at 19:46
  • I'm trying to georeference to a mapbox map. So that's just like any interactive map you see online, for example the one embedded on this page: docs.mapbox.com/mapbox-gl-js/example/georeference-imagery
    – A__
    Commented Jun 10, 2022 at 19:51
  • Maybe I should also mention that the coordinates I'm adding to the georeferencer tool aren't exact-- I'm basically eyeing their positions then copypasting the resulting value from epsg.io/map#srs=3857 ...I figured a certain level of exactitude wasn't necessary...
    – A__
    Commented Jun 10, 2022 at 19:58

1 Answer 1

1

Alright, so I've finally successfully generated a nice looking GeoTIFF file. I discovered a slightly different tutorial outlining more-or-less the same QGIS process but with a little more detail describing what the dX, dY and Residual error values are, and how to adjust them. I adjusted the points I added to the JPG until all dX and dY error values were as close to 0 as possible. Then I generated the GeoTIFF file with Polynomial 2 transformation type and it came out fine.

So my suspected diagnosis is that I had too-high of error rates previously, although they must have not been very noticeable so it's best to be super precise.

Here is a screenshot showing the successful coordinates and error values:

enter image description here

2
  • 3
    You used originally Thin Plate Spline method that forces the residuals of all ground control points to be zero and image is warped exactly to every GCP . But if the GCPs are way off then the warped image can get really weird shapes as you noticed.
    – user30184
    Commented Jun 10, 2022 at 21:49
  • Thanks for that context, makes sense.
    – A__
    Commented Jun 11, 2022 at 17:05

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.