|
IDEA
|
@CraigWilliams Thanks! In the meantime, I wonder if this might be a valid workaround: Compare $feature.shape_length, which is the true length, including true curves... vs. Length($feature), which is the pre-densified length, where true curves have been converted to straight segments. If there is a difference between those two values, then that tells us that the line has curves. What do you think? Do you see any issues with that approach?
... View more
03-01-2022
10:29 PM
|
0
|
0
|
1839
|
|
POST
|
Thanks! I'm wondering if the core issue is that the geometries in Arcade get automatically densified (at least, I think they do). Get the true vertex count (Arcade) Arcade Polyline paths documentation: Explain that lines get automatically densified Additionally, I think I might have found a workaround. Instead of using Length($feature) which gives the wrong length, I think we can use $feature.shape_length which gives the right length. I wonder if the reason Esri auto-densifies geometries is for the scenario that you mentioned — generalizing in different scales when used in feature services. Maybe that's the why here. Or maybe, it's just because true curves are a pain, and are easier to deal with if they're always automatically densified. Related: Calculate length of line without using length function (and without densifying curves)
... View more
03-01-2022
12:11 PM
|
0
|
0
|
3292
|
|
IDEA
|
We're aware of the following blurb in the docs — Arcade Geometry Functions: Also note that geometries fetched from feature services, especially polylines and polygons, are generalized according to the view's scale resolution. Be aware that using a feature's geometry (i.e. $feature) as input to any geometry function will yield results only as precise as the view scale. Therefore, results returned from geometry operations in the visualization and labeling profiles may be different at each scale level. Use these functions at your discretion within these contexts. But that doesn't tell us anything about us the fact that true curves get densified, regardless of scale. And in my case, I'm not using feature services, I'm using FCs directly from a FGDB or EGDB. So that blurb doesn't apply, yet I'm still seeing the pre-densification behavior.
... View more
03-01-2022
12:03 PM
|
0
|
0
|
1037
|
|
IDEA
|
When an attribute rules is saved, it's Field value becomes read-only: It would be helpful if the field could be changed — even for existing attribute rules.
... View more
03-01-2022
11:16 AM
|
4
|
4
|
2103
|
|
IDEA
|
Regarding the Arcade Polyline paths documentation: It would help if more details could be provided about the paths property. I believe paths get automatically densified, which is an important detail. Could info be added to the docs about the pre-densification? For example, a similar mechanism (the ArcPy WKT property) says the following: "Any true curves in the geometry will be densified into approximate curves in the WKT string." It would also help to know what densification method is used. Example: the angle method; 10 degrees. Thanks.
... View more
02-28-2022
07:07 PM
|
2
|
1
|
1308
|
|
IDEA
|
On closer inspection, it looks like Arcade automatically densifies polyline paths (converts true curves to straight segments). Related: https://community.esri.com/t5/arcgis-pro-ideas/get-the-true-vertex-count-arcade/idi-p/1148911/jump-to/first-unread-message If that's the case, then densifying by angle might not be necessary.
... View more
02-28-2022
06:49 PM
|
0
|
0
|
1033
|
|
IDEA
|
Using an Arcade expression: I can get a count of a polyline's vertices by looping through the paths property: var line_geo = Dictionary(Text(Geometry($feature)));
var paths = line_geo['paths'];
var vertex_count = 0
for (var path_idx in paths){
for (var vert_idx in paths[path_idx])
{
vertex_count++
}
}
return vertex_count That code works, but the vertex count is a densified vertex count, which isn't what I want...I was expecting the vertex count to be 3 vertices, not 35 vertices. Could ESRI give us a way to get the true vertex count? For example, a pointCount() geometry function.
... View more
02-28-2022
06:01 PM
|
4
|
0
|
1690
|
|
IDEA
|
ArcGIS Pro Version 2.9.32739 (including patch #1). Windows 10
... View more
02-28-2022
05:07 PM
|
0
|
0
|
1145
|
|
IDEA
|
Regarding the Attribute Rules —> New Rule window: When I'm creating a new rule, I scroll down to enable the triggers (Insert and Update): When I click the Insert checkbox or Update checkbox, the window quickly scrolls to the top — without checking the checkbox. So I need to go back down and try again. That happens for each checkbox I need to enable. It's aggravating when that happens. Would ESRI be able to improve that window so that it's less jumpy? Edit: This happens in other scenarios too. If I try to disable an attribute rule, the window jumps to the top and the checkbox doesn't get checked.
... View more
02-28-2022
05:03 PM
|
6
|
2
|
1156
|
|
POST
|
Thanks! I happen to be using a file geodatabase directly, not a feature service. Any idea if that blurb applies to FGDBs?
... View more
02-28-2022
04:31 PM
|
0
|
2
|
3317
|
|
POST
|
If for some reason that midpoint expression doesn't work, this might be an option: Buffer the line and get the centroid of the resulting polygon. It's kind of like a "poor man's midpoint". If I recall, that works ok. But I think I remember the point not being the exact midpoint of the line. I forget what the specific issue was. It's probably good enough for most use cases though...
... View more
02-28-2022
02:17 PM
|
0
|
0
|
7210
|
|
IDEA
|
It would be helpful if a polyline Midpoint() function could be added to the Arcade function library. Otherwise, getting the midpoint of multipart lines using math is quite complicated. Thanks.
... View more
02-28-2022
02:07 PM
|
3
|
0
|
889
|
|
POST
|
I'm not sure if this will be helpful or not, but I'll post it anyway: In similar situations where we don't have a Midpoint() function, such as in the St_Geometry spatial type in EGDBs, we've used the following hack: Buffer the line and get the centroid of the resulting polygon. It's kind of like a "poor man's midpoint". If I recall, that works ok. But I think I remember the point not being the exact midpoint of the line. I forget what the specific issue was. It's probably good enough for most use cases though...
... View more
02-28-2022
01:57 PM
|
4
|
0
|
4372
|
|
POST
|
Do developers use an IDE when writing lengthy Arcade expressions? (specifically Calculation Attribute Rules) Example: https://github.com/Esri/arcade-expressions/blob/master/Industry/Gas/Calculation/Assembly-Generate_ID.js What's your workflow? Do you write (and save) the script in an IDE, and then paste it into ArcGIS Pro to see if it runs? Or something else? Thanks.
... View more
02-28-2022
01:35 PM
|
4
|
7
|
6424
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-30-2026 11:08 AM | |
| 1 | 05-11-2026 11:23 AM | |
| 2 | 05-07-2026 04:19 AM | |
| 1 | 05-06-2026 09:03 AM | |
| 1 | 03-19-2026 09:29 AM |