Select to view content in your preferred language

Measure Length Inside Polygon Edge to Edge

981
5
Jump to solution
07-19-2023 01:41 PM
Labels (1)
CESPEDESLUISITD
Regular Contributor

I am trying to figure out how to measure the distance within a polygon from edge to edge, or the longest side from north to south (including multiple segments that make that side up) of the polygon. I need to do this in Arcade. If anyone has approached this and point me in the right direction, I would appreciate it.

Thanks 

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

I had similar question and @JohannesLindner helped me out with this post here.

Might get you what you need or at least point you in the right direction.

R_

View solution in original post

0 Kudos
5 Replies
RhettZufelt
MVP Notable Contributor

I had similar question and @JohannesLindner helped me out with this post here.

Might get you what you need or at least point you in the right direction.

R_

0 Kudos
CESPEDESLUISITD
Regular Contributor

Thanks.

It did. It seems to be, in miles, about .10 off always. I will ask in the other post about that. 

Thanks again

0 Kudos
RhettZufelt
MVP Notable Contributor

Did you put the units you want as the last option in the Distance (supposed to return map units, but I found that to not be the case.  I had to specify feet)?

Also, is you data in a projected coordinate system?  If not, may have something to do with it being 0.1 off.

All my date is projected in state plane, so not sure if it would vary if GCS, but often when numbers are a bit odd, that is the case.

R_

0 Kudos
RhettZufelt
MVP Notable Contributor

Also, not sure what 'profile' you are using, but Distance says 

"Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. $feature) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry."

but doesn't say anything about calculation profile.....

I used it in an attribute rule with State Plane data, and it appears to be spot on.

R_ 

0 Kudos
CESPEDESLUISITD
Regular Contributor

The distanceGeodetic did the trick. I was able to get the same as the widget.

I just need to update it to add all the segments that make up the longest side.

Thanks!!

0 Kudos