<?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: Distance between related points in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639525#M21340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;hmm... sorry but I don�??t get it ... I do the join and then what? I can´t find a way to calculate distance between the two related points, a near analysis will give me the closest point but that point may not be the one I´m interested on. Using distance tools I´ll get the huge distance matrix again...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;That script looks good... i´ll try to look intoit and let you know how it goes... THX a lot!!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The 5# post is correct: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.Add X, Y fields for each feature class, then calculate to add X,Y values for each point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.Join two point feature classes by using sampling location ID, export the joined layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.In the joined layer, add one new field (distance), calculate the distance for each pair point by using field calculator based on their X&amp;amp;Y.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If using spatial join, the result may have some errors for some sampling locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If points X&amp;amp;Y are same(convert to string value and put X, Y to one field, then summarize this field to find duplicates), they should be duplicate.----it's an another useful application by calculating geometry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2013 22:38:11 GMT</pubDate>
    <dc:creator>TOMKONG</dc:creator>
    <dc:date>2013-07-23T22:38:11Z</dc:date>
    <item>
      <title>Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639510#M21325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the thing, I have two point shapes, one containing ???proposed??? sampling stations and the second one with the ???real??? coordinates where the samples were taken. The proposed and real points are linked together by a common code (5K_ID). What I need is to calculate the distance from all points in the ???proposed??? dataset to the corresponding point (by 5K_ID) in the ???real??? dataset. Any help would be much appreciated ???&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 15:55:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639510#M21325</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2012-12-05T15:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639511#M21326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;use GenerateNearTable using the same FC for both in_features and near_features and the 'ALL' option on closest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That give you a (potentialy very big) table of distances between every point and every other.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also get the bearing angle too, if you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PointDistance may work for you too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may want to make selections on the 5K_ID field before running it, to get (many) smaller tables to work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you need an advanced license to use GenerateNearTable or PointDistance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AddXY_management will give you locations for each point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You could then do some trig on the X,Y location differences between pairs of matched points&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 17:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639511#M21326</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-12-05T17:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639512#M21327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;use GenerateNearTable using the same FC for both in_features and near_features and the 'ALL' option on closest.&lt;BR /&gt;That give you a (potentialy very big) table of distances between every point and every other.&lt;BR /&gt;You can also get the bearing angle too, if you want.&lt;BR /&gt;&lt;BR /&gt;PointDistance may work for you too.&lt;BR /&gt;&lt;BR /&gt;You may want to make selections on the 5K_ID field before running it, to get (many) smaller tables to work with.&lt;BR /&gt;&lt;BR /&gt;you need an advanced license to use GenerateNearTable or PointDistance&lt;BR /&gt;&lt;BR /&gt;Without that:&lt;BR /&gt;&lt;BR /&gt;AddXY_management will give you locations for each point.&lt;BR /&gt;You could then do some trig on the X,Y location differences between pairs of matched points&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx for the answer, I have already done what you suggested, but as you pointed out I get a huge table containing distances to all the possible combinations and the process takes a lot to execute, Now I need either a way to calculate distances only to the corresponding points or a way to filter the result table to get only those results I need.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 17:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639512#M21327</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2012-12-05T17:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639513#M21328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a workaround idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Make sure the two sets of points are in the same projection/coordinate system; then use the Merge tool to combine them into one input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Use the Points To Line tool with the 5k_ID as the Line Field to obtain lines between each pair of proposed and real points. The line output carries the 5k_ID field and the Shape_Length values would be the distances you need. For shapefile output, you would need to add a field and then calculate the shape length, using the Add Field and Calculate Field tools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Run the Join Field tool to join the line output with any of the two point inputs via the common 5K_ID to transfer the Shape_Length field to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does it work for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 21:30:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639513#M21328</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2012-12-05T21:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639514#M21329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Along the lines of Dan's idea, you could &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000032000000"&gt;Add XY Coordinates&lt;/A&gt;&lt;SPAN&gt; to each of your point feature classes, &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005s0000002n000000"&gt;Join&lt;/A&gt;&lt;SPAN&gt; one to the other by the common field, then use &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Distance"&gt;Geometry&lt;/A&gt;&lt;SPAN&gt; to calculate the distance between the two sets of coordinates. As long as your feature classes are in the same projection, I'm pretty sure this is valid (although I'm open to explanations as to why not), but you should double-check a few pairs in ArcMap with the distance tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 21:55:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639514#M21329</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2012-12-05T21:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639515#M21330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here is a workaround idea:&lt;BR /&gt;&lt;BR /&gt;1. Make sure the two sets of points are in the same projection/coordinate system; then use the Merge tool to combine them into one input.&lt;BR /&gt;2. Use the Points To Line tool with the 5k_ID as the Line Field to obtain lines between each pair of proposed and real points. The line output carries the 5k_ID field and the Shape_Length values would be the distances you need. For shapefile output, you would need to add a field and then calculate the shape length, using the Add Field and Calculate Field tools.&lt;BR /&gt;3. Run the Join Field tool to join the line output with any of the two point inputs via the common 5K_ID to transfer the Shape_Length field to it.&lt;BR /&gt;&lt;BR /&gt;Does it work for you?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I´m so far sounds like a good way to get it... i{ll let you know if have any more problems.. THX for the help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 21:46:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639515#M21330</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2012-12-20T21:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639516#M21331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Samuel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you had a look at Hawths analysis tools - Distance between Points tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.spatialecology.com/htools/pntdistbetw.php"&gt;http://www.spatialecology.com/htools/pntdistbetw.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2012 10:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639516#M21331</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2012-12-21T10:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639517#M21332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If Anthony's or Dan's suggestion hasn't solved your issue - please let me know which version of ArcGIS you are using.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 21:32:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639517#M21332</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-12-24T21:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639518#M21333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Samuel,&lt;BR /&gt;&lt;BR /&gt;Have you had a look at Hawths analysis tools - Distance between Points tool:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.spatialecology.com/htools/pntdistbetw.php"&gt;http://www.spatialecology.com/htools/pntdistbetw.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Anthony&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact I have Anthony but the problem is the same than with the point distance tool... The output tells me the distance to any other point in the shape and I need to know only the distance to one of them. Having more than 5K pints on my shapes makes unpractical to do it in that way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the "point to line" method, it does solve the problem to some extent but it has one important limitation and that is that the two 5K codes used to generate the lines must be identical and here is where my problem gets more complicated...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let´s add another variable to the original problem. In the original shapes, the two related points were named the same (same 5k_ID) and I was looking for a way to calculate distance from point "a" in shape "A" to shape "a" on shape "B", but now I have another field on my shape (or another table/shape) where the points are related in such a way that the 5_KID´s don match any more. And I must calculate the distance from point �??a�?� on shape �??A�?� to the point �??b�?� on shape �??B�?� and I need to do it once a day for 5000 points... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;NobbirAhmed&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Anthony's or Dan's suggestion hasn't solved your issue - please let me know which version of ArcGIS you are using. &lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm on ArcGis 10.1 and have Advanced Lic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Coordinated system and datum�??s are no problem&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 18:53:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639518#M21333</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2013-07-17T18:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639519#M21334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are the 5k_ID values unique for each of the point feature classes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If possible, could you please share your data (keeping only the 5k_ID field)? You can send the data to my email as well: &lt;/SPAN&gt;&lt;A href="mailto:&amp;quot;nahmed@esri.com&amp;quot;" rel="nofollow"&gt;nahmed@esri.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It will be easier if you use Python script - do you want that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 20:05:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639519#M21334</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2013-07-17T20:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639520#M21335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the 5K_ID for related points in two files don't match, are there any other criteria or conditions (spatial or attribute information) that can be used to "match" them? If not, you may need to step back and look into the processes that have caused the unmatched IDs. Sometimes the problem occurs in early processes and may be solved more easily.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 22:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639520#M21335</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2013-07-17T22:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639521#M21336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; If the 5K_ID for related points in two files don't match, are there any other criteria or conditions (spatial or attribute information) that can be used to "match" them? If not, you may need to step back and look into the processes that have caused the unmatched IDs. Sometimes the problem occurs in early processes and may be solved more easily.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thing is that it is not a problem in the data. IÂ´ll try to give you some more background:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The points come from two sources of somewhere around 6500 moving sampling points each one. Each data set is created by a different company and they were supposed to be almost identical, but they are not. And we must check on a daily basis how far apart are the two companies taking the â??relatedâ?� measurements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the beginning the two companies were using the same codes (5_K) to identify the sites, but now they have different IDÂ´s (5_K and 6_K) and one of them is not doing a good job managing their IDÂ´s so equivalence between 5_K ID and 6_K ID is not always the same but they do provide what I call a Link table telling me which points on the daily results are supposed to be equivalent &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Are the 5k_ID values unique for each of the point feature classes?&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;If possible, could you please share your data (keeping only the 5k_ID field)? You can send the data to my email as well:&amp;nbsp;&amp;nbsp; &lt;A href="mailto:&amp;quot;nahmed@esri.com&amp;quot;" rel="nofollow"&gt;nahmed@esri.com&lt;/A&gt; &lt;BR /&gt; &lt;BR /&gt;It will be easier if you use Python script - do you want that?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A Python script will be just fine!!... and yes, I can share a little data... IÂ´ll attach a excel file with 3 pages, the first one is a subset of my 5_k data, the second page contains the coordinates from what Iâ??ll call the 6_K points and the third page is the link table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note than in the file IÂ´m giving you, the points are in the same (correct) order, but that is not the way it normally is, thats why I need to use the link table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other ideas are still quite welcome!! And before anyone askâ?¦ NO we can not kick any of the two bad companies causing me so much troubleâ?¦ lol&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 21:39:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639521#M21336</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2013-07-18T21:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639522#M21337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is an important piece of information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would think you can use the link table to assign the equivalent 5_k IDs to the points with 6_K IDs; and then use the 5_k IDs in both point sets to do what you need to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that's the case, try Join Field tool to transfer the equivalent 5_K IDs to the points through the common 6_K IDs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 23:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639522#M21337</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2013-07-18T23:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639523#M21338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In case you do not find a way to get a solution using the system tool, here is a python script you can try on. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

