<?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: Use geostats to mark multiple points on the map and separate them in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-geostats-to-mark-multiple-points-on-the-map-and-separate/m-p/372145#M109502</link>
    <description>&lt;P&gt;Hi ShiORi,&lt;/P&gt;

&lt;P&gt;The &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats"&gt;geostats command&lt;/A&gt; has two parameter to adjust the granularity for positioning point on the map: binspanlong and binspanlat&lt;BR /&gt;
You may use smaller values that default eg.:&lt;BR /&gt;
| geostats latfield=latitude &lt;EM&gt;binspanlong=10 binspanlat=5&lt;/EM&gt; longfield=longtitude count(redCount) as "Parking" count(greenCount) as "NoCarParking"&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2018 18:13:08 GMT</pubDate>
    <dc:creator>apilger_splunk</dc:creator>
    <dc:date>2018-01-15T18:13:08Z</dc:date>
    <item>
      <title>Use geostats to mark multiple points on the map and separate them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-geostats-to-mark-multiple-points-on-the-map-and-separate/m-p/372144#M109501</link>
      <description>&lt;P&gt;Hi! I have a question that I want to mark multiple points on the map.&lt;BR /&gt;
But it seems because the distance is too close, it merged into one point.&lt;BR /&gt;
This is my code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup macAddr_lat  
|append [search source="udp:5567" 000000000d0100b4 OR 000000000d0100ce OR 000000000d0100c1 OR 000000000d0100c8 
|rex field=data "fc000105(?&amp;lt;ParkData&amp;gt;\d{2})" 
|eval ParkStatus=case(ParkData=="02","Not yet learn",ParkData=="22","Had Learn",ParkData=="20","No Car Parking",ParkData=="21","Parking",ParkData=="23","Keep Parking",ParkData=="60","No Car Parking",ParkData=="61","Parking",ParkData=="62","Keep Correcttio",ParkData=="63","Had Correcttion")
|eval secondsAgoStr=tonumber(now() - _time) 
|table macAddr data ParkData ParkStatus  _time time secondsAgoStr rssi snr ] |table macAddr data ParkData ParkStatus  _time time secondsAgoStr rssi snr latitude longtitude |selfjoin macAddr |dedup macAddr
|search ParkData=*
|eval redCount=if(ParkData=21 OR ParkData=23 OR ParkData=61,"Parking",NULL())
|eval greenCount = if (ParkData=20 OR ParkData=22 OR ParkData=60 OR ParkData=62,"No Car Parking",NULL())
|eventstats sum(duration) AS Today_Parking_TotalTime 
|eval percentage=round(duration/Today_Parking_TotalTime*100 ,2) |eval percentage=tostring(percentage+"%") | addcoltotals labelfield=Today_Parking_TotalTime label=Today_Parking_TotalTime 
|fields - _raw ,- closed_txn ,- field_match_sum , - linecount ,- Today_Parking_TotalTime 
 | geostats latfield=latitude longfield=longtitude count(redCount) as "Parking" count(greenCount) as "NoCarParking"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the point what I  click is:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3864i19162BC5BA90B80D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
How do I separate them on the map?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 21:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-geostats-to-mark-multiple-points-on-the-map-and-separate/m-p/372144#M109501</guid>
      <dc:creator>ShiORi</dc:creator>
      <dc:date>2017-11-15T21:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use geostats to mark multiple points on the map and separate them</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-geostats-to-mark-multiple-points-on-the-map-and-separate/m-p/372145#M109502</link>
      <description>&lt;P&gt;Hi ShiORi,&lt;/P&gt;

&lt;P&gt;The &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats"&gt;geostats command&lt;/A&gt; has two parameter to adjust the granularity for positioning point on the map: binspanlong and binspanlat&lt;BR /&gt;
You may use smaller values that default eg.:&lt;BR /&gt;
| geostats latfield=latitude &lt;EM&gt;binspanlong=10 binspanlat=5&lt;/EM&gt; longfield=longtitude count(redCount) as "Parking" count(greenCount) as "NoCarParking"&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 18:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-geostats-to-mark-multiple-points-on-the-map-and-separate/m-p/372145#M109502</guid>
      <dc:creator>apilger_splunk</dc:creator>
      <dc:date>2018-01-15T18:13:08Z</dc:date>
    </item>
  </channel>
</rss>

