3

I'm using QGIS 3.28 on Windows. I'm trying to make a workflow for determining whether a proposed lot satisfies minimum lot sizing based on soil type composition.

I have:

  • a single-polygon overall parcel boundary layer,
  • 'soil type' layer with multiple polygon features, and
  • a 'proposed lot' layer, which is either just a series of lines representing divisions of the main parcel, or several individual polygons, depending on whichever works better for what I'm trying to do.

Each soil type has an associated 'minimum lot size' value. If soil type 'a' has a minimum lot size of 10,000 sq ft, and there are 9,000 sq ft of that soil type in any given lot, then that soil type 'a' area would contribute 90% to the lot being valid.

For that lot to become valid (total score of 100% or above), some or all of the remaining area has to be at least 10% of the 'minimum lot size' value for another soil type (e.g. 2,000 sq ft of soil type 'b', which has a 'minimum lot size' of 20,000 sq ft).

I've already figured out how to sum each soil type's contribution for a given lot configuration, but I'd like to make it easier to change the proposed lot lines around and quickly/automatically see whether or not the resulting lots meet the minimum size requirements. Ideally at a glance.

Here's my current workflow:

  1. create polygons on the 'proposed lot' layer that do not overlap eachother and, together, share all the same vertices as the overall parcel. This layer has a "lot_num" field.
  2. use "split with lines" to create a split layer with the 'soil type boundaries' layer as the input, and the 'proposed lot' layer as the overlay. However, I can't figure out how to add the 'lot_num' field to the new split layer - ideally i'd be able to append the overlying lot number to each split soil type polygon.
  3. select all the polygons on the 'split soil type' layer that falls within a given lot on the 'proposed lots' layer, and then tally up the combined scores for their areas and see if they add up to at least 100% of the minimum lot size.
  4. make a new 'proposed lots' layer with a new lot configuration, and repeat steps 2 & 3.

What I'd love to be able to do is avoid step 2, and just change the dimensions of the polygons on the 'proposed lot' layer and see at a glance, maybe with just a label, whether the underlaying soil areas add up to 100% of the minimum lot size.

4
  • Just to clarify what your requirements are, say with soil type 'a', do you mean there are 9,000 sq ft of that soil type across the entire parcel, and therefore 90% of each lot must consist of soil type 'a' — so a lot that is 1,000 sq ft must have 900 sq ft of soil type 'a'?
    – she_weeds
    Commented Jan 27 at 13:00
  • 1
    Sorry I was unclear - the lots don't need any particular soil type, but for each soil type there is a corresponding minimum lot size. So, if you owned land that was 100% soil type 'a', and the min lot size of 'a' is 10,000 sq ft, you would have to have at least 10,000 square feet for 1 legal lot, or 20,000 sq ft for 2 lots, etc. if you have a 10,000 sq. ft. lot that was 50/50 between 'a' and 'b',and 'b' had a min lot size of 20,000 sq ft, then you'd have less than the required total area (5,000 sq ft 'a' / 10,000 sq ft min area=50%) + (5,000 sq ft 'b' / 20,000 sq ft min =25%) = only 75%
    – dsjeffery
    Commented Jan 27 at 13:31
  • Thanks for the clarification! By that token, I assume it is possible for a lot to have more than 100% of the total area (e.g. a 20,000 sq ft lot is 50/50 between 'a' and 'b' as just defined -- i.e. 100% contribution from 'a' and 50% contribution from 'b' for a total of 150%)
    – she_weeds
    Commented Jan 27 at 14:30
  • 1
    That's right. At least in the state where I work, for the purposes of a new subdivision, you have to prove that the proposed lot can support a septic system if not served by sewer, and handle runoff and drainage from pavement and roofing etc. so you just need to show that the lot has a minimum amount of qualifying soil by area. It's not uncommon for a larger lot with no wetlands to have 400% or 500% of the necessary soil.
    – dsjeffery
    Commented Jan 28 at 1:03

1 Answer 1

6

You could use this expression in a virtual field, or directly in a label, on your lot layer, in order to see the proportions update in real time.

Replace the 'soil_layer_name' portion with the name of your soil layer, and 'min_lot_size' with the relevant field name in your soil layer that specifies the "minimum lot size" as described in your question.

format_number(
    array_sum(
        with_variable('soilvar',
                      'soil_layer_name', -- replace with your soil layer name
                      array_foreach(
                          overlay_intersects(@soilvar,$id),
                          area(intersection(
                              geometry(get_feature_by_id(@soilvar,@element)),
                              $geometry)) 
                          / attribute(get_feature_by_id(@soilvar,@element),
                                      'min_lot_size') -- replace with your field name
                         *100)
                      )
              )
          ,1)

This gets an array of the soil polygons that intersect each lot polygon using overlay_intersects(), and for each of those soil polygons, using array_foreach() to iterate, it calculates the area that intersects the lot polygon (using area() and intersection()) as a percentage (%) of the minimum size area. Then it sums the total of all these percentages and formats the number to 1 decimal place.

When changing the vertices of your lot layer, to make sure they do not overlap with each other, be sure to activate 'Enable Topological Editing' in the snapping toolbar as highlighted in red below:

enter image description here

However, it might be slow to load with large numbers of features or over very large areas.


Here is an example, where the expression above is used in the totals label, and the composite percentages are shown in a separate label.

The composite percentage label uses a similar expression as above, but replaces array_sum() with array_to_string(), and in the array_foreach() expression, concatenates on the soil type name field before area(....

enter image description here

1
  • Amazing, what an incredible response! It's going to be awhile before I can digest that and try it but seems like it's do the trick. Thank you!
    – dsjeffery
    Commented Jan 27 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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