Add raster data to vector data in one attribute table

1804
5
Jump to solution
04-28-2022 01:42 AM
Vicky
by
New Contributor

Hi, I am new to GIS and have trouble combining the data from a raster layer with the data from a vector data layer. I want to have one attribute table with all the vector and raster data in it.

For the raster layer, I tried to create an attribute table through two functions 1) convert Float to Integer using Int, 2) Build Raster Attribute Table. After the functions ran successfully, the attribute table option of the raster layer is still unavailable. (I also tried to use Copy Raster before Build Raster Attribute Table)

Does anyone know how to do this? Thanks!

0 Kudos
1 Solution

Accepted Solutions
MervynLotter
Occasional Contributor III

I seem to recall struggling with this some time back. You have followed the correct process, but once you have built your attribute table, remove the raster from your project then add it in again. I don't think you need to restart Pro but consider that if your attribute table does not show. 

View solution in original post

5 Replies
MervynLotter
Occasional Contributor III

I seem to recall struggling with this some time back. You have followed the correct process, but once you have built your attribute table, remove the raster from your project then add it in again. I don't think you need to restart Pro but consider that if your attribute table does not show. 

Vicky
by
New Contributor

Thank you so much, Mervyn! You saved me! 🙂 I exported the layer as a new TIFF. I found the new one does have an attribute table!

Do you have any advice on what function I could use to combine this table with another table in a vector layer?

0 Kudos
MervynLotter
Occasional Contributor III

Hi Vicky

 

Can you be more explicit about what you want to achieve? I would need a lot more information to understand your datasets and how you want to combine them, because straight off I dont think it is easily possible. Perhaps there may be some work-arounds.

0 Kudos
Vicky
by
New Contributor

Hi Mervyn, I have a raster layer and a vector layer. I need to add the value of the raster into the attribute table of the vector. For example, the radiation data in a raster and the buildings data in a vector, I want to know how much radiation each building receives.

I used Zonal Statistics as Table to calculate the sum of the radiation in each vector area (each building). So it generated a table with the sum value and an index column from the vector. And then I used Join to combine the data in the Table to the attribute table of the vector, using the index column.

I am not sure if this is how it should be done. I haven't validated the result.

0 Kudos
MervynLotter
Occasional Contributor III

Hi Vicky

I do a lot of these kinds of analyses. Once again you are using the right set of tools. Just make sure you use the correct input field when running Zonal Statistics as a Table. Click on validate and it will warn you if any buildings have no data in corresponding solar radiation table. You used the index field which is perfect. You also used the sum option which sounds right for adding up the watt hours per square meter. Then I would also run the Join Field tool tool using teh index field. 

But it is always good to validate your output by adding in the original radiation surface and then zooming into a small building and confirming that the output seems reasonable for that building (within range).

 

0 Kudos