My question is similar to Performing multiple layer intersection in QGIS?
However, there are a few differences. I have run a test analysis on a dummy data set and cannot replicate the result with my real larger data set.
I have a list of environmental features that are potentially at risk (streams, fish, amphibians, red listed species, ungulate winter range, etc) that I have merged into a single omnibus layer. I have another polygon study area that consists of the threat (roads and storm water outlets - high salt application area). My goal is to study the intersection between the at-risk-layer and the threat-layer and to obtain a count of the number of at-risk-features that intersect with the threat. In the dummy example everything works just fine (see figure above). The next image is from my real data set.
This looks more complicated. The brownish layer is the merged polygon of streams, wellsites, amphibians, fish in streams, agricultural lands, ungulate winter range, etc... The light grey layer is the study area (roads and stormwater outfalls). The RskCnt field is a sum of all the fields with string data attached. I created multiple fields by running the following:
CASE WHEN "ALR" LIKE '%' THEN 1 ELSE 0 END
Then I added all the fields to get the count:
WellID_n + GrndH2O_n + redlist_n + bluelist_n + wetland_n + riparian_n + uwr_n + Amphib_n + Hydro_n + Fish_n + ALR_n
However, I know that the counts are wrong. There are places where I should have more than a count of 3, because I can look at the individual layers that were not merged and determine that the count is wrong. The merging is not capturing all the fields. The fields are there, but not all the information is getting passed along.
What could be going wrong here?
The difference is that I didn't merge layers in the dummy case, so that's a clue. There must be something going wrong with the merge...but I can't seem to figure this out.