<?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: How to switch positions on coordinates in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743580#M3198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot the last element in the array - I went ahead and updated my answer so it accounts for that. You can make it more elegant, but it should output what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[[12.523986568755383,57.71127941662247], [12.45961803332399,57.635773125999144], [12.436624888552302,57.576614311073236], [12.436624888552302,57.576614311073236]]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Dec 2015 17:54:57 GMT</pubDate>
    <dc:creator>ChrisSmith7</dc:creator>
    <dc:date>2015-12-11T17:54:57Z</dc:date>
    <item>
      <title>How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743578#M3196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I would like to create polygons from a field in my GeoEvent Definition called Polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is formatted like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;"57.71127941662247,12.523986568755383 57.635773125999144,12.45961803332399 57.576614311073236,12.436624888552302 57.71127941662247,12.523986568755383"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Ie latitude1,longitude1 latitude2,longitude2 ... latitudeN,longitudeN&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like it to be:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;”[[12.523986568755383, 57.71127941662247],[12.45961803332399, 57.635773125999144],[12.436624888552302, 57.576614311073236], [12.523986568755383, 57.71127941662247]]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black;"&gt;Ie [[longitude1, latitude1], [longitude2,latitude2], ... [longitudeN,latitudeN]]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black;"&gt;And then map the string to a Geometry field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black;"&gt;Is it possible to construct Regular Expressions in Field calculator to switch the positions of lat and long in a string? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black;"&gt;I am not very familiar with RegEx so any help are appriciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black;"&gt;Having a projection similar to WGS84 but with the latitude coordinat in the first positon and longitude in the second position would be another option but I dont know if it exists?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f6000; background: #FFF2CC;"&gt;Edited by RJ Sunderman:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060;"&gt;You can work with an event field as a String and use a GeoEvent Field Calculator to add information such as spatial reference to produce a JSON String representation of a Geometry. Look for &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060; background: white;"&gt;additional detail on working with Geometries in GeoEvent in 'Appendix A' of the &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.arcgis.com%2Fhome%2Fitem.html%3Fid%3Db6a35042effd44ceab3976941d36efcf" style="padding: calc(12px + 0.35ex) 0 0;" target="_blank"&gt;&lt;SPAN style="color: #287433; background: white;"&gt;GeoEvent Extension Introduction&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class="apple-converted-space"&gt; &lt;SPAN style="font-size: 10.0pt; color: #002060; background: white;"&gt;tutorial. Look for the section titled "Using a Field Calculator Processor to compute a geometry".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060; background: white;"&gt;Unfortunately, the regular expression support extended by GeoEvent does not support the concept of &lt;A href="http://www.regular-expressions.info/backref.html"&gt;back references&lt;/A&gt;. So you won’t be able to pattern match &lt;/SPAN&gt;&lt;SPAN style="color: #002060; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;\([0-9][0-9.]*\)\([0-9][0-9.]*\)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060; background: white;"&gt; and replace the pattern with &lt;/SPAN&gt;&lt;SPAN style="color: #002060; background: white; font-size: 8.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;\2\1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060; background: white;"&gt; to swap the latitude and longitude. Developing a custom processor using the SDK is probably a better approach than trying to do this using out-of-the-box functionality.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f6000; background: #FFF2CC;"&gt;Update 31-March-2016 - RJ Sunderman:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #002060;"&gt;Thanks go to &lt;A href="https://community.esri.com/migrated-users/7493"&gt;Maarten Tromp&lt;/A&gt; for his comments in the thread &lt;A href="https://community.esri.com/message/454384"&gt;Swap coordinate pairs in a Polygon&lt;/A&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #002060; font-size: 13.3333px;"&gt;It is indeed possible to use RegEx back references to swap the latitude and longitude values if you use the correct syntax. Within a GeoEvent Field Calcualtor you would use &lt;SPAN style="color: #002060; font-family: 'Courier New'; font-size: 10.6667px;"&gt;&lt;STRONG&gt;$2$1&lt;/STRONG&gt;&lt;/SPAN&gt; (not &lt;SPAN style="color: #002060; font-family: 'Courier New'; font-size: 10.6667px;"&gt;&lt;STRONG&gt;\2\1&lt;/STRONG&gt;&lt;/SPAN&gt; as I originally tried).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 11:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743578#M3196</guid>
      <dc:creator>ErikNilsson1</dc:creator>
      <dc:date>2015-12-11T11:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743579#M3197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this with regex, but, since you aren't familiar with it, it may cause more pain than good. There's an old saying, "I once had a problem I thought I'd solve with regex... Now I have two problems!" That being said, regex is really powerful, just remember when to use it, when not to use it, and always use wisely! You can Google regex testers online for your flavor of regex, e.g. Python, .NET, etc. to help you proof-of-concept something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime, try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="154985" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/154985_pastedImage_4.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pre-logic:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def updateValue(value):&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; valueArry = value.split(" ")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; newValueArry = []&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; retVal = "["&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; s = " "&amp;nbsp; 
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for latLong in valueArry[:-1]:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pairArry = latLong.split(",")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newPair = pairArry[1] + "," + pairArry[0]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newValueArry.append("[" + newPair + "],")
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pairArry = latLong.split(",")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newPair = pairArry[1] + "," + pairArry[0]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newValueArry.append("[" + newPair + "]")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; retVal = retVal + s.join(newValueArry)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return retVal + "]"&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Polygon =&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;updateValue( !Polygon! )&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATED...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:38:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743579#M3197</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2021-12-12T07:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743580#M3198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot the last element in the array - I went ahead and updated my answer so it accounts for that. You can make it more elegant, but it should output what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[[12.523986568755383,57.71127941662247], [12.45961803332399,57.635773125999144], [12.436624888552302,57.576614311073236], [12.436624888552302,57.576614311073236]]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:54:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743580#M3198</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-12-11T17:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743581#M3199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your answer but it seams like you have been using the ArcGIS desktop Field Calculator (right?) and I needed help with the ArcGIS GeoEvent Extension Field Calculator Processor. I might have been a little bit unclear in my question...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I solved the problem by using the ArcGIS GeoEvent SDK and made a Processor in Java based on the samples that are provided with the SDK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 21:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743581#M3199</guid>
      <dc:creator>ErikNilsson1</dc:creator>
      <dc:date>2015-12-15T21:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743582#M3200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies, Erik - my brain skipped-over the fact that this was for the &lt;STRONG&gt;GeoEvent Extension&lt;/STRONG&gt; Field Calculator. I did some research and found the GitHub - &lt;A href="https://github.com/Esri/solutions-geoevent-java" title="https://github.com/Esri/solutions-geoevent-java"&gt;Esri/solutions-geoevent-java · GitHub&lt;/A&gt; - it looks like you've already gone down this route...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry again! Debating deleting my answer - maybe it would be helpful for someone with an ArcMap Field Calculator issue down the road, though...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 22:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743582#M3200</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-12-15T22:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch positions on coordinates</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743583#M3201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erik -&lt;/P&gt;&lt;P&gt;I ran across a post from &lt;A href="https://community.esri.com/migrated-users/7493" target="_blank"&gt;Maarten Tromp&lt;/A&gt;​ in the following thread: &lt;A href="https://community.esri.com/message/454384" target="_blank"&gt;Swap coordinate pairs in a Polygon&lt;/A&gt;. Taking what he suggested, here is an approach you can follow using GeoEvent out-of-the-box without having to resort to developing a custom processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given:&amp;nbsp; A portion of an input stream with comma separated pairs of coordinate values and a space between each pair of coordinates.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;57.711279,12.523986 57.635773,12.459618 57.576614,12.436624 57.711279,12.523986&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First you need to reverse each coordinate pair. I used an &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Receive JSON on a REST Endpoint&lt;/SPAN&gt; input to HTTP/POST the following JSON to a GeoEvent Service:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;{
