Select to view content in your preferred language

How can I keep lines from bending?

440
0
10-22-2024 02:58 AM
AmirBar-Maor
Esri Regular Contributor
5 0 440

The previous blog shows how you can keep a line as fixed, while still being able to add vertices to it.

But can you use attribute rules to prevent lines from bending?

The answer is yes. 

The Arcade method Generalize removes vertices within a giving tolerance. So we can compare the geometry of the feature to the generalized geometry to find out if they are different.

In this example, lines are allowed to bend up to 1 meter, but you can change that to your desired tolerance.

 This is the Arcade expression:

var MaxOffset = 1;
Var OffsetUnit = 'meters';
if (Equals(Geometry($feature), Generalize($feature, 1, true, 'meters'))) { return false; } 
return true;

 

Simply create a constraint rule and set it to be triggered on 'update'.

If you are using ArcGIS Pro 3.4 or above, only trigger it when the shape is updated:

AmirBarMaor_0-1729590924403.png

Disclaimer: This example  is the first draft that has not been thoroughly tested. You can add the logic to only constraint the update for specific lines, else you'll not be able to align any parcel to each other.

Please leave comments if this is useful, thoughts etc.

Amir

 

 

Contributors
About the Author
Product Engineer @ Esri. working on Parcel Fabric and ArcGIS Pro Tasks. Education: M.Sc. Geodetic Engineering, Licensed Land Surveyor, Licensed Real Estate Appraiser, System Designer, Project Manager... Free time: family, sailing, wing foiling, windsurfing, kitesurfing, diving, hiking.