[gdal-dev] gdal_calc.py improvments

Idan Miara idan at miara.com
Wed Jun 24 14:35:24 PDT 2020


Hi all,

I've added some additions/improvements to gdal_calc.py
https://github.com/talos-gis/gdalos/blob/master/src/gdalos/calc/gdal_calc.py


1. Alphalist now includes lower case letters.
2. added hideNoData option to ignore noDataValues
3. accept gdal datasets and pathlib.Path objects as alternative to string
filenames of input rasters.
4. can work with input of different extents - either use a given extent or
calculate an extent as a union or an intersection of the given rasters
extents.
5. optionally verify equal Geotransform and SRS.
6. accept additional user_namespace to the global_namespace
7. option to return the output ds
8. allow to run without outF with MEM driver
9. accept a ColorTable input and apply to the output.
10. Accept multiple rasters with the same Alpha name to make a list of
inputs. Then allow the use functions that operates on a vector of blocks,
like "max" or "add" or
https://github.com/talos-gis/gdalos/blob/master/src/gdalos/calc/gdalos_combine.py

What do you think about these additions?
Could you guide me what to do prior to creating a good PR for that?
I guess some of my additions would need to be improved beforehand
(Specifically #4, is there a better way to do it then to use VRTs? ) and
also maybe remove some of the dependencies in other functions, like
GeoRectangle (for the input extent).
I also didn't create extensive tests for all that... (I'm not sure how time
consuming this could be).

Kind regards,
Idan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200625/947fcab0/attachment.html>


More information about the gdal-dev mailing list