Calculate percentile value of raster The Next CEO of Stack OverflowChange NODATA pixel value in raster to arbitrary valueRemoving pixels in raster map using ArcGIS for Desktop?Numpy raster reclassify outputs only 2 out of 6 classesERROR 000358 When trying to select by attribute using “IS NULL” queryConverting raster to vector from multiple raster values?Calculate mean of raster excluding values in ArcMap?Use Raster Calculator on huge set of rastersTop percentile in zonal statistics - ArcGISConverting string to float in Calculate Value for ModelBuilder?Classifying quantiles in raster dataset with ArcPy?
Where do students learn to solve polynomial equations these days?
Reference request: Grassmannian and Plucker coordinates in type B, C, D
A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See
Why don't programming languages automatically manage the synchronous/asynchronous problem?
How to edit “Name” property in GCI output?
Is it my responsibility to learn a new technology in my own time my employer wants to implement?
What steps are necessary to read a Modern SSD in Medieval Europe?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
Is it possible to use a NPN BJT as switch, from single power source?
What flight has the highest ratio of time difference to flight time?
WOW air has ceased operation, can I get my tickets refunded?
How to count occurrences of text in a file?
Is French Guiana a (hard) EU border?
Is the D&D universe the same as the Forgotten Realms universe?
Won the lottery - how do I keep the money?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Why does standard notation not preserve intervals (visually)
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
Why didn't Khan get resurrected in the Genesis Explosion?
Does increasing your ability score affect your main stat?
Why the difference in type-inference over the as-pattern in two similar function definitions?
Find non-case sensitive string in a mixed list of elements?
Solving system of ODEs with extra parameter
Would a completely good Muggle be able to use a wand?
Calculate percentile value of raster
The Next CEO of Stack OverflowChange NODATA pixel value in raster to arbitrary valueRemoving pixels in raster map using ArcGIS for Desktop?Numpy raster reclassify outputs only 2 out of 6 classesERROR 000358 When trying to select by attribute using “IS NULL” queryConverting raster to vector from multiple raster values?Calculate mean of raster excluding values in ArcMap?Use Raster Calculator on huge set of rastersTop percentile in zonal statistics - ArcGISConverting string to float in Calculate Value for ModelBuilder?Classifying quantiles in raster dataset with ArcPy?
I want to set null all raster values that fall below the 75th percentile value. E.g. If you classify the raster by quantile method into 4 classes I want to be left with the top 25% percentile. For the raster shown below, 3.154941635 would be used in the set null expression.
I have attempted the following in the Calculate Value tool and a value of 0 is being returned. (source:https://community.esri.com/thread/162022)
arcpy python raster raster-calculator calculate-values
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
I want to set null all raster values that fall below the 75th percentile value. E.g. If you classify the raster by quantile method into 4 classes I want to be left with the top 25% percentile. For the raster shown below, 3.154941635 would be used in the set null expression.
I have attempted the following in the Calculate Value tool and a value of 0 is being returned. (source:https://community.esri.com/thread/162022)
arcpy python raster raster-calculator calculate-values
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49
|
show 2 more comments
I want to set null all raster values that fall below the 75th percentile value. E.g. If you classify the raster by quantile method into 4 classes I want to be left with the top 25% percentile. For the raster shown below, 3.154941635 would be used in the set null expression.
I have attempted the following in the Calculate Value tool and a value of 0 is being returned. (source:https://community.esri.com/thread/162022)
arcpy python raster raster-calculator calculate-values
I want to set null all raster values that fall below the 75th percentile value. E.g. If you classify the raster by quantile method into 4 classes I want to be left with the top 25% percentile. For the raster shown below, 3.154941635 would be used in the set null expression.
I have attempted the following in the Calculate Value tool and a value of 0 is being returned. (source:https://community.esri.com/thread/162022)
arcpy python raster raster-calculator calculate-values
arcpy python raster raster-calculator calculate-values
edited Feb 25 at 15:27
FRMMO
asked Feb 25 at 15:08
FRMMOFRMMO
367
367
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49
|
show 2 more comments
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49
|
show 2 more comments
1 Answer
1
active
oldest
votes
For one raster, try to build your model builder like:
SetNull settings:
Expression for SetNull:
Beware that (reference):
Clicking the Verify button for an SQL query with an inline variable
substitution in Query Builder, for tools such as Make Feature Layer,
Select, and Select Layer By Attribute, will give you an invalid SQL
query error, as the verification does not substitute the value of the
inline variable when evaluating an expression. When the tool runs, the
value of the inline variable is substituted in the expression and the
results are created based on the substituted values.
Finally, as I said, you should use this model as a submodule used as an iterator to another model to run it against all your rasters (https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/integrating-model-within-a-model.htm#ESRI_SECTION1_FC4FA1B8DC0D418098AD21B774804821).
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
|
show 5 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313495%2fcalculate-percentile-value-of-raster%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For one raster, try to build your model builder like:
SetNull settings:
Expression for SetNull:
Beware that (reference):
Clicking the Verify button for an SQL query with an inline variable
substitution in Query Builder, for tools such as Make Feature Layer,
Select, and Select Layer By Attribute, will give you an invalid SQL
query error, as the verification does not substitute the value of the
inline variable when evaluating an expression. When the tool runs, the
value of the inline variable is substituted in the expression and the
results are created based on the substituted values.
Finally, as I said, you should use this model as a submodule used as an iterator to another model to run it against all your rasters (https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/integrating-model-within-a-model.htm#ESRI_SECTION1_FC4FA1B8DC0D418098AD21B774804821).
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
|
show 5 more comments
For one raster, try to build your model builder like:
SetNull settings:
Expression for SetNull:
Beware that (reference):
Clicking the Verify button for an SQL query with an inline variable
substitution in Query Builder, for tools such as Make Feature Layer,
Select, and Select Layer By Attribute, will give you an invalid SQL
query error, as the verification does not substitute the value of the
inline variable when evaluating an expression. When the tool runs, the
value of the inline variable is substituted in the expression and the
results are created based on the substituted values.
Finally, as I said, you should use this model as a submodule used as an iterator to another model to run it against all your rasters (https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/integrating-model-within-a-model.htm#ESRI_SECTION1_FC4FA1B8DC0D418098AD21B774804821).
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
|
show 5 more comments
For one raster, try to build your model builder like:
SetNull settings:
Expression for SetNull:
Beware that (reference):
Clicking the Verify button for an SQL query with an inline variable
substitution in Query Builder, for tools such as Make Feature Layer,
Select, and Select Layer By Attribute, will give you an invalid SQL
query error, as the verification does not substitute the value of the
inline variable when evaluating an expression. When the tool runs, the
value of the inline variable is substituted in the expression and the
results are created based on the substituted values.
Finally, as I said, you should use this model as a submodule used as an iterator to another model to run it against all your rasters (https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/integrating-model-within-a-model.htm#ESRI_SECTION1_FC4FA1B8DC0D418098AD21B774804821).
For one raster, try to build your model builder like:
SetNull settings:
Expression for SetNull:
Beware that (reference):
Clicking the Verify button for an SQL query with an inline variable
substitution in Query Builder, for tools such as Make Feature Layer,
Select, and Select Layer By Attribute, will give you an invalid SQL
query error, as the verification does not substitute the value of the
inline variable when evaluating an expression. When the tool runs, the
value of the inline variable is substituted in the expression and the
results are created based on the substituted values.
Finally, as I said, you should use this model as a submodule used as an iterator to another model to run it against all your rasters (https://desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/integrating-model-within-a-model.htm#ESRI_SECTION1_FC4FA1B8DC0D418098AD21B774804821).
answered Feb 25 at 16:14
umbe1987umbe1987
1,09421130
1,09421130
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
|
show 5 more comments
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
I have no issue with how to set a null value. My issue is calculating the 75% percentile value from the input raster data set.
– FRMMO
Feb 25 at 16:30
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
You said your attempt to running the Calculate Value led to 0 as result. I tried your same expression to calculate the 75% percentile against two different rasters and the result is correct. What is your source raster? Can you give more detail on the input raster you're using?
– umbe1987
Feb 25 at 16:34
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
yes of course, thank you for your help. Floating point, 32 Bit, some rasters have up to 10 decimal places. 1 band WSG 1984.
– FRMMO
Feb 25 at 16:39
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
I bet the problem is that many decimal places. The tool is (lkely) rounding it so you always get 0. Have you tried changing the percentile value to see if the output is different than zero? If this is the problem, you could try multiplying the values of your raster by a certain amount (like times 1000000), and see if that brings you to a different result. You can do that using the Raster Calculator before everything in your model and give the multiplied raster to the Calculate Value tool as input. just a guess, might work...
– umbe1987
Feb 25 at 16:58
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
Values of 0 are returned for percentiles up to the 85th. For the 86th percentile and above a value is returned. Negative values are returned for the 41st percentile and below. One test using the 90th percentile returns a value that's more likely to be the 35th. I have tried a range of raster data sets, integer and decimal. No success
– FRMMO
Feb 26 at 11:33
|
show 5 more comments
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313495%2fcalculate-percentile-value-of-raster%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you attempting to use the Calculate Value tool within Model Builder? If so, please, specify exactly how you are doing it by providing a print of your model.
– umbe1987
Feb 25 at 15:16
Your model is just returining the 75% percentile of your input raster (wathever it is). You should use this value as the input to (e.g.) SetNull tool (I assume you have a Spatial Analyst license at this point).
– umbe1987
Feb 25 at 15:34
I have multiple rasters where the 75% percentile value needs to be used as a cut off. I therefore need to build this part of the tool before I use this value in the set null tool and iterate the entire process. The calculate value tool is returning 0....not the value I am expecting.
– FRMMO
Feb 25 at 15:37
If I understand correctly, you need to calculate the 75% percentile of many rasters and for each set all the cells that are lower than this percentile to null, is that correct? If this is correct and you wanna stick to Model Builder rather than using Python scripts, you should do what I said and integrate the final model as an iterator submodel to another model (like explained here). Hope it helps.
– umbe1987
Feb 25 at 15:44
Anyway, I think your main problem is that you have "attempted the following in the Calculate Value tool and a value of 0 is being returned.". What is your source raster?
– umbe1987
Feb 25 at 15:49