<?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: Get UTM coordinates from selected map location in specific spatial reference in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-utm-coordinates-from-selected-map-location-in/m-p/475600#M44170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The toUTM method does not allow you to specify the UTM output wkid.&lt;/P&gt;&lt;P&gt;Because you are providing a point that has a UTM WKID you are getting that error. The point parameter has the below note.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The location to be represented in UTM notation. The point's&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/point-amd.html#spatialreference"&gt;spatial reference&lt;/A&gt;&amp;nbsp;should either be WGS84 or an another&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm"&gt;geographic coordinate system&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It sounds like you really want to project the mouse point to a certain UTM coordinate. For that you need to look into GeometryService Project method or the esri geometry &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.projection-amd.html"&gt;projection class&lt;/A&gt;&amp;nbsp;if you want to keep all the work client side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Dec 2019 16:35:55 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2019-12-31T16:35:55Z</dc:date>
    <item>
      <title>Get UTM coordinates from selected map location in specific spatial reference</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-utm-coordinates-from-selected-map-location-in/m-p/475599#M44169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using ArcGIS for Javascript 3.31&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The users have the ability to select NAD27 or NAD83 as the projection and 16N or 17N as the zone. Then when the user clicks on the map, the application is supposed to convert the clicked point on the map to UTM coordinates in the selected projection/zone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAD27 16N = wkid 26716&lt;/P&gt;&lt;P&gt;NAD27 17N = wkid 26717&lt;/P&gt;&lt;P&gt;NAD83 16N = wkid 26916&lt;/P&gt;&lt;P&gt;NAD83 17N = wkid 26917&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code snippet looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var point = new Point(e.mapPoint.x, e.mapPoint.y, new SpatialReference({ wkid: &amp;lt;wkid from above&amp;gt;}));&lt;/P&gt;&lt;P&gt;var utmCoords = coordinateFormatter.toUtm(point, "north-south-indicators", true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anytime this runs I get the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uncaught b:&amp;nbsp;&lt;/P&gt;&lt;P&gt;name: "coordinate-formatter: invalid-spatial-reference"&lt;/P&gt;&lt;P&gt;message: "wkid is not valid"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2019 05:12:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-utm-coordinates-from-selected-map-location-in/m-p/475599#M44169</guid>
      <dc:creator>MathewMullan</dc:creator>
      <dc:date>2019-12-31T05:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get UTM coordinates from selected map location in specific spatial reference</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-utm-coordinates-from-selected-map-location-in/m-p/475600#M44170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The toUTM method does not allow you to specify the UTM output wkid.&lt;/P&gt;&lt;P&gt;Because you are providing a point that has a UTM WKID you are getting that error. The point parameter has the below note.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The location to be represented in UTM notation. The point's&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/point-amd.html#spatialreference"&gt;spatial reference&lt;/A&gt;&amp;nbsp;should either be WGS84 or an another&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm"&gt;geographic coordinate system&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It sounds like you really want to project the mouse point to a certain UTM coordinate. For that you need to look into GeometryService Project method or the esri geometry &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.projection-amd.html"&gt;projection class&lt;/A&gt;&amp;nbsp;if you want to keep all the work client side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2019 16:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-utm-coordinates-from-selected-map-location-in/m-p/475600#M44170</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-12-31T16:35:55Z</dc:date>
    </item>
  </channel>
</rss>

