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

Raster Calculator not giving the correct raster from a slope percentage raster #19641

Closed
qgib opened this issue Oct 7, 2014 · 3 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Oct 7, 2014

Author Name: Prime Enrique Rendon (Prime Enrique Rendon)
Original Redmine Issue: 11350
Affected QGIS version: 2.4.0
Redmine category:raster_calculator


i have a srtm_62_11 downloaded from the internet with WGS84 projection. I tried to derived slope raster from the srtm (DEM) as percentage instead of degrees and a z-factor of 113200 to convert degrees in meters (please correct me in this factor) using the Raster>>Analysis>>DEM(Terrain models). i have successfully made the slope raster with 0.607858 and 62.4067 as min and max values (i believe its in percentage. However when i try to use the raster calculator to derived a new raster with slope of less than or equal to 8 ("slope%@1" <= 8 using this expression), i didn't get the correct values. i only get a 0 and .999 as min and max values for the new raster.

Am i doing the right procedure or an error in the process? I'll appreciate your help.thanks

@qgib
Copy link
Contributor Author

qgib commented Nov 9, 2014

Author Name: Nicolas Cadieux (@NicolasCadieux)


I think you are getting 0 and 1. 0 for cells that don't meet the requirements and 1 where the cells do. You then need to multiply that by your slope layer so that the 1 get multiplied by the slope values and the 0 stay zeros...

@qgib
Copy link
Contributor Author

qgib commented Nov 10, 2014

Author Name: Prime Enrique Rendon (Prime Enrique Rendon)


how can i multiple the said values to my slope? but i'm still looking for ways to multiply it. thanks for the reply.

@qgib
Copy link
Contributor Author

qgib commented Jun 9, 2015

Author Name: Nyall Dawson (@nyalldawson)


An expression like:

("slope%@1" <= 8 ) * "slope%@1"

will work


  • resolution was changed from to invalid
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Rasters Related to general raster layer handling (not specific data formats) labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant