<?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: Geospatial lookup returns wrong results in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/542853#M37205</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have reproduced the issue with sample data and simple geospatial lookup. All events with id=1 are inside the geofence, events with id=2 are outside. We are getting incorrect results (different when sorting according to time). We have two sample data sources (data_sample_2 has changed latitude in one of the events for id=2, from 51.501835 to 51.501836).&lt;/P&gt;&lt;P&gt;When sorting from earliest to latest, all events are inside:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_0-1615216709478.jpeg" style="width: 803px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13218i5083CC59F9582BE6/image-dimensions/803x269?v=v2" width="803" height="269" role="button" title="friderikab_0-1615216709478.jpeg" alt="friderikab_0-1615216709478.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When sorting from latest to earliest, some events for id=1 are outside (which is incorrect):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_1-1615216747174.jpeg" style="width: 770px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13219i8CBD5AA97B7BFAFF/image-dimensions/770x256?v=v2" width="770" height="256" role="button" title="friderikab_1-1615216747174.jpeg" alt="friderikab_1-1615216747174.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Removing event with problematic latitude:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_2-1615217131494.jpeg" style="width: 762px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13220iCF28462DC17209C9/image-dimensions/762x242?v=v2" width="762" height="242" role="button" title="friderikab_2-1615217131494.jpeg" alt="friderikab_2-1615217131494.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="debug_idx" source="data_sample_1"
| eval time_epoch=_time
| sort 0 _time
| lookup geo_4 latitude longitude
| table id latitude longitude _time time_epoch featureId featureCollection
| noop search_optimization=false&lt;/LI-CODE&gt;&lt;P&gt;Data_sample_1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:23:23.000Z","latitude":53.500091,"longitude":9.909387}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:16:58.000Z","latitude":53.49732,"longitude":9.9082}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:30.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:15.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}&lt;/LI-CODE&gt;&lt;P&gt;Data_sample_2:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501836,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:23:23.000Z","latitude":53.500091,"longitude":9.909387}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:16:58.000Z","latitude":53.49732,"longitude":9.9082}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:30.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:15.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}&lt;/LI-CODE&gt;&lt;P&gt;Geolookup_4.kml&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;kml xmlns="http://www.opengis.net/kml/2.2"&amp;gt;
&amp;lt;Document id="root_doc"&amp;gt;
&amp;lt;Schema name="geo_4" id="geo_4"&amp;gt;
	&amp;lt;SimpleField name="Name" type="string"&amp;gt;&amp;lt;/SimpleField&amp;gt;
&amp;lt;/Schema&amp;gt;
&amp;lt;Folder&amp;gt;
&amp;lt;name&amp;gt;geo_4&amp;lt;/name&amp;gt;
&amp;lt;Placemark&amp;gt;
    &amp;lt;name&amp;gt;{"place":"Location 1","category":"Locations","description":["A"],"subdescription":"01"}&amp;lt;/name&amp;gt;
    &amp;lt;Style&amp;gt;&amp;lt;LineStyle&amp;gt;&amp;lt;color&amp;gt;ff0000ff&amp;lt;/color&amp;gt;&amp;lt;/LineStyle&amp;gt;&amp;lt;PolyStyle&amp;gt;&amp;lt;fill&amp;gt;0&amp;lt;/fill&amp;gt;&amp;lt;/PolyStyle&amp;gt;&amp;lt;/Style&amp;gt;
    &amp;lt;Polygon&amp;gt;&amp;lt;outerBoundaryIs&amp;gt;&amp;lt;LinearRing&amp;gt;&amp;lt;coordinates&amp;gt;9.92195,53.51249 9.92848,53.49588 9.89352,53.49482 9.89561,53.51567 9.92195,53.51249&amp;lt;/coordinates&amp;gt;&amp;lt;/LinearRing&amp;gt;&amp;lt;/outerBoundaryIs&amp;gt;&amp;lt;/Polygon&amp;gt;
