[mapserver-users] Mapcache tileset only shows sporadically in KML / Google Earth

thomas bonfort thomas.bonfort at gmail.com
Sun Jun 9 07:08:43 PDT 2013


On 8 June 2013 22:13, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:

> In general, The seeder can not be run on an active cache because it does
> not coordinate tile generation with apache so if they both try to create
> the same tiles things can get confusing and there is a chance that an
> incomplete tile might get served with both writing the resulting tile might
> be damaged.
>

Steve and Jukka,

This previous statement is not very accurate, as the seeder and apache
instance *do* coordinate themselves through the lockfiles (provided they
are run with a configuration that points to the same lockfile directory).
When *launching* the seeder (i.e. only once per seeding session), it will
delete any present lock files that might have been left over from a
previous run. This will impact the clients of a live apache instance *only*
if the seeder was launched at the exact same time the client was requesting
a tile *that wasn't already in the cache*. I believe that in practice for a
production system with long-spaced seed updates this will rarely be an
issue (i.e. your client is going on an area that no other user has ever
accessed in the last N months). This will however show up frequently on a
development system when you are interactively browsing the unseeded cache
while concurrently launching seeding sessions.

If this is really an issue for you, you can apply a single character patch
to the seeder to prevent it from deleting present lock files; you'll end up
with a deadlock if a lockfile was effectively left over from a failed
previous session, and it would be up to you to manually delete them in that
case. In the longer run, funding for storing the renderer pid inside the
lock file and automatically removing/ignoring the lock if the pid is not
present (won't work if seeding across multiple machines), or configuring a
timeout on the creation time of the lockfile (will fail if a WMS render
takes longer than your configured timeout).

regards,
thomas

>
> -Steve W.
>
>
> On 6/8/2013 3:41 PM, John D. Evans wrote:
>
>> Hi,
>>
>> Thomas Bonfort wrote on 06/06/2013:
>>
>>> As for the root issue, are your tilesets fully preseeded or are they
>>> populated on demand? KML superoverlays are organized in a tree, i.e.
>>> to access a tile at zoom level N you first need to access all parent
>>> tiles from level 0 to N-1; on an unseeded tileset with a slow wms
>>> backend this might be a very long wait. Also please check the apache
>>> error log for any mapcache related messages.
>>>
>>
>> Thanks for the input! Sorry for the delayed reply. My tiles had been
>> populated on demand but I finally found, installed, and ran
>> "mapcache_seed". It's now been running for 10+ hours now (*) but I still
>> get the same effect in Google Earth. (A very low-resolution view
>> displays when I'm zoomed out very far, but disappears as soon as I try
>> to zoom in.) Does the seeding have to be completely finished before
>> Google Earth can see beyond the top-level KML tiles?
>>
>> Thanks again.
>>
>>    - John E.
>>
>> (*) I'm running this on a fairly puny virtual machine (2 cores); I guess
>> I should try seeding with 8 or 10 threads on an 8-core machine. I will
>> also try limiting my zoom levels (I suspect I'm seeding 0-17 by default)
>> and my spatial extent (I'm probably doing the whole globe by default --
>> lots of blank tiles :-).
>>
>>
>>>
>>> On 6 June 2013 05:19, John D. Evans <john.evans at gst.com
>>> <mailto:john.evans at gst.com>> wrote:
>>>
>>>     Hello,
>>>
>>>     Not sure my earlier query made it to the list.
>>>
>>>     I'm using MapCache to serve for some satellite image products. It
>>>     sort of works: the tms and wmts browsers at /mapcache/demo show
>>>     full coverage of my data area, and let users zoom in to see full
>>>     resolution image mosaics. But the KML superoverlay (my reason for
>>>     using MapCache) only displays in Google Earth when I'm zoomed very
>>>     far out (so that the entire globe is not much bigger than a golf
>>>     ball on my screen). If I zoom in, the image usually disappears;
>>>     though sometimes when zoomed in I do see [only] the right (east)
>>>     half of my tileset, at a very low resolution.
>>>
>>>     Do you see anything wrong with my mapcache.xml (below)?
>>>     Is there anything else I should be checking?
>>>
>>>     (I'm using a simple disk cache in /tmp, with mod_mapcache from the
>>>     Ubuntu libmapcache 1.0.0-3 package; Mapserver 6.2.1 is on the same
>>>     machine, running in 64-bit Ubuntu 12.04. Mapserver works fine, and
>>>     reports no errors [I think]. My client is Google Earth 7.)
>>>
>>>     Thanks for taking a look,
>>>
>>>       - John D. Evans
>>>         GST, Inc / Greenbelt, MD
>>>
>>>     Below is my mapcache.xml file (actually an excerpt of it:
>>>     the real one has more tilesets and sources).
>>>
>>>     <mapcache>
>>>        <metadata>
>>>           <title>my mapcache service</title>
>>>           <abstract>woot! this is a service abstract!</abstract>
>>>        </metadata>
>>>
>>>        <cache name="disk" type="disk">
>>>           <base>/tmp</base>
>>>           <symlink_blank/>
>>>        </cache>
>>>
>>>        <format name="PNG_BEST" type ="PNG">
>>>           <compression>best</**compression>
>>>        </format>
>>>        <format name="PNG_FAST" type ="PNG">
>>>           <compression>fast</**compression>
>>>        </format>
>>>
>>>          <source name="CSPP_CloudPhase" type="wms">
>>>           <http>
>>>              <url>http://localhost/cgi-bin/**mapserv<http://localhost/cgi-bin/mapserv>
>>> ?</url>
>>>           </http>
>>>           <getmap>
>>>              <params>
>>>                 <FORMAT>image/png</FORMAT>
>>>                 <LAYERS>iicmocp_daily</LAYERS>
>>>                 <MAP>/raid/maps/viirs.map</**MAP>
>>>              </params>
>>>           </getmap>
>>>        </source>
>>>
>>>        <tileset name="CSPP_Cloud_Phase_EDR">
>>>           <metadata>
>>>              <title>VIIRS Cloud Phase from NASA GSFC DRL</title>
>>>              <abstract>Detailed description goes here</abstract>
>>>           </metadata>
>>>           <source>CSPP_CloudPhase</**source>
>>>           <cache>disk</cache>
>>>           <format>PNG</format>
>>>           <grid>WGS84</grid>
>>>           <metatile>2 2</metatile>
>>>           <expires>3600 <tel:3600></expires>
>>>           <auto_expire>3600 <tel:3600></auto_expire>
>>>
>>>           <!-- <metabuffer>10</metabuffer> -->
>>>        </tileset>
>>>
>>>        <default_format>PNG_FAST</**default_format>
>>>
>>>        <service type="wms" enabled="true">
>>>           <full_wms>assemble</full_wms>
>>>           <resample_mode>bilinear</**resample_mode>
>>>           <format>PNG_FAST</format>
>>>           <!-- <maxsize>4096</maxsize> -->
>>>        </service>
>>>
>>>        <service type="wmts" enabled="true"/>
>>>        <service type="tms" enabled="true"/>
>>>        <service type="kml" enabled="true"/>
>>>        <service type="gmaps" enabled="true"/>
>>>        <service type="ve" enabled="true"/>
>>>        <service type="demo" enabled="true"/>
>>>
>>>        <lock_dir>/tmp</lock_dir>
>>>        <errors>report</errors>
>>>        <threaded_fetching>true</**threaded_fetching>
>>>
>>>     </mapcache>
>>>     ______________________________**_________________
>>>     mapserver-users mailing list
>>>     mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
>>>     <mailto:mapserver-users at lists.**osgeo.org<mapserver-users at lists.osgeo.org>
>>> >
>>>     http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>>
>>>
>>> ------------------------------**------------------------------**
>>> ------------
>>>
>>> NOTE: This message was trained as non-spam. If this is wrong, please
>>> correct the training as soon as possible.
>>> Spam <https://filter.gst.com/canit/**b.php?i=01JIUgvAE&m=**
>>> e50f357136f6&c=s<https://filter.gst.com/canit/b.php?i=01JIUgvAE&m=e50f357136f6&c=s>
>>> >
>>> Not spam
>>> <https://filter.gst.com/canit/**b.php?i=01JIUgvAE&m=**e50f357136f6&c=n<https://filter.gst.com/canit/b.php?i=01JIUgvAE&m=e50f357136f6&c=n>
>>> >
>>> Forget previous vote
>>> <https://filter.gst.com/canit/**b.php?i=01JIUgvAE&m=**e50f357136f6&c=f<https://filter.gst.com/canit/b.php?i=01JIUgvAE&m=e50f357136f6&c=f>
>>> >
>>>
>>
>>
>>
>> ______________________________**_________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
>> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
> ______________________________**_________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130609/1a8fbd48/attachment-0001.html>


More information about the mapserver-users mailing list