proposed = r'D:\data\f.gdb\points_A'
original = r'D:\data\f.gdb\points_B'

# create an empty dictionary to store shapes
proposed_points = {}&amp;nbsp; 
with arcpy.da.SearchCursor(proposed, ("5k_ID", "Shape@")) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # populate the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # use 5k_ID field value as the key of the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proposed_points[row[0]] = row[1]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# create another dictionary
original_points = {}
with arcpy.da.SearchCursor(original, ("5k_ID", "Shape@")) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # populate the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # use 5k_ID field value as the key of the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; original_points[row[0]] = row[1]&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# iterate one of the dictionaries with ID values
for id_5k in proposed_points:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # get proposed and original points with same ID
&amp;nbsp;&amp;nbsp;&amp;nbsp; orig = original_points[id_5k]
&amp;nbsp;&amp;nbsp;&amp;nbsp; prop = proposed_points[id_5k]
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # now find the distance
&amp;nbsp;&amp;nbsp;&amp;nbsp; dist = prop.distanceTo(orig)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print dist&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:10:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639523#M21338</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2021-12-12T03:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639524#M21339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That is an important piece of information.&lt;BR /&gt;&lt;BR /&gt;I would think you can use the link table to assign the equivalent 5_k IDs to the points with 6_K IDs; and then use the 5_k IDs in both point sets to do what you need to do.&lt;BR /&gt;&lt;BR /&gt;If that's the case, try Join Field tool to transfer the equivalent 5_K IDs to the points through the common 6_K IDs.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hmm... sorry but I don�??t get it ... I do the join and then what? I can´t find a way to calculate distance between the two related points, a near analysis will give me the closest point but that point may not be the one I´m interested on. Using distance tools I´ll get the huge distance matrix again...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In case you do not find a way to get a solution using the system tool, here is a python script you can try on. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

