Select to view content in your preferred language

Just started using ArcMap - is this kind of analysis possible?

6588
43
Jump to solution
06-24-2015 10:03 AM
ElioD_Aversa
Deactivated User

I have 2 files, a shapefile (.shp) and a raster file (.tif). The .tif is merely 2 bands (0 and 1) where 0 represents no forest loss and 1 represents forest loss (file is from here: http://earthenginepartners.appspot.com/science-2013-global-forest/download_v1.1.html) The .shp consists of polygons that represent protected areas (file is from here: http://www.protectedplanet.net/).

What I'd like to do is try a statistical analysis that would simply tell me how much forest loss ("1" points in the .tif) lies within the protected areas and how much loss lies outside the protected areas (in the .shp).

I'm wondering if it's possible to do this in arcmap/arcgis and if so how would I do this?

Sorry if this seems like a stupid question, I haven't been using the software for long and I couldn't find anything online.

0 Kudos
43 Replies
ElioD_Aversa
Deactivated User

So the last thing would then be to do the same for outside the existing polygon. What do you think would be the best method for covering this area, same process but create a polygon for the unprotected area? What's a good way of doing this? Hopefully the whole process will be repeatable for the other areas around the globe.

If I get this to work later I will post my results

0 Kudos
SepheFox
Deactivated User

So this is where you're going to have to define your area of analysis. A watershed or catchment basin perhaps? Maybe a region of some kind? Get a shapefile for the region, and then run an Identity, using the region as the input, and the protected areas as the identity. This will combine them. You might have to do a dissolve at this point to get just two polygons-inside and outside of protected areas. Then run the same process. This time the tabulate will have two rows--one for each polygon.

0 Kudos
ElioD_Aversa
Deactivated User

Ok I really didn't get enough sleep last night but I'll try my best here (might have to come back to this later).

A watershed or catchment basin perhaps? Maybe a region of some kind?

I'd be more interested in covering wider areas of (forested) land, avoiding water as looking at loss over water might skew the results. This is something I need to think about especially if I want to look at more than just the amazon. Is there a tool that simply fills in the empty space with a polygon?

Get a shapefile for the region

Where's a good place to get this?

run an Identity, using the region as the input, and the protected areas as the identity. This will combine them.

This sounds simple but I haven't done it before, I may need your help with this.

You might have to do a dissolve at this point to get just two polygons-inside and outside of protected areas. Then run the same process. This time the tabulate will have two rows--one for each polygon.

Ok you lost me here When I'm back at my PC I'll take a look at this tool. If there's any chance of getting a step-by-step walk through that would be really appreciated and should sort me out!

0 Kudos
SepheFox
Deactivated User

A watershed is just a name for the area that flows to the same point. The Amazon Basin is a watershed, for example. The point is, you need to define your analysis area to some kind of border. Think about it. A country? A county? A state? Some other region? This is critical to your analysis. Otherwise, how will you report your results? "i did an analysis for a nameless rectangle of the earth". It has to be your first step. When you decide, you can search online, or someone here can help you find the data. Once you get a polygon that defines your analysis area, you will need to combine it with your protected areas. The Identity tool in the Analysis toolset will do this. You might just have to do some merging or dissolving so that you end up with only two polygons--one will be the protected area in the region, and the other will be all the unprotected area in the region. Now get some sleep and read this whole thread again in the morning.

ElioD_Aversa
Deactivated User

Ok I see, depending on how things go I'll either do it by country or region such as the amazon basin like you mentioned. You're right this is something I need to establish. I will try to explain my plan in more detail once I've gone through all this in arcmap and know what I can do with the data.  Unfortunately it already is morning for me, but I promise I will reread all of this when I am rested Thanks again!

0 Kudos
ElioD_Aversa
Deactivated User

Sephe Fox:

Get a shapefile for the region, and then run an Identity, using the region as the input, and the protected areas as the identity. This will combine them. You might have to do a dissolve at this point to get just two polygons-inside and outside of protected areas. Then run the same process. This time the tabulate will have two rows--one for each polygon.

It worked! I can't believe it. after all these steps it actually worked. I've done it using peculiar areas that don't mean anything because I was testing so I won't post my data yet, but the process works.

As a TL;DR for anyone else interested the process is:

1. Resample (tool) the raster to a manageable size/scale i.e. X+Y values 0.001 and technique as NEAREST.

2. If you need multiple rasters to cover the area of interest use Mosaic to New Raster tool, leave all the optional boxes blank and number of bands should be 1.

3. Project your raster (Project Raster tool) to a system that uses a unit that lets you work out the areas further down the line so meters for example. I think any system that has equal area in the title will do this just make sure it's the correct region for the data.

4. Merge all the protected areas you want to use (for example only designated areas) into one big one that covers your area of interest.

5. Also might be easier to make sure the basemap shapefile for the terrestrial area you're interested is one polygon too.

6. Use the Identity tool and set your basemap shapefile/region as input and the protected area shapefile as identity.

7. This may result in a shapefile with more than 2 polygons, at this point either use the Dissolve tool to merge everything into 2 layers via a field with only 2 different values that correspond to protected and not protected. Or use the editor to manually merge the many polygons into just 2 polygons, make sure you don't mix any up though.

8. Run the Tabulate Area tool with 1st input as the shapefile and 2nd input as the raster. Zone as FID. Class as value. Processing cell size as default. This should give you a table with 2 rows, unprotected and protected areas, for value 0 (i.e no loss) and value 1 (i.e. loss).

I think this is pretty much correct, please let me know if anything is wrong, doesn't make sense or doesn't work.

Thank you Sephe for all your help I wouldn't have gotten this far if it wasn't for you so thanks again for taking the time to help me out.

ElioD_Aversa
Deactivated User

Hi again sorry for the delay in updating this I've been busy! I've finally given this a go myself and it works really well

For the Resample of the raster I tried different resampling techniques and NEAREST actually gives the closest output to the original when looking at the VALUE_0 and VALUE_1 results from Tabulate Area (I ran a tabulate area for the original raster - it took close to an hour though so I don't recommend it). Resampling the original raster to 0.001 X+Y and NEAREST Resampling Technique cut the whole process down to under 5 minutes and the results were within ~0.02% of the original! Happy days.

I've just downloaded the shapefile for Brazil from here: Download | Global Administrative Areas  and it seems to be good enough. Re the previous question I will try to do my analysis by country. To make my life easier I'd like to stitch together several (resampled of course) rasters together to cover the whole of Brazil and then run the analysis instead of doing the process for each raster separately. Do you recommend a particular method for stitching together rasters in this scenario? I was thinking of trying Mosaic to New Raster.

0 Kudos
ElioD_Aversa
Deactivated User

FYI it took 20 minutes to run zonal statistics (I'm trying it again) for the 10x10 deg raster and the shp i uploaded.

0 Kudos
SepheFox
Deactivated User

Yeah, Darren was right (he usually is ), zonal statistics won't give you what your looking for in this case.

0 Kudos
ElioD_Aversa
Deactivated User

Hi Darren, this method seems like it could work for me but it appears to get stuck on "executing tabulated area..." when I run the tabulate area tool (I gave it at least 30 mins but no change). Perhaps the files I'm using are too big? I did select and create a new shapefile of the area I needed from the original shapefile (as it's 2GB+). The shapefile ends up being about 20mb and the tif is about 40mb. I have a quadcore PC, do you think I just need to give it more time? Or I might be setting it up wrong. I'm just trying to find out how many points lie within protected areas and how many lie outside the protected areas.

0 Kudos