<?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: Streaming OpenSKY JSON problem in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96526#M426</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump! ‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No takers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3176"&gt;Derek Law&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/289244"&gt;Michelle Mathias&lt;/A&gt;&lt;A href="https://community.esri.com/space/2103"&gt;GeoEvent&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jul 2018 17:39:21 GMT</pubDate>
    <dc:creator>deleted-user-0NXDqYAmJ8kX</dc:creator>
    <dc:date>2018-07-24T17:39:21Z</dc:date>
    <item>
      <title>Streaming OpenSKY JSON problem</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96525#M425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to get a stream service configured from the&amp;nbsp;&lt;A class="link-titled" href="https://opensky-network.org/api/states/all" title="https://opensky-network.org/api/states/all"&gt;https://opensky-network.org/api/states/all&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There seem to be a problem with this JSON format because it does not&amp;nbsp;create&amp;nbsp;proper geoevent definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not recognize the "states" object as an Array of objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to&amp;nbsp;manually add the&amp;nbsp;"states" object into the geoevent definition using a Group and string object with Cardinality set to Many.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would then use the array index (&lt;SPAN&gt;states[5],&lt;/SPAN&gt;&lt;SPAN&gt;states[6],&lt;/SPAN&gt;&lt;SPAN&gt;states[7])&lt;/SPAN&gt; to Calculate geometry, and states[0] for the TrackID etc using processor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The JSON return is as follows:&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;{"time":1518552809,"states":[["ac96b8","AAL2423 ","United States",1518552809,1518552809,-93.4581,44.9529,1150.62,false,116.59,94.3,0,null,1143,"2236",false,0],["aa56db","UAL1711 ","United States",1518552808,1518552809,-80.8667,41.8291,11277.6,false,291.48,97.3,0,null,11376.66,"1031",false,0],["aa56da","UAL2796 ","United States",1518552809,1518552809,-76.0575,39.2978,8229.6,false,266.64,42.03,0.65,null,8435.34,"0753",false,0],["a0cfbd","AAL1852 ","United States",1518552807,1518552807,-67.3843,19.9709,9144,false,218.45,321.21,0,null,9593.58,"2330",false,0],["7c6b2d","JST745&amp;nbsp; ","Australia",null,1518552775,null,null,null,true,0.19,180,null,null,null,"3662",false,0],["a77eae","N582PU&amp;nbsp; ","United States",1518552809,1518552809,-86.9988,40.4198,228.6,false,39.31,83.99,-1.3,null,342.9,"1200",false,0]]}&lt;/PRE&gt;&lt;P&gt;Thanks in advance for any insights.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:16:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96525#M425</guid>
      <dc:creator>deleted-user-0NXDqYAmJ8kX</dc:creator>
      <dc:date>2018-02-13T21:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Streaming OpenSKY JSON problem</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96526#M426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump! ‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No takers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3176"&gt;Derek Law&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/289244"&gt;Michelle Mathias&lt;/A&gt;&lt;A href="https://community.esri.com/space/2103"&gt;GeoEvent&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2018 17:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96526#M426</guid>
      <dc:creator>deleted-user-0NXDqYAmJ8kX</dc:creator>
      <dc:date>2018-07-24T17:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Streaming OpenSKY JSON problem</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96527#M427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Juliano -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is that the JSON being returned by OpenSky organizes the "states" not as an array, but as an array of arrays. The nested arrays are not named elements, so GeoEvent Server is unable to create a GeoEvent Definition for the data's structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you suggest that you want to access the data&amp;nbsp;as&amp;nbsp;&lt;STRONG style="font-family: terminal, monaco, monospace;"&gt;states[5]&lt;/STRONG&gt;, I don't think you are indexing to the value you intend to access. Consider the following illustration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="JSON Sample" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415267_Scratch1.png" /&gt;&lt;/P&gt;&lt;P&gt;The reference&amp;nbsp;&lt;STRONG style="font-family: terminal, monaco, monospace;"&gt;states[5]&lt;/STRONG&gt; does not access the value &lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace; color: #ff0000;"&gt;-111.4485&lt;/SPAN&gt; ... it references the entire array of values at the sixth position within "states" (zero-base indexing). When I queried the&amp;nbsp;&lt;A href="https://opensky-network.org/api/states/all" rel="nofollow noopener noreferrer" target="_blank"&gt;https://opensky-network.org/api/states/all&lt;/A&gt; endpoint just now, I got 5534 arrays organized within the &lt;STRONG style="font-family: terminal, monaco, monospace;"&gt;states[ ]&lt;/STRONG&gt; array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JSON allows a variable number of unnamed arrays to be nested&amp;nbsp;&lt;SPAN&gt;within an array&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;... but unless every internal array has a name, GeoEvent Server won't be able to create a GeoEvent Definition. Every event attribute in an event definition must have a name.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Hence the following - while completely valid JSON - cannot be ingested by GeoEvent Server.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;{"myLists":[["A","B","C"],["D","E","F"],["G","H","I"]]}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;If the data were reorganized to give each interior array a name:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"myLists"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"set1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"A"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"B"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"set2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"D"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"E"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"F"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"set3"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"G"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"H"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"I"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;... then GeoEvent Server would be able to create a GeoEvent Definition.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;IMG alt="GeoEvent Definition" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/415283_Scratch2.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Each interior array would have to be part of a named element, I think, for the JSON to be valid. The GeoEvent Definition above indicates that&amp;nbsp;&lt;EM&gt;myLists&lt;/EM&gt; is an array of several elements. Each named element in&amp;nbsp;&lt;EM&gt;myLists&lt;/EM&gt;&amp;nbsp;contains an array, which is an array of several string values.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;The article&amp;nbsp;&lt;A href="https://www.w3schools.com/js/js_json_arrays.asp" rel="nofollow noopener noreferrer" target="_blank"&gt;w3schools.com - JSON Arrays&lt;/A&gt; does a good job of explaining this.&amp;nbsp; You also might take a look at a blog I just posted:&amp;nbsp; &lt;A href="https://community.esri.com/community/gis/enterprise-gis/geoevent/blog/2018/07/25/json-data-structures-working-with-hierarchy-and-multicardinality?sr=search&amp;amp;searchId=9dc314e9-cc88-4684-a8f5-1a2c3d8ca49b&amp;amp;searchIndex=0" target="_blank"&gt;https://community.esri.com/community/gis/enterprise-gis/geoevent/blog/2018/07/25/json-data-structures-working-with-hierarchy-and-multicardinality?sr=search&amp;amp;searchId=9dc314e9-cc88-4684-a8f5-1a2c3d8ca49b&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Hope this information helps (sorry that no one replied to you to date)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;- RJ&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/streaming-opensky-json-problem/m-p/96527#M427</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2021-12-11T06:04:43Z</dc:date>
    </item>
  </channel>
</rss>

