PolarGeospatialCenter / imagery_utils

Other
34 stars 10 forks source link

Added gdalwarp --tap argument, couple bugfixes #37

Closed ehusby closed 3 years ago

ehusby commented 3 years ago

Fixed a math order of operations bug in automatic stretch option --stretch='au', and re-enabled use of that option by adding 'au' to the list of --stretch choices.

pgc_pansharpen.py would throw unwarranted/misleading error messages, one for every panchromatic image in the source directory, such as this:

RuntimeError: Image does not match multispectral name pattern: WV03_20150520204559_104001000C4A2100_15MAY20204559-P1BS-500827654050_01_P001.ntf

I reworked the error-catching logic to filter out reporting panchromatic images that are part of matched pan/multi pairs. All unmatched images should still be reported.

ehusby commented 3 years ago

@clairecporter Does the automatic stretch (--stretch='au') feature still look good to you? One of the bugfixes involved the latitude calculation for that. Currently that options does this: au: automatically set (rf for images below 60S latitude, otherwise mr)

I'm not sure if you realized that the au choice was actually disabled up until now, since it was missing from the choices list for the stretch argument.

I'd like to merge this PR fairly soon, since it touches some of the external GDAL commands that I figure @bagl0025 would need to modify in converting to in-memory raster handling.