&amp;nbsp; "trackid": "AA-1234",
&amp;nbsp; "coordinates": "57.711279,12.523986 57.635773,12.459618 57.576614,12.436624 57.711279,12.523986"
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use a &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Calculator &lt;/SPAN&gt;processor with the following expression to accomplish this:&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;replaceAll(coordinates,'([-]*[0-9]+\.[0-9]+?),([-]*[0-9]+(\.[0-9]+)?)','$2,$1') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that the regular expression I used supports an optional negative sign in front of each coordinate value. A site you might want to bookmark to learn about and experiment with regular expressions is:&amp;nbsp; &lt;A href="http://https//regex101.com/#javascript" rel="nofollow noopener noreferrer" target="_blank"&gt;regex101.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next you need to replace the literal space between each coordinate pair with a literal string&lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt; ],[ &lt;/SPAN&gt;to format the coordinate values as a set of nested JSON arrays and bracket the beginning and end of the string with&lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt; [[ &lt;/SPAN&gt;and&lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt; ]]&lt;/SPAN&gt;. Note that the RegEx pattern matching the &lt;EM&gt;beginning of a line&lt;/EM&gt; is &lt;STRONG&gt;^&lt;/STRONG&gt;. The RegEx pattern for matching the &lt;EM&gt;end of a line&lt;/EM&gt; is &lt;STRONG&gt;$&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;replaceAll(coordinates,' ','],[')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;replaceAll(coordinates,'^','[[')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;replaceAll(coordinates,'$',']]')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your GeoEvent Service so far looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="193560" alt="Capture.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/193560_Capture.png" style="width: 620px; height: 120px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And is producing output which looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="193561" alt="Capture1.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/193561_Capture1.png" style="width: 620px; height: 51px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you need to complete the formatting of your coordinate string to create a string representation of a Geometry. For this step I chose to copy the GeoEvent Definition used by the &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;PolygonCoordinatesFeed&lt;/SPAN&gt; input and add a field named &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;GeomString&lt;/SPAN&gt;. A &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Maper&lt;/SPAN&gt; processor maps the existing &lt;EM&gt;coordinates&lt;/EM&gt; and &lt;EM&gt;trackid&lt;/EM&gt; into the new event structure leaving &lt;EM&gt;GeomString&lt;/EM&gt; unmapped. Another &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Calculator&lt;/SPAN&gt; processor will write its result into this new field. I do this so that the &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Calculator&lt;/SPAN&gt; can write to an existing field without having to create an event defintion on-the-fly in order to write to a new field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the expression used in this most recent &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Calculator&lt;/SPAN&gt; processor:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;'{"rings":[' + coordinates + '],"spatialReference":{"wkid":4326}}'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm doing here is prepending a literal string &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background: #fbe4d5;"&gt;{"rings":[&lt;/SPAN&gt; to the &lt;EM&gt;coordinates&lt;/EM&gt; value and appending a literal string &lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background: #fbe4d5;"&gt;],"spatialReference":{"wkid":4326}}&lt;/SPAN&gt; to the end of the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A final &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Mapper&lt;/SPAN&gt; takes the event structure with the string representation of the Geometry and maps it to a field named &lt;SPAN style="font-family: 'Courier New'; font-size: 13.3333px;"&gt;Geometry&lt;/SPAN&gt;. I now have an event with a field named &lt;EM&gt;trackid&lt;/EM&gt; and a field named &lt;EM&gt;Geometry&lt;/EM&gt; which I can send to a stream service to display the Geometry I've computed from the coordinate values received from the original feed. Here's my final GeoEvent Service:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="193595" alt="Capture2.png" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/193595_Capture2.png" style="width: 620px; height: 204px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an XML export of this configuration for both the 10.3.1 and 10.4 product releases. You will, of course, need to fix any validation errors by publishing your own stream service or switching to use a different output connector if you want to import this configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information in helpful -&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-to-switch-positions-on-coordinates/m-p/743583#M3201</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2021-12-12T07:38:44Z</dc:date>
    </item>
  </channel>
</rss>

