<?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 Re: Locating closest points in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342566#M8997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If u can post a link of an example it would be useful and I should have mentioned it earlier that I am creating soe&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no link I can think of that clearly relates to your problem.&amp;nbsp; It would probably have to be pieced together from many code snippets.&amp;nbsp; I have no real idea how comfortable you are with adapting sample code to your specific problem, so I don't know what level of examples to direct you to.&amp;nbsp; For example, can I assume you are familiar with using cursors or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you mean you want an example of running a geoprocessing tool in .Net you can look at &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/How_to_run_a_geoprocessing_tool/0001000003rr000000/"&gt;this link&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; The example you came up with also could create the event table on the fly with very little modification.&amp;nbsp; If this tool does not require real time data from newly created or edited features, you could just run the Locate Features Along Routes tool outside of your code and consume the table with an ICursor process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have only developed Addins with .Net.&amp;nbsp; I have no idea what is involved in developing an soe.&amp;nbsp; You will have to look to others for any help specific to soe development.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 15:42:00 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2014-05-22T15:42:00Z</dc:date>
    <item>
      <title>Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342559#M8990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a point on line let say x,y and a list of points i want to find out the points closest to the point x,y at both ends for example &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ------------------------------ x1,y1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; p1------------------------------|----------------------------------p2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and a list of point(p2,p3,p4,p5.......) now i want to find the closest two points&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ------------------------- p5-----x1,y1----p6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; p1-----------------------|-------|---------|----------------------------------p2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there any functioality available in arcobject that can perform this operation?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:59:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342559#M8990</guid>
      <dc:creator>HaiderAli</dc:creator>
      <dc:date>2014-05-22T10:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342560#M8991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I have a point on line let say x,y and a list of points i want to find out the points closest to the point x,y at both ends for example&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="color:&amp;quot;#FFFFFF&amp;quot;;"&gt; ------------------------------&lt;/SPAN&gt; x1,y1&amp;nbsp; &lt;BR /&gt; p1------------------------------|----------------------------------p2&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;and a list of point(p2,p3,p4,p5.......) now i want to find the closest two points&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="color:&amp;quot;#FFFFFF&amp;quot;;"&gt; ------------------------- &lt;/SPAN&gt;p5&amp;nbsp; &lt;SPAN style="color: &amp;quot;#FFFFFF&amp;quot;;"&gt;-----&lt;/SPAN&gt;x1,y1&amp;nbsp; &lt;SPAN style="color:&amp;quot;#FFFFFF&amp;quot;;"&gt;----&lt;/SPAN&gt;p6&amp;nbsp; &lt;BR /&gt; p1-----------------------|-------|---------|----------------------------------p2&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;is there any functioality available in arcobject that can perform this operation?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use linear referencing. Locate Features Along Route to create an event table of the points on the line. Then you can find the measure of the point and select Min and Max of the points in the measure ranges above and below that measure or read the points in ascending and descending sorted order on the RouteID and measures.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 11:48:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342560#M8991</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-22T11:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342561#M8992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;for example i have this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Polyline poly = new Polyline();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Multipoint mp = new Multipoint();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you tell me which classes to use?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 11:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342561#M8992</guid>
      <dc:creator>HaiderAli</dc:creator>
      <dc:date>2014-05-22T11:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342562#M8993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;for example i have this&lt;BR /&gt;&lt;BR /&gt;Polyline poly = new Polyline();&lt;BR /&gt;&lt;BR /&gt;Multipoint mp = new Multipoint();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;can you tell me which classes to use?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;?&amp;nbsp; Multipoints should not be used with this problem, just regular points.&amp;nbsp; Don't you already have a line and point feature class to work with?&amp;nbsp; This code question is too vague and out of context and does not relate to your previous post as far as I can see.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use a geoprocessing operation to use the Linear Referencing tools.&amp;nbsp; If you are building new polylines create them with M values.&amp;nbsp; Once you have a set of regular point events with M values you could convert them to a Multipoint with M values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, look at Linear Referencing to help solve questions about the order of positions or segments along a preexisting line.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:09:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342562#M8993</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-22T12:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342563#M8994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;this was just wriiten as an expample that i have these two polyline and points list jsut was asking about an example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i think this example is good enough &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000q5000000"&gt;http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000q5000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342563#M8994</guid>
      <dc:creator>HaiderAli</dc:creator>
      <dc:date>2014-05-22T12:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342564#M8995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;this was just wriiten as an expample that i have these two polyline and points list jsut was asking about an example. &lt;BR /&gt;i think this example is good enough &lt;A href="http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000q5000000"&gt;http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000q5000000&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree that the example you found can be applied to the problem.&amp;nbsp; I would probably use the Locate Features Along Route tool instead, because it is more flexible and optimized than that code example, unless you really need to tweak the process at a low level.&amp;nbsp; Whatever approach you use to create your point event table, once you have it then sorted cursors and standard SQL should be able to solve the problem and you will have data that can tell you the relative distance along the line between any set of points on the line you want to work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since my suggestion has put you on the right track please consider up voting any helpful posts.&amp;nbsp; Look at my signature line for more info.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342564#M8995</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-22T14:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342565#M8996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If u can post a link of an example it would be useful and I should have mentioned it earlier that I am creating soe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:42:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342565#M8996</guid>
      <dc:creator>HaiderAli</dc:creator>
      <dc:date>2014-05-22T14:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342566#M8997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If u can post a link of an example it would be useful and I should have mentioned it earlier that I am creating soe&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no link I can think of that clearly relates to your problem.&amp;nbsp; It would probably have to be pieced together from many code snippets.&amp;nbsp; I have no real idea how comfortable you are with adapting sample code to your specific problem, so I don't know what level of examples to direct you to.&amp;nbsp; For example, can I assume you are familiar with using cursors or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you mean you want an example of running a geoprocessing tool in .Net you can look at &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/How_to_run_a_geoprocessing_tool/0001000003rr000000/"&gt;this link&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; The example you came up with also could create the event table on the fly with very little modification.&amp;nbsp; If this tool does not require real time data from newly created or edited features, you could just run the Locate Features Along Routes tool outside of your code and consume the table with an ICursor process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have only developed Addins with .Net.&amp;nbsp; I have no idea what is involved in developing an soe.&amp;nbsp; You will have to look to others for any help specific to soe development.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 15:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342566#M8997</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-22T15:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342567#M8998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have no link I can think of that clearly relates to your problem.&amp;nbsp; It would probably have to be pieced together from many code snippets.&amp;nbsp; I have no real idea how comfortable you are with adapting sample code to your specific problem, so I don't know what level of examples to direct you to.&amp;nbsp; For example, can I assume you are familiar with using cursors or not?&lt;BR /&gt;&lt;BR /&gt;If you mean you want an example of running a geoprocessing tool in .Net you can look at &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/How_to_run_a_geoprocessing_tool/0001000003rr000000/"&gt;this link&lt;/A&gt;.&amp;nbsp; The example you came up with also could create the event table on the fly with very little modification.&amp;nbsp; If this tool does not require real time data from newly created or edited features, you could just run the Locate Features Along Routes tool outside of your code and consume the table with an ICursor process.&lt;BR /&gt;&lt;BR /&gt;I have only developed Addins with .Net.&amp;nbsp; I have no idea what is involved in developing an soe.&amp;nbsp; You will have to look to others for any help specific to soe development.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IS is pooible that M values can be negative?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 11:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342567#M8998</guid>
      <dc:creator>HaiderAli</dc:creator>
      <dc:date>2014-05-26T11:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342568#M8999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;IS is pooible that M values can be negative?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes.&amp;nbsp; However, if you used the Create Routes tool then negative M values is not likely to happen unless you are using very complex line inputs with many self intersections and branches.&amp;nbsp; Lines have to be simplified if that is the case for your problem to use LR.&amp;nbsp; Otherwise you would need to use Network Analyst to trace meaningful paths.&amp;nbsp; Your example made me have no reason to think that you were using complex, branching lines in your analysis and such lines will cause you severe problems, since such lines have no single way of organizing them that yields a consistent result for your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A single continuous line that never self intersects or branches, like the one in your example, should always have positive measures if it was created by the Create Route tool, even if it curves and meanders in a variety of directions.&amp;nbsp; That is the only kind of line you can really use to solve your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have control over M values and can recalculate them if for some reason you don't like the way they were assigned, but it is very difficult to do if you are working with complex branching paths.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 15:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342568#M8999</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-26T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Locating closest points</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342569#M9000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;IS is pooible that M values can be negative?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this question is about distances along a line, then relative to a given point offset distances along a line will be positive or negative (even if all the M values on the line are positive).&amp;nbsp; Say the two ends of a line are your home and your work.&amp;nbsp; As you go along the line away from home the measured distance you have traveled is positive relative to home, because the distance is increasing.&amp;nbsp; At the same time, as measured from your work the distance you have traveled is negative, because the distance to work is decreasing.&amp;nbsp; The measure could have just as easily made work the origin and home the destination, but rather than forcing you to create two routes to do both directions of travel, LR makes you choose the orientation of the line and then just sets distances traveled along the line always from the perspective of the origin when measures always increase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the perspective of the traveler, the distance traveled is always positive, regardless of the origin or destination.&amp;nbsp; When comparing distances on either side of a point along a line the absolute value of the distance should be compared, because the real question is being asked from the perspective of the traveler who began at a given point and was not restricted in what direction he could choose to travel, not from the perspective of the line origin or destination.&amp;nbsp; All of these perspectives are equally valid and occurring at the same time, so to solve any problem you have to consider the perspective that defines the answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 16:50:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/locating-closest-points/m-p/342569#M9000</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-05-26T16:50:56Z</dc:date>
    </item>
  </channel>
</rss>

