Polygon to Polyline for Cut Activity?
Seems like the Cut Activity won't play with a polygon as the 'Cutter'... does anybody have any ideas as to how to convert polygon geometry to polyline so it can be used in this scenario?
Thanks!
-
You will want to assign the polygon.rings array to a new polyline variable.
0 -
Thanks @Tom Neer? . Got me a bit further!
I am struggling to get the Arcade code for this to work:
var polylineJSON = {'paths' : $polyrings, 'spatialReference' : {'wkid' : $spatref}};
Polyline(polylineJSON);
gives:
Error: Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.
Log shows the $spatref parameter is set as expected from parent as int 4283. Not sure why the engine message or how to overcome it, the constructor parameters look to be OK...
Anyone?
0 -
David,
Found the answer? I facing the same problem.
Erik
0 -
Hi Erik,
No mate sorry I never solved it, I could not get the arcade code to work and couldn't find any help for this anywhere.
I ended up using a totally different solution for my problem (converted vectors to a raster dataset to extract area stats).
Good luck
Dave
0 -
having the same issue here. I tried the example given by ESRI in their Arcade playground and returns me the same error "Execution Error:Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference."
var pointJSON = {'x' : -118.15, 'y' : 33.80, 'spatialReference' : {'wkid' : 4326}};
Point(pointJSON)
I reckon it's something wrong in ESRI's engine room.
0 -
Jack - This does not solve your immediate issue but we are working on a new free Workflow Activity Pack that wrap many of the functions of Turf spatial analysis library. One of those functions will PolygonToLine. Unfortunately, we are a week or two out, just running through testing and documentation.
0 -
Thanks @Tom Neer? , great work and looking forward to the new workflow pack. How could I know when it becomes available?
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare