Select to view content in your preferred language

Relative position in a polygon (flowerbed)

98
1
3 weeks ago
FrédéricCoursol
New Contributor

Background
The plants in the botanical garden are in flowerbeds of different shapes, but often rectangular. Generally, the position of the plants is numbered according to the shape of the flowerbed by taking the longest side.
For flowerbeds oriented north-south, we start the numbering from south to north while for flowerbeds oriented west-east, we start from west to east.
The problem
I would like to use the maximum length of the flowerbed to determine the relative position of the plant on a scale of 100. Thus, if we obtain a value of 50, the horticulturist then knows that the plant is located in the middle of the flowerbed while a value of 90 is located closer to the end (towards the north or east).
The calculation must be done in Arcade so that the PLANTS layer intersects the FLOWERBED layer to determine on which flowerbed polygon the calculation must be performed.
I noticed this partial solution to my problem that determines the maximum length of a polygon (https://community.esri.com/t5/attribute-rules-questions/calculate-longest-length-of-polygon/m-p/1238...). It's the rest that's giving me problems.
Thanks a lot for your solution leads.

0 Kudos
1 Reply
DavidSolari
Frequent Contributor

Haven't tried something like this myself, but combining the Extent, Polyline and NearestCoordinate functions might work.

0 Kudos