<?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: Error When Creating Choropleth From Custom KMZ File in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301260#M39437</link>
    <description>&lt;P&gt;I have a support ticket open. Hopefully they figure it out soon.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2017 23:06:57 GMT</pubDate>
    <dc:creator>jihape</dc:creator>
    <dc:date>2017-07-06T23:06:57Z</dc:date>
    <item>
      <title>Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301258#M39435</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to use a custom kmz file in Splunk (6.5.3), but I keep getting a "problem memmapping" error.&lt;/P&gt;

&lt;P&gt;I'm using a KMZ file from google maps - It can be found at &lt;A href="https://www.google.com/maps/d/viewer?mid=1Dv1JRTGmzlm83tBv7tb8vQcOQXY&amp;amp;ll=-34.166789639385996%2C143.70463756987533&amp;amp;z=6" target="_blank"&gt;https://www.google.com/maps/d/viewer?mid=1Dv1JRTGmzlm83tBv7tb8vQcOQXY&amp;amp;ll=-34.166789639385996%2C143.70463756987533&amp;amp;z=6&lt;/A&gt; (click the three dots next to the magnifying glass)&lt;/P&gt;

&lt;P&gt;When I run this search command &lt;CODE&gt;| stats count | eval featureId="Sydney" | eval count=10000 | geom geo_lhds&lt;/CODE&gt; I get the memmapping error. Using &lt;CODE&gt;| stats count | eval featureId="California" | eval count=10000 | geom geo_us_states&lt;/CODE&gt; works as expected.&lt;/P&gt;

&lt;P&gt;Here is some of the output from the search.log&lt;BR /&gt;
&lt;CODE&gt;05-19-2017 15:19:17.001 INFO  SearchOperator:Geom - loading pipIndex named geo_lhds&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:Util - could not resolve placemark_specifier, using default path&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:Util - fullPath to spatial polygons data file: /opt/splunk/etc/users/admin/search/lookups/geo_lhd_3.kmz&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:Util - using disk index: /opt/splunk/etc/users/admin/search/lookups/geo_lhds&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  ScopedSTLock - Waiting to acquire lock for path=/opt/splunk/etc/users/admin/search/lookups/geo_lhds&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  ScopedSTLock - Lock acquired for path=/opt/splunk/etc/users/admin/search/lookups/geo_lhds 0&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  SearchOperator:Geom - did not find clipped geometry in cache for featureCollection=geo_lhds&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  SearchOperator:Geom - generalization=1.000000&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - Num Keys in ray.key: 1&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - Num Keys in seg.key: 0&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - Num Keys in grid.key: 0&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: ray.key&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:timing:PointInPolygonIndex - memory mapped /opt/splunk/etc/users/admin/search/lookups/geo_lhds/ray.key in  0.001000 sec&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: ray.val&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:timing:PointInPolygonIndex - memory mapped /opt/splunk/etc/users/admin/search/lookups/geo_lhds/ray.val in  0.001000 sec&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: seg.key&lt;BR /&gt;
05-19-2017 15:19:17.002 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument&lt;BR /&gt;
05-19-2017 15:19:17.002 FATAL spatial:PointInPolygonIndex - can not read index file seg.key&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: seg.val&lt;BR /&gt;
05-19-2017 15:19:17.002 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument&lt;BR /&gt;
05-19-2017 15:19:17.002 FATAL spatial:PointInPolygonIndex - can not read index file seg.val&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: grid.key&lt;BR /&gt;
05-19-2017 15:19:17.002 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument&lt;BR /&gt;
05-19-2017 15:19:17.002 FATAL spatial:PointInPolygonIndex - can not read index file grid.key&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  spatial:PointInPolygonIndex - memory mapping existing file: grid.val&lt;BR /&gt;
05-19-2017 15:19:17.002 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument&lt;BR /&gt;
05-19-2017 15:19:17.002 FATAL spatial:PointInPolygonIndex - can not read index file grid.val&lt;BR /&gt;
05-19-2017 15:19:17.002 FATAL spatial:PointInPolygonIndex - memmap failed! no valid keys and values&lt;BR /&gt;
05-19-2017 15:19:17.002 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL&lt;BR /&gt;
05-19-2017 15:19:17.002 ERROR DispatchThread - problem memmapping&lt;BR /&gt;
05-19-2017 15:19:17.003 INFO  UserManager - Setting user context: admin&lt;BR /&gt;
05-19-2017 15:19:17.003 INFO  UserManager - Done setting user context: NULL -&amp;gt; admin&lt;BR /&gt;
05-19-2017 15:19:17.003 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL&lt;BR /&gt;
05-19-2017 15:19:17.003 INFO  DispatchManager - DispatchManager::dispatchHasFinished(id='1495171156.1629', username='admin')&lt;BR /&gt;
05-19-2017 15:19:17.004 INFO  SearchOperator:Geom - deleting PointInPolygonIndex cache for:  geo_lhds&lt;BR /&gt;
05-19-2017 15:19:17.004 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL&lt;BR /&gt;
05-19-2017 15:19:17.005 ERROR dispatchRunner - RunDispatch::runDispatchThread threw error: problem memmapping&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I suspect there is something wrong with the KMZ/KML file, but what I don't know. The only difference I can see is that the KML file in the KMZ file I downloaded from Google has spaces as indents and there no indents in the geo_us_states.kmz file. I've tried to remove those but it didn't help either.&lt;/P&gt;

