1

I've got a non-projected TIF with 440 GCPs (a Sentinel-1 image) that crosses the antimeridian. Normally I just call gdalwarp with -t_srs (in this case 'epsg:3031' Antarctic Polar Stereographic), however for this image it creates a very large file that is mostly zero, apart from a distorted patch of data at the bottom that is split in half. Using --config CENTER_LONG 180 stops the split but not the large, mostly empty image with distorted data patch. I'm guessing that gdalwarp is having trouble with GCPs that exist on both sides of the +/- 180 degree line but not sure how to fix it, has anyone else run into this (and fixed it??).

1
  • I had a similar issue with a different dataset and --config CENTER_LONG 180 fixed it for me, thanks for that lead. The gdal docs are without explanation for that config gdal.org/user/configoptions.html
    – btjakes
    Oct 20 at 13:52

1 Answer 1

1

Figured out a solution, unsure if it's the best approach but it turns out that first transforming the embedded GCPs to Polar Stereographic THEN using gdalwarp to project the image seems to work fine. A python script to do this can be found here: https://github.com/manaakiwhenua/mwlr-geo-utils/blob/main/bin/mw-gcptransform.py

Your Answer

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

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