<?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: Problem with XY to Line in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719408#M40818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had to rename worksheet to remove spaces, but Get the following as output. I input all values as GCS NAD83. It all looks reasonable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30886[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jan 2014 13:25:17 GMT</pubDate>
    <dc:creator>JimCousins</dc:creator>
    <dc:date>2014-01-27T13:25:17Z</dc:date>
    <item>
      <title>Problem with XY to Line</title>
      <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719406#M40816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to calculate distances between 2 different sets of lat/lon coordinates (one representing zip code centroids, the other representing hospitals).&amp;nbsp; I created a small test file with 24 records and am trying to use the "XY to Line" tool to get the distances.&amp;nbsp; For some reason the lines that it outputs are nonsensical.&amp;nbsp;&amp;nbsp; Clearly I'm doing something wrong with GCS and projection, but I don't know what. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created the zip codes centroids points from Tiger Line polygons, which use GCS North American 1983.&amp;nbsp;&amp;nbsp; I created the hospital points by geocoding addresses, and they seem to display perfectly when I set them to the same GCS.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone tell me what I'm doing wrong?&amp;nbsp; Maybe I need to get out of that GCS and into a projected system right off the bat??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is there any easier way to get these distances?&amp;nbsp;&amp;nbsp; I tried creating a Point Distance table but had other problems with that, and that is a less direct solution anyway because I would then have to somehow lookup values in that table to get distances for my already paired sets of coordinates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jan 2014 16:43:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719406#M40816</guid>
      <dc:creator>BryanMaxwell</dc:creator>
      <dc:date>2014-01-26T16:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with XY to Line</title>
      <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719407#M40817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, had problems attaching files in original post.&amp;nbsp; Here they are.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached the hospitals, the zip codes, and the small test file of the pairings.&amp;nbsp;&amp;nbsp; Eventually I need to calculate the distances for 17 million pairings (each pairing represents an individual patient's zip code of residence, and the hospital they went to).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jan 2014 17:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719407#M40817</guid>
      <dc:creator>BryanMaxwell</dc:creator>
      <dc:date>2014-01-26T17:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with XY to Line</title>
      <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719408#M40818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had to rename worksheet to remove spaces, but Get the following as output. I input all values as GCS NAD83. It all looks reasonable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]30886[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 13:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719408#M40818</guid>
      <dc:creator>JimCousins</dc:creator>
      <dc:date>2014-01-27T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with XY to Line</title>
      <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719409#M40819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would suggest simply using mathematics. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a² + b² = c²&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From your excel table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;latitude_stca and fac will = a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;longtude_atca&amp;nbsp; and&amp;nbsp; fac = b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Distance between the points is c&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question.&amp;nbsp; Regarding unique id you have numbered as 1&amp;nbsp; is it about 2.886377129 kilometers (or 9469 feet, or 1mi 1396.6yd) away from the centroid? Assuming your lat and long are in meters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IF that is so you can populate your Excel table cell H2 with &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=(((ABS(C2 - F2) *(10000/90))^2) + ((ABS(D2 - G2) *(10000/90))^2))^(1/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and drag it down to calculate all the cells.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ^ symbol in Excel performs a square function.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The 10000/90 is converting decimal degrees to kilometers&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The ^(1/2) performs the square root function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is what I came up with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;uniqueptzip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; latitude_ztcalongitude_ztca fac_id latitude_fac longitude_f&amp;nbsp; KM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Miles&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 94709 37.8792337 -122.2668389 10735 37.76337 -122.25433 12.94855421 8.045858567&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3 94601 37.7755447 -122.2187049 10735 37.76337 -122.25433 4.183109881 2.599263973&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4 94608 37.836817 -122.2895695 10735 37.76337 -122.25433 9.051487954 5.62433386&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7 94579 37.6864911 -122.157201 10735 37.76337 -122.25433 13.76361634 8.552314689&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9 94610 37.8114061 -122.2424576 10735 37.76337 -122.25433 5.497946626 3.416265648&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10 94579 37.6864911 -122.157201 10735 37.76337 -122.25433 13.76361634 8.552314689&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;11 94611 37.8294833 -122.2033926 10735 37.76337 -122.25433 9.273343688 5.762188621&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;12 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;13 94603 37.7365309 -122.1794542 10735 37.76337 -122.25433 8.837855387 5.491588736&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;14 94803 37.95954 -122.2835546 10735 37.76337 -122.25433 22.03721492 13.6932905&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;15 94601 37.7755447 -122.2187049 10735 37.76337 -122.25433 4.183109881 2.599263973&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;16 94609 37.8343906 -122.264374 10735 37.76337 -122.25433 7.969701545 4.952142949&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;17 94578 37.7061366 -122.1255505 10735 37.76337 -122.25433 15.65831996 9.729628937&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;18 94601 37.7755447 -122.2187049 10735 37.76337 -122.25433 4.183109881 2.599263973&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;19 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;20 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;21 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22 94612 37.8087999 -122.2691955 10735 37.76337 -122.25433 5.311133083 3.300185094&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;23 94602 37.8043204 -122.2075451 10735 37.76337 -122.25433 6.908361482 4.292656809&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;24 94501 37.7737968 -122.278123 10735 37.76337 -122.25433 2.886377129 1.793511597&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I need to calculate distances between 2 different sets of lat/lon coordinates (one representing zip code centroids, the other representing hospitals).&amp;nbsp; I created a small test file with 24 records and am trying to use the "XY to Line" tool to get the distances.&amp;nbsp; For some reason the lines that it outputs are nonsensical.&amp;nbsp;&amp;nbsp; Clearly I'm doing something wrong with GCS and projection, but I don't know what. &lt;BR /&gt;&lt;BR /&gt;I created the zip codes centroids points from Tiger Line polygons, which use GCS North American 1983.&amp;nbsp;&amp;nbsp; I created the hospital points by geocoding addresses, and they seem to display perfectly when I set them to the same GCS.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Can anyone tell me what I'm doing wrong?&amp;nbsp; Maybe I need to get out of that GCS and into a projected system right off the bat??&lt;BR /&gt;&lt;BR /&gt;Or is there any easier way to get these distances?&amp;nbsp;&amp;nbsp; I tried creating a Point Distance table but had other problems with that, and that is a less direct solution anyway because I would then have to somehow lookup values in that table to get distances for my already paired sets of coordinates.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 14:04:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719409#M40819</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2014-01-27T14:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with XY to Line</title>
      <link>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719410#M40820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks all.&amp;nbsp;&amp;nbsp; Turns out I just had the lats and lons backwards in the XY to Line tool config.&amp;nbsp;&amp;nbsp; All is well!&amp;nbsp;&amp;nbsp; Very sorry to waste people's time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 02:49:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/problem-with-xy-to-line/m-p/719410#M40820</guid>
      <dc:creator>BryanMaxwell</dc:creator>
      <dc:date>2014-01-28T02:49:31Z</dc:date>
    </item>
  </channel>
</rss>