proposed = r'D:\data\f.gdb\points_A'
original = r'D:\data\f.gdb\points_B'

# create an empty dictionary to store shapes
proposed_points = {}&amp;nbsp; 
with arcpy.da.SearchCursor(proposed, ("5k_ID", "Shape@")) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # populate the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # use 5k_ID field value as the key of the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proposed_points[row[0]] = row[1]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# create another dictionary
original_points = {}
with arcpy.da.SearchCursor(original, ("5k_ID", "Shape@")) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # populate the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # use 5k_ID field value as the key of the dictionary
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; original_points[row[0]] = row[1]&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# iterate one of the dictionaries with ID values
for id_5k in proposed_points:
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # get proposed and original points with same ID
&amp;nbsp;&amp;nbsp;&amp;nbsp; orig = original_points[id_5k]
&amp;nbsp;&amp;nbsp;&amp;nbsp; prop = proposed_points[id_5k]
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # now find the distance
&amp;nbsp;&amp;nbsp;&amp;nbsp; dist = prop.distanceTo(orig)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print dist&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That script looks good... i´ll try to look intoit and let you know how it goes... THX a lot!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639524#M21339</guid>
      <dc:creator>SamuelFonseca</dc:creator>
      <dc:date>2021-12-12T03:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Distance between related points</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639525#M21340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;hmm... sorry but I don�??t get it ... I do the join and then what? I can´t find a way to calculate distance between the two related points, a near analysis will give me the closest point but that point may not be the one I´m interested on. Using distance tools I´ll get the huge distance matrix again...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;That script looks good... i´ll try to look intoit and let you know how it goes... THX a lot!!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The 5# post is correct: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.Add X, Y fields for each feature class, then calculate to add X,Y values for each point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.Join two point feature classes by using sampling location ID, export the joined layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.In the joined layer, add one new field (distance), calculate the distance for each pair point by using field calculator based on their X&amp;amp;Y.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If using spatial join, the result may have some errors for some sampling locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If points X&amp;amp;Y are same(convert to string value and put X, Y to one field, then summarize this field to find duplicates), they should be duplicate.----it's an another useful application by calculating geometry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 22:38:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/distance-between-related-points/m-p/639525#M21340</guid>
      <dc:creator>TOMKONG</dc:creator>
      <dc:date>2013-07-23T22:38:11Z</dc:date>
    </item>
  </channel>
</rss>

