Comments (7)
Is there a reason not to implement the same numpy approach used for concentrations? That seems a good approach.
from qnspect.
Is there a reason not to implement the same numpy approach used for concentrations? That seems a good approach.
If we used the same approach of assigning 0 to division by zero cells we will encounter following issue:
Lets say we have raster A = [[0,2]]
and B = [[1,2]]
When we calculate percent difference here expression="100 * ((A - B) / A)"
We would endup getting resulting raster as [[0, 0]]
which is not correct.
from qnspect.
Correct, that should give [[NODATA, 0]], I think. That might also be what we want for concentration. "0" implies there is runoff, but no pollutant, when in reality, there is no runoff at all. Therefore, when accumulated runoff = 0, we probably want to return NODATA.
from qnspect.
Correct, that should give [[NODATA, 0]], I think.
This will make the resulting raster have holes in it, I think a better approach would be [[inf, 0]]
I can see if there are ways to specify that. I have seen this before in QGIS.
That might also be what we want for concentration. "0" implies there is runoff, but no pollutant, when in reality, there is no runoff at all. Therefore, when accumulated runoff = 0, we probably want to return NODATA.
Actually, this is what was happening before, but this was leading to big holes in the middle of rasters, not looking good. One can argue when there is no runoff, then there is no pollutant as well hence 0 is the correct value for those cells. Infact if there is no runoff there will always be 0 pollutant as well by design of the code.
from qnspect.
If we go with the [[inf, 0]] option, do you know what that does to the color ramps? Do they try to include that high value? That was the advantage of the nodata approach we used in OpenNSPECT. Yes, there were gaps in data sets, but those gaps were meaningful and folks could interpret them.
from qnspect.
If we go with the [[inf, 0]] option, do you know what that does to the color ramps? Do they try to include that high value? That was the advantage of the nodata approach we used in OpenNSPECT. Yes, there were gaps in data sets, but those gaps were meaningful and folks could interpret them.
I will look into it and get back to you.
from qnspect.
The QGIS legend would include inf
, so that option definitely goes out. Currently, it raises runtime warnings for division by zero. This actually is good if we want to return no data for division by zero, at least this way, users get to know they have 0 values in Raster B.
Without the warning, it is possible to assume that there is no difference between A and B, when in fact there is a difference and B has 0 values for cells with a difference. With warning, users get some sort of notice. Closing as there is nothing else that can be opened. Reopen if necessary.
from qnspect.
Related Issues (20)
- Restructure files and folders to make it easy to zip and ship plugin
- Add tests
- Change pollutant selection gui
- Comparison Percent Calculation Incorrect? HOT 6
- Remove alphabetical sort on land cover classes
- Reorder input fields on GUIs to be as consistent as possible HOT 1
- Modify Land Cover (NLCD/C-CAP) is failing to execute.
- Typo in Run Pollution Analysis tool HOT 1
- Add raster alignment option to Rasterize Soils tool
- Validate user input for Null Values in Lookup Table and return user friendly error HOT 5
- Change the name for the โDesired Outputs [optional]โ group in Pollution Analysis tool HOT 4
- Warn user if `analysis` inputs are temporary layers
- Limit displayed files to common raster types when loading rasters
- Raster colors not loading consistently HOT 3
- Change most "land use" terms to land cover
- It should not be, but is, possible to reclass from CCAP to NLCD and vice-versa HOT 3
- Limit pollutant and erosion calculations to a selected polygon area HOT 5
- Change NoData value, at least in comparison results
- Concentration error introduced with SHA: 18fe2433f31
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 qnspect.