Selecting pixels in one raster based on their distance as a function of their height from pixels in a second raster

5379
3
04-14-2015 05:09 AM
Labels (2)
LisaRedmond1
New Contributor II

We are working on a project that is looking at potential crossing points for Squirrel Gliders between patches of trees on either side of a freeway. We have mapped vegetation over aerial photos and the formula for potential flight distances we will use is "x"=1.8 x tree height. I have a digital elevation model of the tree heights that I can use. What I would like to do is have one raster (Raster A) on one side of the road that has values 0 (no landing potential) and 1 (1 being acceptable landing locations), the second raster (Raster B) on the other side of the freeway will have values 0 (no takeoff veg) and where there is acceptable takeoff vegetation the value of each pixel will be a height value of the tree canopy of that pixel.

The result I would like to try and achieve is to create a new output raster (Raster C) showing just where: pixels from Raster B are identified that are within a distance of 1.8 times by their value (height) from any pixel with a value of 1 in Raster A.

I am new to this forum and I dont expect anyone to do all the work for me but I just want to try not to waste my departments time and money if I am going the wrong way about approaching this problem. I am sure there are other ways approach this also.. I dont have experience with python or model builder but If someone can assure me that what I want to do can be done and direct me to how to go about starting on it and what sort of tool/script to use to work on it I would be very thankful.

3 Replies
GabrielUpchurch1
Occasional Contributor III

Hi Lisa,

Here is an (untested) idea.  It is a one-way analysis so if you want to consider travel in both directions, you will need to reverse and repeat for the other side of the road.

1. Create a single raster dataset that covers your entire area of interest (AOI = both sides of road).  This dataset should only contain values of 1 for acceptable landing locations.  All other cells in the AOI should be NoData.  Let’s call this dataset Landing.

2. Run Landing through the Euclidean Distance tool in the Spatial Analyst ‘Distance’ toolset:  Euclidean Distance—Help | ArcGIS for Desktop .  This tool will calculate distances from all NoData cells to the nearest landing location.  The output dataset, let’s call it Distance, will contain cell values of 0 for all landing locations and actual distance values for all the original NoData cells.

3. Create a single raster dataset that covers your entire AOI that contains height values for all takeoff locations and 0 values for all other cells.  Let’s call this dataset Takeoff.

4. Now multiply the Distance dataset by the Takeoff dataset.  You can use the Times tool (Spatial Analyst ‘Math’ toolset) or Raster Calculator (Spatial Analyst ‘Map Algebra’ toolset).  This dataset will give you the actual distance to height relationship between the takeoff and landing locations.  Let’s call it Actual_D2H.

5. Create a single raster dataset that covers your entire AOI that contains the comparison distance to height relationship (1.8 x tree height).  You can do this by multiplying the Takeoff dataset by 1.8.  Once again you can use the Times tool or Raster Calculator to create this dataset.  Let’s call it Comparison_D2H.

6. Finally, you can use a Conditional statement in Raster Calculator to change all values in Actual_D2H to 0 (or NoData) that have a value greater than the acceptable distance value in Comparison_D2H.  This will leave you with only cell values that contain distances less than 1.8 times the takeoff locations height.  Conditional Statements help:  Conditional evaluation with Con—Help | ArcGIS for Desktop

This is just a rough idea and there are many details that would need to be worked out but I think it may help get you where you need to go.  Let me know if you have any questions or need further explanation on any of the steps.

LisaRedmond1
New Contributor II

Thanks Gabriel,

That sounds like a great suggestion and yes I was thinking however I did it would have to be one way and then flip the scenario. Overnight I thought about it and also came up with a sneaky alternative – by converting my potential takeoff gridcells to points with a table value of their height. Then doing a find nearest polygon distance (suitable landing layer)and the table would be populated with that distance. Then just use calculator to populate another field with the 1.8 x height and then just have a fourth field showing which points have a flight formula value greater than their distance to nearest landing polygon. Again a one way analysis. Fantastic to know I have a couple of options to play with and now to just edit and fine tune my data before running it all.

Thanks again for taking the time to help me. It is very much appreciated.

Lisa Redmond

0 Kudos
GabrielUpchurch1
Occasional Contributor III

I considered your vector-based idea as well and that is what I would have suggested had you responded that you did not have access to Spatial Analyst.  It will definitely meet your needs and is less complicated (and therefore faster as well).  My preference is towards raster analysis and modeling when it is a possible because it offers considerably more spatial analysis possibilities and allows for more creativity and flexibility than vector data.  Something to consider, I try to avoid converting between raster and vector data unless absolutely necessary due to the potential to introduce inaccuracies into your data.  If you might do further spatial analysis beyond just obtaining suitable takeoff sites then I would give some advance consideration to the possible need for any data conversions that would be necessary.  With attention to detail, the right settings and some QA/QC, you can definitely convert between raster and vector data successfully.  I just want to throw that out there because I often see users converting back and forth all willy-nilly with little thought for the processes they are undertaking.

Best of luck to you!