Update geometry after edit in real time — via Arcade?

556
2
Jump to solution
02-23-2022 05:31 PM
Labels (1)
Bud
by
Notable Contributor

Using Arcade:

Is there a way to update the geometry of an existing feature after an edit is made?

It would be the equivalent of a DB trigger, but using logic similar to the Python field calculator script below:

#written for ArcMap (https://gis.stackexchange.com/q/423806/62572)
def
new_shape(geom): spatial_reference = geom.spatialReference geom = geom.densify("ANGLE", 10000, 0.174533) parts = arcpy.Array() for i in range(geom.partCount): part = geom.getPart(i) points = arcpy.Array() for j in range(part.count): point = part.getObject(j) point.M = geom.measureOnLine(point) points.append(point) parts.append(points) return arcpy.Polyline(parts, spatial_reference)


I suspect that's not possible, but just wanted to check to be sure.

I'm having a hard time finding a solution — something that will be executed in real time after a feature is edited. There doesn't seem to be a way to do that. Even the SDE.ST_GEOMETRY functions (for an Oracle db trigger) are too limited.

 

0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

Attribute Rules can do stuff like that.

Introduction to attribute rules—ArcGIS Pro | Documentation


Have a great day!
Johannes

View solution in original post

2 Replies
JohannesLindner
MVP Frequent Contributor

Attribute Rules can do stuff like that.

Introduction to attribute rules—ArcGIS Pro | Documentation


Have a great day!
Johannes
Bud
by
Notable Contributor

Good call. When reading the docs for Arcade, I came across this line:

"Geometry is immutable, meaning it is not possible to change the geometry after it is created."
https://developers.arcgis.com/arcade/guide/types/#geometry

So I figured Attribute Rules wouldn't be an option. But I think I must have misunderstood.

Related info here: Idea: Easy way to update geometry in real time — after an edit is saved

0 Kudos