<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Find nearest point on a line (and M value) in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1347426#M1174</link>
    <description>&lt;P&gt;I have a point feature class (BUS_STATIONS), and an M-enabled line feature class (ROADS)&lt;/P&gt;&lt;P&gt;We are trying to build an attribute rule on the BUS_STATIONS feature class, that would populate a field with the M-value of the nearest point of the road. NOTE: I don't want the M-value of the nearest vertex (which could be far away) but rather the nearest portion of the line. What I was thinking to do was the following:&lt;/P&gt;&lt;P&gt;1. Find the coordinates of that nearest point (not vertex) on the line&lt;/P&gt;&lt;P&gt;2. Then find the M-values of the vertex before and after that point and calculate the M value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But right now I'm stuck with step #1. Any ideas how to achieve that?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Chaim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a point feature class, that will populate the M value of the nearest li&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 21:13:00 GMT</pubDate>
    <dc:creator>ChaimSchwartzIroads</dc:creator>
    <dc:date>2023-11-08T21:13:00Z</dc:date>
    <item>
      <title>Find nearest point on a line (and M value)</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1347426#M1174</link>
      <description>&lt;P&gt;I have a point feature class (BUS_STATIONS), and an M-enabled line feature class (ROADS)&lt;/P&gt;&lt;P&gt;We are trying to build an attribute rule on the BUS_STATIONS feature class, that would populate a field with the M-value of the nearest point of the road. NOTE: I don't want the M-value of the nearest vertex (which could be far away) but rather the nearest portion of the line. What I was thinking to do was the following:&lt;/P&gt;&lt;P&gt;1. Find the coordinates of that nearest point (not vertex) on the line&lt;/P&gt;&lt;P&gt;2. Then find the M-values of the vertex before and after that point and calculate the M value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But right now I'm stuck with step #1. Any ideas how to achieve that?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Chaim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a point feature class, that will populate the M value of the nearest li&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 21:13:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1347426#M1174</guid>
      <dc:creator>ChaimSchwartzIroads</dc:creator>
      <dc:date>2023-11-08T21:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find nearest point on a line (and M value)</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1347632#M1177</link>
      <description>&lt;P&gt;Since you want the calculated M for that location, I am guessing that&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestcoordinate" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/geometry_functions/#nearestcoordinate&lt;/A&gt;&amp;nbsp;will not work?&lt;/P&gt;&lt;P&gt;All the logic you need to get the nearest points and the two bounding vertex to calculate the M is in this rule:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcade-expressions/blob/master/attribute_rule_calculation/SplitIntersectingLine.md" target="_blank"&gt;https://github.com/Esri/arcade-expressions/blob/master/attribute_rule_calculation/SplitIntersectingLine.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 11:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1347632#M1177</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2023-11-09T11:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find nearest point on a line (and M value)</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1353117#M1208</link>
      <description>&lt;P&gt;We eventually got it to work, thanks to our amazing developers Eduard and Sara. The logic we use is basically:&lt;/P&gt;&lt;P&gt;1. Calculate the distance between the BUS_STATION point and all the vertices in the adjacent ROAD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For all segments between vertices, calculate the nearest distance from the BUS_STATION to that segment (length of line perpendicular to that segment).&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Choose the shortest of all outcomes and retrieve the M-value of that point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 09:25:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/find-nearest-point-on-a-line-and-m-value/m-p/1353117#M1208</guid>
      <dc:creator>ChaimSchwartzIroads</dc:creator>
      <dc:date>2023-11-24T09:25:00Z</dc:date>
    </item>
  </channel>
</rss>

