3

Apologies if this has been answered elsewhere. I have tried for several days now to come up with a solution to this problem, but haven't found an exact answer that applies to my current situation (or at least one that I could understand enough to implement myself).

I am trying to extract the percent of particular drainage areas that are covered by different surficial geologies (i.e. sand, silt, bedrock, etc.). I have shape files for almost 100 catchment areas (some overlap each other due to being sub-watersheds of larger river systems). I also have a shape file of surficial geology.

Below are some images to help illustrate: The first is what the catchment areas look like. The second is the geology layer with 3 catchments displayed over top (note the nestedness).Finally, I am looking to produce a table of percentages with catchments against geological features.

This is what the catchment areas look like

This is the geology layer with 3 catchments displayed over top

Basically, I am looking to produce a table with catchment areas against geological features:

Right now I am only using QGIS, but am open to trying other programs as well. I have used R in the past, but am not very good at python.

EDIT: the result of using union on the geology and catchment layers:

enter image description here

2

On the face of it this looks like a pretty simple Overlay problem that could be solved with Union. But the devil is in the details and it's going to take a little extra statistics work to end up with the desired result. I would start by adding a Basin Total Area field to your drainage layer and field calculating that. You're going to need the totals to get percentages later, and having it as a static attribute to calculate on would be helpful.

I'm going to assume your surface geologies don't overlap, just the basins. The simplest form would be to split your basins into two (or more - how many sub-catchement levels are there?) files so you don't have any overlap, but that isn't required. It may take a little experimentation with QGIS's Union tool to make sure you're getting the correct results and following the attribute table changes, and this can be done in one or two steps. If you union basins to itself, you should eliminate overlaps while keeping attributes of both. If you union basins and geologies, the same will happen but I'm not sure exactly how it's going to handle stacked geometries in one layer combined with a 'third' geometry from another.

What you should end up with when all unioning is said and done is a set of non-overlapping polygons that has all the attributes from every parent polygon. This is where you need to be careful and do a data check though. I note from the image that coverage doesn't match. This means that there are slivers of basins that have no geologic data because the boundaries don't quite line up. That means you're going to have a percent category of 'unknown' in your final table. This is also why you can't use Intersect (as that only keeps areas common to both layers). And speaking of slivers, since the boundaries don't match you may end up with a lot of polygons resulting from union if there are boundaries that cross back and forth a lot. This could cause a performance impact and is one reason why simplifying overlaps up front may help.

From there you have to add a percent attribute field and then use field calculator to divide whatever the polygon's area is by the earlier basin totals you came up with (note that may be more than one total). Then you'll need to flatten that down to a summary table, since you may have disconnected areas of the same geology in the same basin. I think the Group Stats plugin might be of assistance there, if not exporting the attribute table to Excel or something to work with it there.

Unfortunately I don't know the QGIS specific tools that well, as I'm used to working in ArcGIS (where I'd be using Identity and Summary Statistics for this problem rather than Union, though Union would still be an option). I can add more detail about an ArcGIS solution if you have that available.

  • Thank you Chris. You are correct in that the geology layer does not overlap. The ultimate goal of this work is to relate catchment scale processes to in-stream biotic indices. Each of these catchments was created based on a sampling site for which I have several years of biotic data. Unfortunately, not every sub-catchment was sampled, and occasionally, multiple sampling locations exist along higher order streams. So I dont really know a good way of splitting the data up into none overlapping catchments, though I do have individual shape files for each. – Pat Oct 29 '14 at 20:01
  • I was able to union the catchment layer with the geology layer, but it resulted in some gaps, that I dont understand. I have edited the original post with a picture. – Pat Oct 29 '14 at 20:05
  • @Pat If each catchment is its own shapefile, they're already split up and you could Union them one at a time against the geology (slow, but very simple to get percent geology for each basin). I wasn't paying attention - by overlapping I meant two polygons in the same file. As for your Union results, I would suggest running a geometry checker as a first step. I've seen that weird dropped polygons thing before at this question. – Chris W Oct 30 '14 at 17:40

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.