Comments (2)
Thanks @j08lue 🙏
count - what is that for weighted data? Count of all finite values where weights are non-zero? Or the sum of the weights?
I would sum the weights I think, I think it's the current behaviour: https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/utils.py#L139
min, max, minority, majority, unique and also histogram - we should probably only take values into account where weights are non-zero.
so in
Lines 134 to 163 in 73175d0
array
instead of data
from rio-tiler.
I would sum the weights
Yes, that must be the right way.
we should use array instead of data
Hmm, no, I think we need to get rid of multiplying coverage with data for all stats and only do that for mean.
What I meant was to make sure we expand the mask of data
by the points where coverage equals zero. Since we compress that array (take out masked elements), we would then also exclude pixels with no coverage.
Line 97 in 73175d0
Ideally, data.mask
and coverage == 0 should be identical anyways, if data.mask
is the rasterized query polygon and coverage is a refined version of the mask around the edges. But we need to be extra sure. Like
data.mask[:, coverage == 0] = True
from rio-tiler.
Related Issues (20)
- Interpolation should happen after masking HOT 1
- READER RETUNR NOT FOUND
- Reader `resampling_method` has no effect HOT 1
- Reader `resampling_method` has no effect when doing Reprojection HOT 2
- Investigate weird output resolution after #648 HOT 3
- remove usage of WarpedVRT?
- No colormapping support for float dtype HOT 1
- Worse image quality with tiles cut using rio-tiler than GDAL HOT 4
- Custom In-Memory Reader HOT 1
- nodata value being ignored HOT 3
- .tile() is not masking region outside of image when nodata used HOT 3
- Count default method? HOT 1
- Method to filter assets within mosaic_reader HOT 1
- Forwarding `ImageData.array.mask` in NPZ output HOT 4
- [STAC] access Alternate URL
- nodata value being ignored for NaN HOT 2
- Error applying expression with STACReader : "NumExpr 2 does not support Unicode as a dtype."
- Investigate higher HEAD/GET Request with GDAL >3.7 HOT 9
- replace deprecated `is_tiled`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rio-tiler.