Arcade Error: intersection in the same layer

02-17-2022 07:28 AM
New Contributor

I have 2 layers (pipe layer<line>  and  fitting layer<point>) and the 2 layers is empty 
I assigned an attribute rule to the pipe layer,

this Rule manage me to draw new feature in the pipe layer and
if that new feature intersected with an existed feature in the same layer (pipe layer) => new point will be created and inserted into the fitting layer 

Trigger types: insert and update 

Here is the code:

var pipe = FeatureSetByName($datastore, "pipe")
var existed_feature = Intersects(pipe,$feature)
var new_point = Point(Intersection(First(existed_feature), $feature));
  return {  
    "edit": [
       "className": "test_point",
       "adds": [{

<< I Get " ✓ Expression valid" message on the rule >>
The issue is, When I start drawing new pipe I get an error 

"Failed to create new feature(s)

invalid geometry[rule name: intersection , trigger event: insert, class name: pipe, GlopalID: **** ]
Where is the problem, any help ?

Tags (1)
0 Kudos
1 Reply
Esri Esteemed Contributor
0 Kudos