<?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: json polyline to feature service in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170957#M723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a few ideas from the appendix link you supplied but have yet to be successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Elliott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Dec 2015 08:28:23 GMT</pubDate>
    <dc:creator>ElliottCarson</dc:creator>
    <dc:date>2015-12-17T08:28:23Z</dc:date>
    <item>
      <title>json polyline to feature service</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170955#M721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to get a json file from a folder with polyline features through GeoEvent (10.2.2) to a feature service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've successful done this for point features, but at a loss how this could be done for other feature types; eg polylines and polygons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For points my Input is shown below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/153751_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The json text for a point features is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "items" : [&lt;/P&gt;&lt;P&gt;&amp;nbsp; {"x" : 114, "y" : -20, "TITLE" : "Ship 1", "SPEED" : 3.0, "COURSE" : 267, "UPDATED_UTC" : 1449479650000},&lt;/P&gt;&lt;P&gt;&amp;nbsp; {"x" : 115, "y" : -20, "TITLE" : "Ship 2", "SPEED" : 2.0, "COURSE" : 203, "UPDATED_UTC" : 1449479650000},&lt;/P&gt;&lt;P&gt;&amp;nbsp; {"x" : 114, "y" : -21, "TITLE" : "Ship 3", "SPEED" : 1.0, "COURSE" : 185, "UPDATED_UTC" : 1449479650000}]&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the polyline, I can get the fields in but I'm not successful with the actual feature. I'm unsure how to specify the geometry in the input as well as the in the json file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/153752_pastedImage_9.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The json file example below:&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "items" : {"paths" : [[[114.1,-20.0], [114.2,-20.0], [114.3,-20.0]]],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "TITLE" : "Hugin Explorer",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "UPDATED_UTC" : 1449479650000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Elliott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 03:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170955#M721</guid>
      <dc:creator>ElliottCarson</dc:creator>
      <dc:date>2015-12-09T03:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: json polyline to feature service</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170956#M722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it would be possible. Have a look at the section "Using a Field Calculator Processor to compute a geometry" in Appendix 1 to &lt;SPAN class="esriItemTitle"&gt;Tutorial - Introduction to GeoEvent which you can download from here: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="esriItemTitle"&gt;&lt;A href="http://www.arcgis.com/home/group.html?owner=GeoEventTeam&amp;amp;title=ArcGIS%20GeoEvent%20Gallery&amp;amp;content=all&amp;amp;start=1&amp;amp;q=tutorial&amp;amp;t=group&amp;amp;focus=group" title="http://www.arcgis.com/home/group.html?owner=GeoEventTeam&amp;amp;title=ArcGIS%20GeoEvent%20Gallery&amp;amp;content=all&amp;amp;start=1&amp;amp;q=tutorial&amp;amp;t=group&amp;amp;focus=group"&gt;http://www.arcgis.com/home/group.html?owner=GeoEventTeam&amp;amp;title=ArcGIS%20GeoEvent%20Gallery&amp;amp;content=all&amp;amp;start=1&amp;amp;q=tutoria…&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="esriItemTitle"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="esriItemTitle"&gt;Basicly it would be possible to make a string formatted with your polyline coordinates (similar to how they do with points in the exampe) and then map the field&amp;nbsp; to a geometry using the Field Mapper. I am about to start testing this myself now but have some other problems to solve but I will create another thread about that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 11:25:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170956#M722</guid>
      <dc:creator>ErikNilsson1</dc:creator>
      <dc:date>2015-12-11T11:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: json polyline to feature service</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170957#M723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a few ideas from the appendix link you supplied but have yet to be successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Elliott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 08:28:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170957#M723</guid>
      <dc:creator>ElliottCarson</dc:creator>
      <dc:date>2015-12-17T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: json polyline to feature service</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170958#M724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elliott -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please take a look at an update I just posted to the thread &lt;A href="https://community.esri.com/message/599062" target="_blank"&gt;Re: How to switch positions on coordinates&lt;/A&gt;​.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no clean way, using a GeoEvent input's &lt;SPAN style="color: #505051; font-family: Verdana, Geneva, sans-serif; font-size: 12px;"&gt;Construct Geometry From Fields&lt;/SPAN&gt; capability, to create a polyline or polygon Geometry. The input is only able to take two values, an X coordinate and a Y coordinate, and create a point Geometry. It cannot iterate over a list of coordinates, extract values from different positions in the array, and build a string representation of a polyline or polygon Geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, because the event data in your file is &lt;EM&gt;&lt;STRONG&gt;nearly&lt;/STRONG&gt;&lt;/EM&gt; already formatted as Esri Feature JSON, you can do what you are trying to do without too much effort. What you're missing is a leading &lt;SPAN style="color: #3d3d3d; font-family: 'Courier New'; font-size: 13.3333px; background-color: #fbe4d5;"&gt;{"paths":&lt;/SPAN&gt; on the front of your quoted string. The JSON you illustrated, the structure in the file your input is reading, has a value &lt;EM&gt;named&lt;/EM&gt; paths, but the value of &lt;EM&gt;paths&lt;/EM&gt; is just the bracketed JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than using a file input, I am going to use 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 data you illustrated to a GeoEvent Service. The only change I made to the data was to explicitly quote the value &lt;SPAN style="color: #3d3d3d; font-family: 'Courier New'; font-size: 13.3333px; background-color: #fbe4d5;"&gt;[[[114.1, ... -20.0]]]&lt;/SPAN&gt; to designate that it is a String value.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "items": {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "paths" : "[[[114.1,-20.0], [114.2,-20.0], [114.3,-20.0]]]",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": "Hugin Explorer",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "updated_utc": 1449479650000
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}]&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the GeoEvent Service:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="193597" alt="Capture3.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/193597_Capture3.png" style="width: 620px; height: 111px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here's the expression in the Field Calculator:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Courier New'; font-size: 13.3333px;"&gt;'{"paths":' + paths + '}'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like in the thread I reference above, the &lt;SPAN style="font-size: 12px; font-family: Verdana, Geneva, sans-serif; color: #505051; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Mapper&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; processor is simply mapping the computed String to a field of type Geometry. The coordinates (114.1, -20.0) locate the polyline off the coast of Australia, northwest of the Hamersley Range. If that's not correct you could either flip the coordinates in your input file so that they are X, Y ... or if you have to ... use the regular expression magic illustrated in the other thread and configure a &lt;SPAN style="font-size: 12px; font-family: Verdana, Geneva, sans-serif; color: #505051; background-color: rgba(237, 245, 252, 0.65098);"&gt;Field Calculator&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; do that for you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information helps -&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/json-polyline-to-feature-service/m-p/170958#M724</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2021-12-11T08:51:46Z</dc:date>
    </item>
  </channel>
</rss>

