0

Our State Government is adjusting the property boundaries across our state to improve accuracy and I am preparing to adjust other datasets that will be affected i.e. shire assets/feature classes that align with property boundaries. I have the new parcel data that will be used. Assets such as pits will in some cases end up on the neighbouring property as a result of this adjustment. Is there a way in QGIS to identify if the new parcel boundary is on the opposite side of the point feature when compared to the current parcel boundary?

For the current and adjusted parcels I have converted the polygons to lines and used Align Points to Features to get the rotation of the pit to the line, then joined the two outputs and subtracted the two rotation values in the hope to get anything greater than 90 degrees, but many are negative values which don't help.

1

1 Answer 1

1

You will likely have a much easier time using the original polygons, rather than converting to lines and trying to come up with a robust algorithm concerning angles etc.

Here is an implementation of @BERA's comment using an expression. Rather than using the Join attributes by location tool, the overlay_within function was used to calculate a field named status.

-- get the name of the polygon that the point is within from the first polygon layer and save it to a variable 
-- (replace 'polygons' with your layer name and "name" with the field containing a unique identifier (code, or name etc))
with_variable('original', overlay_within('polygons', "name")[0],

-- get the name of the polygon that the point is within from the second polygon layer 
-- (replace 'polygons updated' with your second layer name and "name" with the field containing a unique identifier (code, or name etc))
with_variable(
    'current',  
    -- here null values are replaced with an empty string, else the != comparison operator does not work properly 
    -- (if your unique identifier is a number rather than a string, use 0 instead of '')
    if(
        overlay_within('polygons_updated', "name")[0], 
        overlay_within('polygons_updated', "name")[0], 
        '' 
    ),

    -- calculate the status
    case
        when @original != @current
        then 'moved outside'
        else 'stayed within'
    end

))

enter image description here

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.