Jump to content

 
Photo

Combine raster (.img) with .shp file in ArcGIS 10

- - - - - ArcGIS raster .shp .img merge combine landcover land use

  • Please log in to reply
12 replies to this topic

#1
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

Hi all. Thanks for any response in advance.

My question is this: I have a raster image that details land use data for a state (Ohio). I also have a shapefile of all Ohio counties. I want to be able to export a table that has the raster values for each county listed (IE I want to know how much land is covered by forest in Defiance County, Ohio). Basically, I need to query every county in the state and want to know if their is a way to do this quickly. I've attached a ZIP file with 2 pictures and a layer file that contains the raster data and shapefile I am working with.

I would consider myself an advanced-beginner with ArcGIS, so forgive any naivety on my part. 

Thanks for any and all help!

Attached Files



#2
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,301 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Assuming you have ArcInfo license level + spatial analyst:

  • Make sure that each county has a numerical id
  • Rasterize the county layer, to a new raster, with the same extent and cellsize as the land use data, and with the numerical id as grid value
  • Then run the Combine function, combining land use and land use
  • export the .vat table for the combined layer to e.g. dbf or csv that you can use in a spreadsheet program

Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#3
AndrewM

AndrewM

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • United Kingdom

I think you could also do what you want with the 'zonal statistics as table' tool which comes under 'zonal' in the spatial analyst toolbox. I think it will give you a similar output to the method Frax suggested but should work with a standard ArcMap license (plus spatial analyst) rather than needing an ArcInfo license.



#4
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

Thanks for the response guys! I will try it out later this afternoon and get back to you. Also, yes I am working with ArcGIS 10 and have access to the spatial analyst tool.

 

AndrewM, I tried the "zonal statistics as table" before and it just kept hitting an error and closed. Not sure why...



#5
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

frax,

 

After setting the extent and cell size the same as my landuse raster, how would I go about setting the grid value as numerical id for counties?

 

The numerical ID that is included in the .shp file is the CNTY_FIPS, is the one that I am using. Is this correct?

 

Also, the zonal histogram/table/tabulate area stuff just does not work at all. Every time I try to use them, ArcMap crashes.

 

Thank you very much for your help guys!



#6
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,301 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

rob, run the polygon to raster tool, and a parameter to the tool is what attribute to use for grid value.


Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#7
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,301 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Oh, by the way - if you get crashes, that is an indication that the data is dirty...


Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#8
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

Thanks for the reply frax.

 

The data that I am using is from the USDA so I doubt their are things wrong with it but you never know I guess. The combine tool is just not the tool to use. I have tried many many variations with this tool all to no avail. Here is a link to what the people on ESRI's forum are saying, but still not working: 

 

http://forums.arcgis...4984#post274984

 

If you read my replies in the above link, you will see that I got the histogram tool to work and that I got some kind of table out of it, with numbers associated with the counties, but I do not know what they mean. 

 

Again, forgive my innocent views, but I just don't understand why you can't "easily" define boundaries for raster analysis. You think this would be a simple task because I would imagine this is a common occurrence. 



#9
AndrewM

AndrewM

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • United Kingdom

Again, forgive my innocent views, but I just don't understand why you can't "easily" define boundaries for raster analysis. You think this would be a simple task because I would imagine this is a common occurrence. 

 

Hi Rob,

 

I think this is because the zonal statistics tool does the job you want, but I'm not sure why it would be crashing with your data. Could you post the error message here so we can see if it sheds any light on the situation? Do you get the same error if you just use the zonal statistics tool (not as a table)? If I remember rightly that will add the statistics to the shapefile attributes and you could then open the .dbf portion of the shapefile in excel and get essentially the same result.

 

Sorry not to be of more help,

Andrew



#10
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

Thanks,

 

Here is what another person said on another forum (link posted in previous reply):

 

"1. Use the Unique Value renderer on the landuse raster.

2. On the symbology tab, set the value field to the landuse description field like in screenshot-3. My description field just happens to be called Landuse.
3. Run Zonal Histogram."

 

So after playing around, I noticed if I change the symbology value field from "Class_Name" to "Value", Zonal histogram will output the labels column into the table (attached), but they still do not mean anything to me. If I try it with the "Class_Name" instead, I get the following message:


"Background processing has encountered a serious error and is unable to continue."

 

Also, attached is a screen capture of what I am doing with the Zonal Histogram tool, the raster table and symbology, and the resulting table.

 

Thank you all for your help...I'm sure I will figure this out eventually...

Attached Files



#11
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

Figured it out.

 

1) Go to Data Management->Raster->Raster Properties->Build Raster Attribute Table

2) Add raster to a personal geodatabase (this seemed to be the most important part that side stepped all of the errors i kept getting)

3) Follow the First three steps in the previous post.

 

Also, if anyone cares to actually access the files I was working with (seeing as how no one bothered to tell me the first attachment didn't work -_-), can go here: 

 

https://docs.google....dit?usp=sharing

 

Anyone having the same issues should look at my post at on ESRI (link in previous posts here) as it describes it much better that I have here.

 

Hope this helps other people! :)



#12
AndrewM

AndrewM

    Contributor

  • Validated Member
  • PipPip
  • 27 posts
  • United Kingdom

Glad you managed to figure this out in the end - thanks for sharing your solution!  :)



#13
rob_ford16

rob_ford16

    Contributor

  • Validated Member
  • PipPip
  • 10 posts
  • Gender:Male
  • United States

No problem. Attached is a step by step guide I created just for this problem. Hope it helps everyone else!

Attached Files







Also tagged with one or more of these keywords: ArcGIS, raster, .shp, .img, merge, combine, landcover, land use

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->