1

I have five classes of rivers as different rasters. fisrt image

I want to add them all in a new raster file using raster calculator. When I do this, it creates 16 types of classes, while I am expecting seven.

second image.

When the classes are combined in the raster calculator, it creates a new class on the final raster file. I want to create a map with a legend that gives me only the seven classes of each raster file.

What am I doing wrong?

6
  • 2
    You might want to say what steps you are following in raster calculator? Commented Feb 10, 2016 at 13:56
  • No you, not me. What are you doing in raster calculator. It is impossible to answer this question without knowing what you are doing. Commented Feb 10, 2016 at 14:22
  • I want to create a final map that combines all these seperates rasters into one map. These rasters are the 5 classes of hydrographic network of Lesvos island, and i want to link them to create my final map. However, it should have 7 prices on the final map but i have 16. (Sorry for my bad english)
    – vag lag
    Commented Feb 10, 2016 at 14:29
  • @JohnBarça means that you should copy the statement you are using in raster calculator to your question. this way people can help you better.
    – dru87
    Commented Feb 10, 2016 at 14:38
  • In raster calculator: "1classriv_rec" + "2classriv_rec" + "3classriv_rec" + "4classriv_rec" + "5classriv_rec"
    – vag lag
    Commented Feb 10, 2016 at 14:51

1 Answer 1

2

Ok, so the statement you are using in Raster Calculator simply adds up all the cell values in order to create the new raster. Example:

  • Raster 1 = 1, Raster 2 = 2, Raster 3 = 0, Raster 4 = 0 and Raster 5 = 7 the cell value in your new raster becomes 1 + 2 + 0 + 0 + 7 = 10

I would recommend using the Mosaic to new raster tool within the Data Management toolbox. There you can determine, which value the new raster cells should become when put togehter. I guess you want the maximum value of all of those 5 rasters, so you can select the option "MAXIMUM". enter image description here

5
  • when i did this, the result was a map without my 7 criteria of each raster file. I want a map where all my 7 criteria will be combined into one map. When i add the raster files in the raster calculator as i said, it gives me one map like i want it but with 16 criteria instead of 7. That's happening because in some points one raster falls over the other and creates another criterion
    – vag lag
    Commented Feb 10, 2016 at 23:25
  • then i dont understand what you're trying to do exactly. can you give an example what a cell should become if the raster values for rasters 1 to 5 have a certain value (as I did above, but with your desired value in the end)? also, are the values for each raster displayed in your screenshot the only values of each raster or do they contain others?
    – dru87
    Commented Feb 11, 2016 at 7:07
  • ok. number of bands should be one, that's correct. for pixel type, choose whatever your original rasters are (check their properties). do the same for cellsize. have you tried any of the other mosaic operators (see image in my answer)? if you click the field there are explanations on the right, maybe this will help finding the right option? i don't know why it doesn't let you upload another image, have you tried editing your original post?
    – dru87
    Commented Feb 11, 2016 at 12:19
  • Thank you very much. You really save me. Finally, i found it!!
    – vag lag
    Commented Feb 11, 2016 at 12:20
  • you're welcome. make sure to mark the question as solved (by checking the answer) in order for other people to see that the question has been solved. good luck with your project
    – dru87
    Commented Feb 11, 2016 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.