&amp;lt;/Placemark&amp;gt;
&amp;lt;/Folder&amp;gt;
&amp;lt;/Document&amp;gt;&amp;lt;/kml&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 08 Mar 2021 15:34:22 GMT</pubDate>
    <dc:creator>friderikab</dc:creator>
    <dc:date>2021-03-08T15:34:22Z</dc:date>
    <item>
      <title>Geospatial lookup returns wrong results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/537857#M36783</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with identifying if a point is within a polygon or not.&lt;/P&gt;&lt;P&gt;For the same latitude and longitude, sometimes I get right results, but sometimes not. I get wrong results if I search for more IDs (so there are more events) or I change the time range (not necessarily bigger).&lt;/P&gt;&lt;P&gt;The line which causes the issue: | lookup some_lookup_name latitude longitude&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="right results" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12744i865AF63250084DC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="results_one_wagon.jpg" alt="right results" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;right results&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="wrong results" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12743i720E1333911AEC5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="results_more_wagons.jpg" alt="wrong results" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;wrong results&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_0-1611930955224.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12747iE7A8A2EFC99C0CA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="friderikab_0-1611930955224.png" alt="friderikab_0-1611930955224.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 14:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/537857#M36783</guid>
      <dc:creator>friderikab</dc:creator>
      <dc:date>2021-01-29T14:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Geospatial lookup returns wrong results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/537963#M36787</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231015"&gt;@friderikab&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It is not possible to guess without seeing your search, could you please show your search? How do you pass&amp;nbsp;&lt;SPAN&gt;latitude longitude fields to lookup?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2021 05:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/537963#M36787</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-30T05:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Geospatial lookup returns wrong results</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/542853#M37205</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have reproduced the issue with sample data and simple geospatial lookup. All events with id=1 are inside the geofence, events with id=2 are outside. We are getting incorrect results (different when sorting according to time). We have two sample data sources (data_sample_2 has changed latitude in one of the events for id=2, from 51.501835 to 51.501836).&lt;/P&gt;&lt;P&gt;When sorting from earliest to latest, all events are inside:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_0-1615216709478.jpeg" style="width: 803px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13218i5083CC59F9582BE6/image-dimensions/803x269?v=v2" width="803" height="269" role="button" title="friderikab_0-1615216709478.jpeg" alt="friderikab_0-1615216709478.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When sorting from latest to earliest, some events for id=1 are outside (which is incorrect):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_1-1615216747174.jpeg" style="width: 770px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13219i8CBD5AA97B7BFAFF/image-dimensions/770x256?v=v2" width="770" height="256" role="button" title="friderikab_1-1615216747174.jpeg" alt="friderikab_1-1615216747174.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Removing event with problematic latitude:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="friderikab_2-1615217131494.jpeg" style="width: 762px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13220iCF28462DC17209C9/image-dimensions/762x242?v=v2" width="762" height="242" role="button" title="friderikab_2-1615217131494.jpeg" alt="friderikab_2-1615217131494.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="debug_idx" source="data_sample_1"
| eval time_epoch=_time
| sort 0 _time
| lookup geo_4 latitude longitude
| table id latitude longitude _time time_epoch featureId featureCollection
| noop search_optimization=false&lt;/LI-CODE&gt;&lt;P&gt;Data_sample_1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:23:23.000Z","latitude":53.500091,"longitude":9.909387}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:16:58.000Z","latitude":53.49732,"longitude":9.9082}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:30.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:15.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}&lt;/LI-CODE&gt;&lt;P&gt;Data_sample_2:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501836,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-11T01:14:34.000Z","latitude":51.501835,"longitude":6.906453}}},"ident":{"attr":{"id":"2"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:23:23.000Z","latitude":53.500091,"longitude":9.909387}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:16:58.000Z","latitude":53.49732,"longitude":9.9082}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:30.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}
{"location":{"state":{"position":{"timestamp":"2021-01-06T22:13:15.000Z","latitude":53.501923,"longitude":9.910017}}},"ident":{"attr":{"id":"1"}}}}&lt;/LI-CODE&gt;&lt;P&gt;Geolookup_4.kml&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;kml xmlns="http://www.opengis.net/kml/2.2"&amp;gt;
&amp;lt;Document id="root_doc"&amp;gt;
&amp;lt;Schema name="geo_4" id="geo_4"&amp;gt;
	&amp;lt;SimpleField name="Name" type="string"&amp;gt;&amp;lt;/SimpleField&amp;gt;
&amp;lt;/Schema&amp;gt;
&amp;lt;Folder&amp;gt;
&amp;lt;name&amp;gt;geo_4&amp;lt;/name&amp;gt;
&amp;lt;Placemark&amp;gt;
    &amp;lt;name&amp;gt;{"place":"Location 1","category":"Locations","description":["A"],"subdescription":"01"}&amp;lt;/name&amp;gt;
    &amp;lt;Style&amp;gt;&amp;lt;LineStyle&amp;gt;&amp;lt;color&amp;gt;ff0000ff&amp;lt;/color&amp;gt;&amp;lt;/LineStyle&amp;gt;&amp;lt;PolyStyle&amp;gt;&amp;lt;fill&amp;gt;0&amp;lt;/fill&amp;gt;&amp;lt;/PolyStyle&amp;gt;&amp;lt;/Style&amp;gt;
    &amp;lt;Polygon&amp;gt;&amp;lt;outerBoundaryIs&amp;gt;&amp;lt;LinearRing&amp;gt;&amp;lt;coordinates&amp;gt;9.92195,53.51249 9.92848,53.49588 9.89352,53.49482 9.89561,53.51567 9.92195,53.51249&amp;lt;/coordinates&amp;gt;&amp;lt;/LinearRing&amp;gt;&amp;lt;/outerBoundaryIs&amp;gt;&amp;lt;/Polygon&amp;gt;
&amp;lt;/Placemark&amp;gt;
&amp;lt;/Folder&amp;gt;
&amp;lt;/Document&amp;gt;&amp;lt;/kml&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Mar 2021 15:34:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Geospatial-lookup-returns-wrong-results/m-p/542853#M37205</guid>
      <dc:creator>friderikab</dc:creator>
      <dc:date>2021-03-08T15:34:22Z</dc:date>
    </item>
  </channel>
</rss>

