I have 4 Shapefiles which basicly have 7 important fields and are basicly looking like:

| Name | Connection 1 | Con 2  | Con 3  | Con 4 | Con 5  | Value |
|Tab1_A|    Tab2_A    | Tab2_B | Tab3_F | -     | Tab4_x |  10   |

So the first collumn contains the name of the polygon, the 2nd to 6th collumn contain Connections this polygon has with polygons from the other Shape-Files and the last collumn contains a value.

My Task is, to create a Raster, which contains the maximum sum of all values from conntected shapes in one cell.

My current approach is:

  1. Convert the 4 Shapes into 7 Rasters each (one per collumn)
  2. 4 Raster Calculator: Tab1: Value + If(Con1 == Tab2.Name;Tab2.Value;0)+...
  3. Another Raster Calc: MAX(Raster1,...,Raster4)

My Problem is, that I cannot compare the Name-Raster and the Connection-Rasters, because the Name is not the Raster-Value, but an Attribute.

Is there any way to compare an attribute in the Raster Calculator, or do you have a better idea, how to solve this problem?

  • Join 2nd using 2nd field and total 2 values. Repeat 5 more times and convert to raster. – FelixIP Feb 19 '19 at 18:32

Try merging all the shapefiles into one shapefile that contains all the fields. Then add a new field where the value is the sum of the connections from the 35 (5 connections x 7 shapefiles) connection fields. Then go vector to raster with the raster value being the newly created field.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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