&lt;P&gt;Any help appreciated! &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301258#M39435</guid>
      <dc:creator>jihape</dc:creator>
      <dc:date>2020-09-29T14:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301259#M39436</link>
      <description>&lt;P&gt;I just incurred in the exact same problem using maps from this website. &lt;A href="http://www.gadm.org/download"&gt;http://www.gadm.org/download&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;07-06-2017 13:53:11.944 INFO  SearchOperator:Geom - in getType _reporting is 0
07-06-2017 13:53:11.944 INFO  SearchOperator:Geom - in getType _reporting is 0
07-06-2017 13:53:11.944 INFO  SearchOperator:Geom - loading pipIndex named regioni2
07-06-2017 13:53:11.946 INFO  spatial:Util - get user-defined xpath /Placemark/name
07-06-2017 13:53:11.946 INFO  spatial:Util - fullPath to spatial polygons data file: /opt/splunk/etc/apps/search/lookups/ITA_regioni.kmz
07-06-2017 13:53:11.946 INFO  spatial:Util - using disk index: /opt/splunk/etc/apps/search/lookups/regioni2
07-06-2017 13:53:11.946 INFO  ScopedSTLock - Waiting to acquire lock for path=/opt/splunk/etc/apps/search/lookups/regioni2
07-06-2017 13:53:11.946 INFO  ScopedSTLock - Lock acquired for path=/opt/splunk/etc/apps/search/lookups/regioni2 0
07-06-2017 13:53:11.946 INFO  SearchOperator:Geom - did not find clipped geometry in cache for featureCollection=regioni2
07-06-2017 13:53:11.946 INFO  SearchOperator:Geom - generalization=1
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - Num Keys in ray.key: 1
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - Num Keys in seg.key: 0
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - Num Keys in grid.key: 0
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: ray.key
07-06-2017 13:53:11.947 INFO  spatial:timing:PointInPolygonIndex - memory mapped /opt/splunk/etc/apps/search/lookups/regioni2/ray.key in  0.001 sec
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: ray.val
07-06-2017 13:53:11.947 INFO  spatial:timing:PointInPolygonIndex - memory mapped /opt/splunk/etc/apps/search/lookups/regioni2/ray.val in  0.001 sec
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: seg.key
07-06-2017 13:53:11.947 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument
07-06-2017 13:53:11.947 FATAL spatial:PointInPolygonIndex - can not read index file seg.key
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: seg.val
07-06-2017 13:53:11.947 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument
07-06-2017 13:53:11.947 FATAL spatial:PointInPolygonIndex - can not read index file seg.val
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: grid.key
07-06-2017 13:53:11.947 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument
07-06-2017 13:53:11.947 FATAL spatial:PointInPolygonIndex - can not read index file grid.key
07-06-2017 13:53:11.947 INFO  spatial:PointInPolygonIndex - memory mapping existing file: grid.val
07-06-2017 13:53:11.947 ERROR spatial:PointInPolygonIndex - Memmap failed, file len 0 : Invalid argument
07-06-2017 13:53:11.947 FATAL spatial:PointInPolygonIndex - can not read index file grid.val
07-06-2017 13:53:11.947 FATAL spatial:PointInPolygonIndex - memmap failed! no valid keys and values
07-06-2017 13:53:11.947 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.947 ERROR DispatchThread - problem memmapping
07-06-2017 13:53:11.948 INFO  UserManager - Setting user context: admin
07-06-2017 13:53:11.948 INFO  UserManager - Done setting user context: NULL -&amp;gt; admin
07-06-2017 13:53:11.948 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.948 INFO  DispatchManager - DispatchManager::dispatchHasFinished(id='1499341991.130', username='admin')
07-06-2017 13:53:11.956 INFO  SearchOperator:Geom - deleting PointInPolygonIndex cache for:  regioni2
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.957 INFO  UserManager - Unwound user context: admin -&amp;gt; NULL
07-06-2017 13:53:11.958 ERROR dispatchRunner - RunDispatch::runDispatchThread threw error: problem memmapping
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jul 2017 12:04:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301259#M39436</guid>
      <dc:creator>Gibbo87</dc:creator>
      <dc:date>2017-07-06T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301260#M39437</link>
      <description>&lt;P&gt;I have a support ticket open. Hopefully they figure it out soon.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 23:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301260#M39437</guid>
      <dc:creator>jihape</dc:creator>
      <dc:date>2017-07-06T23:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301261#M39438</link>
      <description>&lt;P&gt;I forgot to mention that I'm on version 6.6.2&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 06:42:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301261#M39438</guid>
      <dc:creator>Gibbo87</dc:creator>
      <dc:date>2017-07-07T06:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301262#M39439</link>
      <description>&lt;P&gt;In the mean time I found a sort of workaround. &lt;BR /&gt;
