[gdal-dev] pansharpening on images with RPCs post GDAL 3.6
Howard Butler
howard at hobu.co
Tue Feb 25 13:25:23 PST 2025
Joe,
Ask the AI from AiDASH to tell you how to do it? Oh, right, the GDAL list is your training corpus, not the inference data.
Sorry for being snotty, but please refrain from reposting questions to the list like this. If no one answered your question the first time, the LLM hallucinates and pukes out-of-order GDAL arguments at you, and you cannot dig through the source code and documentation to figure it out yourself, you should hire a consultant. https://gdal.org/en/stable/community/service_providers.html is a list of a few, and inspecting the commit history of the repository should give you some inspiration for others to privately contact.
Howard
> On Feb 25, 2025, at 2:51 PM, Joe McGlinchy via gdal-dev <gdal-dev at lists.osgeo.org> wrote:
>
> Any advice on how to pansharpen image space data with RPCs in gdal >= 3.7?? Repeating below.
>
> Hello,
>
> I saw in the migration notes from GDAL 3.6 -> 3.7:
>
> - Pansharpening now requires that panchromatic and multispectral bands have valid geotransform (in early versions, it was assumed in the case of missing geotransform that they covered the same geospatial extent). The undocumented VRT pansharpened MSShiftX and MSShiftY options (and the corresponding C++ GDALPansharpenOptions::dfMSShiftX and dfMSShiftY members) have been removed, due to using the inverted convention as one would expect, and being sub-par solution compared to using geotransform to correlate pixels of panchromatic and multispectral bands.
>
> Previously, I had been taking a PAN and MS set of images with RPCs and running gdal_pansharpen, then copying over the RPCs from the PAN file, then continuing on in my workflow. This no long works past GDAL 3.6, so is there a recommended workflow for doing this? I've been able to "gdalwarp -rpc" the files prior to calling gdal_pansharpen, but i'd like to retain the image in image space with RPCs if possible.
>
> thanks,
> Joe
>
> From: Joe McGlinchy <joe at aidash.com>
> Sent: Friday, February 14, 2025 10:37
> To: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
> Subject: pansharpening on images with RPCs post GDAL 3.6
>
> Hello,
>
> I saw in the migration notes from GDAL 3.6 -> 3.7:
>
> - Pansharpening now requires that panchromatic and multispectral bands have valid geotransform (in early versions, it was assumed in the case of missing geotransform that they covered the same geospatial extent). The undocumented VRT pansharpened MSShiftX and MSShiftY options (and the corresponding C++ GDALPansharpenOptions::dfMSShiftX and dfMSShiftY members) have been removed, due to using the inverted convention as one would expect, and being sub-par solution compared to using geotransform to correlate pixels of panchromatic and multispectral bands.
>
> Previously, I had been taking a PAN and MS set of images with RPCs and running gdal_pansharpen, then copying over the RPCs from the PAN file, then continuing on in my workflow. This no long works past GDAL 3.6, so is there a recommended workflow for doing this? I've been able to "gdalwarp -rpc" the files prior to calling gdal_pansharpen, but i'd like to retain the image in image space with RPCs if possible.
>
> thanks,
> Joe
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250225/7e6081b5/attachment-0001.htm>
More information about the gdal-dev
mailing list