Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from OSGeo:master #151

Merged
merged 6 commits into from
Jan 14, 2025
Merged

[pull] master from OSGeo:master #151

merged 6 commits into from
Jan 14, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 14, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

rouault and others added 6 commits January 11, 2025 01:04
Make use of the new GDALDriverHasOpenOption method
Python bindings: on Debian, fix install target with non-Debian provided python version
…11209)

Adds a C++ pixel function called "expression" that can evaluate an arbitrary expression (or indeed, a mini-program) using either:
- the [exprtk library](https://www.partow.net/programming/exprtk/index.html). This is a single MIT-licensed header, that appears to be quite widely used. But which causes a significant increase in size of libgdal (8 MB)
- or [muparser](https://github.com/beltoforion/muparser), that supports a reasonable variety of functions including a ternary conditional operator

muparser is the deault when the "dialect" is not specified.

An example VRT that is allowed is:

```
<VRTDataset rasterXSize="1" rasterYSize="1">
  <VRTRasterBand dataType="Float64" band="1" subClass="VRTDerivedRasterBand">
    <PixelFunctionType>expression</PixelFunctionType>
    <PixelFunctionArguments expression="(NIR-R)/(NIR+R)" />
    <SimpleSource name="NIR">
      <SourceFilename relativeToVRT="0">source_0.tif</SourceFilename>
      <SourceBand>1</SourceBand>
    </SimpleSource>
    <SimpleSource name="R">
      <SourceFilename relativeToVRT="0">source_1.tif</SourceFilename>
      <SourceBand>1</SourceBand>
    </SimpleSource>
  </VRTRasterBand>
</VRTDataset>
```
@pull pull bot added the ⤵️ pull label Jan 14, 2025
@pull pull bot merged commit a12a5f6 into makesoftwaresafe:master Jan 14, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12776764827

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 203 of 231 (87.88%) changed or added relevant lines in 10 files are covered.
  • 68 unchanged lines in 31 files lost coverage.
  • Overall coverage increased (+0.02%) to 70.096%

Changes Missing Coverage Covered Lines Changed/Added Lines %
frmts/vrt/vrtexpression.h 7 8 87.5%
frmts/vrt/vrtprocesseddataset.cpp 0 1 0.0%
frmts/vrt/pixelfunctions.cpp 33 37 89.19%
frmts/vrt/vrtexpression_muparser.cpp 53 63 84.13%
frmts/vrt/vrtprocesseddatasetfunctions.cpp 92 104 88.46%
Files with Coverage Reduction New Missed Lines %
frmts/gtiff/libtiff/tif_dirwrite.c 1 54.37%
gcore/gdalpamdataset.cpp 1 94.07%
frmts/jpegxl/jpegxl.cpp 1 78.54%
frmts/vrt/vrtprocesseddataset.cpp 1 82.07%
frmts/gtiff/libtiff/tif_compress.c 1 67.23%
frmts/ctg/ctgdataset.cpp 1 84.65%
port/cpl_vsisimple.cpp 1 69.85%
port/cpl_vsil_curl_streaming.cpp 1 86.28%
port/cplstringlist.cpp 1 92.12%
ogr/ogrsf_frmts/mvt/ogrmvtdataset.cpp 1 94.61%
Totals Coverage Status
Change from base Build 12771005162: 0.02%
Covered Lines: 563718
Relevant Lines: 804210

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants