<?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: Point-to-point distance (multipoint) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617859#M48188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are working with data which are in decimal degrees, presumably, therefore, you need to pay attention to the fine details of the tool's options... see below&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV&gt;method&lt;/DIV&gt;&lt;DIV&gt;(Optional)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Determines whether to use a shortest path on a spheroid (geodesic) or a flat earth (planar). &lt;STRONG&gt;It is strongly suggested to use Geodesic method with data stored in a coordinate system which is not appropriate for distance measurements (&lt;/STRONG&gt;for example, Web Mercator and any &lt;STRONG&gt;geographic coordinate system&lt;/STRONG&gt;), or any dataset which spans a large geographic area.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PLANAR —Uses planar distances between the features. This is the default.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;GEODESIC&lt;/STRONG&gt; —Uses geodesic distances between features. This method takes into account the curvature of the spheroid and correctly deals with data near the dateline and poles.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which would have accounted for your values being returned in portions of a degree rather than meters.&lt;/P&gt;&lt;P&gt;Use the Geodesic calculation method, which should return meters.&amp;nbsp; And if you really need the distance in km.&amp;nbsp; Add a new field to the table ...&lt;/P&gt;&lt;P&gt;ie Dist_km (double) and divide the distance in meters column by 1000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 01:33:35 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2017-04-04T01:33:35Z</dc:date>
    <item>
      <title>Point-to-point distance (multipoint)</title>
      <link>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617856#M48185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello dear ArcGIS programmers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset with points on the center of municipalities in south Brazil. I have also a set of coordinates that are approximate locations of Jesuit Missions. I need to find the closest distance a municipality is from a mission, aka the minimum distance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using MultiPoint to create a set of points and then use distance from that to obtain the minimum distance. Using&amp;nbsp;syntax example I found online I didn't had much luck but to end in tears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;# A list of features and coordinate pairs&lt;BR /&gt;feature_info = [[[-50.963, -25.596], [-51.367, -25.191], [-54.353, -25.464], [-53.243, -28.28]],&lt;BR /&gt; [[-52.074, -22.597], [-50.463, -24.942], [-51.9, -22.69], [-51.689, -25.679]],&lt;BR /&gt; [[-51.689, -25.679], [-50.737, -24.489], [-50.975, -23,716], [-54.965, -28.2]],&lt;BR /&gt; [[-54.296, -28.512], [-53.899, -28.611], [-53.677, -28.538],[-55.959, -28.783]],&lt;BR /&gt; [[-53.15, -28.015], [53.243, -28.28], [-55.171, -27.776], [54.793, 27.485], [54.621, 27.478]]]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# A list that will hold each of the Multipoint objects&lt;BR /&gt;features = []&lt;/P&gt;&lt;P&gt;for feature in feature_info:&lt;BR /&gt; # Create a Multipoint object based on the array of points&lt;BR /&gt; # Append to the list of Multipoint objects&lt;BR /&gt; arcpy.Multipoint(feature)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As you can see, I wasn't even including the distance function in this example.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If anyone can help me with the distance calculation, I would surely appreciate. It's been a while since I started using ArcGIS for this only purpose and so far only managed to create a central point for every municipality.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 01:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617856#M48185</guid>
      <dc:creator>JoãoFrancisco_Pugliese</dc:creator>
      <dc:date>2017-04-03T01:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Point-to-point distance (multipoint)</title>
      <link>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617857#M48186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you don't need to create a multipoint.&amp;nbsp; Why don't you just do it all in arcmap rather than starting from coding.&lt;/P&gt;&lt;P&gt;If you have the longitude/latitude in tabular or spreadsheet format, you can bring that data into arcmap as an 'event layer', then save it as a featureclass or shapefile.&amp;nbsp; If your other data are in a similar form, then repeat.&amp;nbsp; Once the data are in that format you can use the&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/near.htm"&gt; Near tool&lt;/A&gt; or &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/generate-near-table.htm"&gt;Generate Near Table &lt;/A&gt;tool is you have the appropriate licence.&amp;nbsp; If you don't have the appropriate license, then there are other ways to get the results which are far simpler than coding a solution yourself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 02:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617857#M48186</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-04-03T02:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Point-to-point distance (multipoint)</title>
      <link>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617858#M48187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan, thank you very much, I had no idea it was that straightforward...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I may ask for another piece of help, I'm having trouble generating the NearTable in kilometers. I have two layers - the center of the municipalities and the missions - and the results were on a unit that I think was decimal degrees - small numbers between 0 and 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading some threads online I have set both on the South America Albers Conic Area PCS.&amp;nbsp;My points then moved to southern Uruguay, and I put them back to SIRGAS 2000 (their original GCS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do I obtain my results in kilometers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 00:42:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617858#M48187</guid>
      <dc:creator>JoãoFrancisco_Pugliese</dc:creator>
      <dc:date>2017-04-04T00:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Point-to-point distance (multipoint)</title>
      <link>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617859#M48188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are working with data which are in decimal degrees, presumably, therefore, you need to pay attention to the fine details of the tool's options... see below&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV&gt;method&lt;/DIV&gt;&lt;DIV&gt;(Optional)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Determines whether to use a shortest path on a spheroid (geodesic) or a flat earth (planar). &lt;STRONG&gt;It is strongly suggested to use Geodesic method with data stored in a coordinate system which is not appropriate for distance measurements (&lt;/STRONG&gt;for example, Web Mercator and any &lt;STRONG&gt;geographic coordinate system&lt;/STRONG&gt;), or any dataset which spans a large geographic area.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PLANAR —Uses planar distances between the features. This is the default.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;GEODESIC&lt;/STRONG&gt; —Uses geodesic distances between features. This method takes into account the curvature of the spheroid and correctly deals with data near the dateline and poles.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which would have accounted for your values being returned in portions of a degree rather than meters.&lt;/P&gt;&lt;P&gt;Use the Geodesic calculation method, which should return meters.&amp;nbsp; And if you really need the distance in km.&amp;nbsp; Add a new field to the table ...&lt;/P&gt;&lt;P&gt;ie Dist_km (double) and divide the distance in meters column by 1000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 01:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/point-to-point-distance-multipoint/m-p/617859#M48188</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-04-04T01:33:35Z</dc:date>
    </item>
  </channel>
</rss>