Apparently the problem is that the XPath expression used to find the XML element containing the featureID is not working. You can let Splunk use the default expression which is &lt;CODE&gt;/kml/Document/Folder/Placemark/name&lt;/CODE&gt;, the documentation omits the &lt;CODE&gt;/kml/Document/Folder&lt;/CODE&gt;part. &lt;/P&gt;

&lt;P&gt;I had to restructure my KML adding the Folder element which was not there. My KML now looks like this. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;kml ... &amp;gt;
&amp;lt;Document&amp;gt;
    &amp;lt;Folder&amp;gt;
        &amp;lt;name&amp;gt;ita_regions&amp;lt;/name&amp;gt;
    &amp;lt;Placemark&amp;gt;
        &amp;lt;name&amp;gt;Abruzzo&amp;lt;/name&amp;gt;
                .....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Apparently The folder name is mapped to the &lt;CODE&gt;featureCollection&lt;/CODE&gt; field and the Placemark name is mapped to &lt;CODE&gt;featureId&lt;/CODE&gt; and both have to be there. Here is how the lookup looks like in Splunk after the fix. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2960i3ECC9F1EB3B61450/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2017 06:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301262#M39439</guid>
      <dc:creator>Gibbo87</dc:creator>
      <dc:date>2017-07-07T06:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error When Creating Choropleth From Custom KMZ File</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301263#M39440</link>
      <description>&lt;P&gt;I have tried to clean the KML and restructure as well and adding the full XPATH to the "featureId" field and none of it worked for me with the KMZ file I have.&lt;/P&gt;

&lt;P&gt;I'll accept your answer as there are probably other people that need to restructure the KML for it to work.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 02:06:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Error-When-Creating-Choropleth-From-Custom-KMZ-File/m-p/301263#M39440</guid>
      <dc:creator>jihape</dc:creator>
      <dc:date>2017-07-12T02:06:32Z</dc:date>
    </item>
  </channel>
</rss>

