[Geomoose-users] Geomoose and mapcache
Jim Klassen
klassen.js at gmail.com
Fri Dec 9 09:01:55 PST 2016
This is an example from probably 2011-2012. Source WMS is just a normal
MapServer layer. It is imagery so no worries about the metatiles to
attempt to get labels to work right. I defined my own grid because I
found 512x512 tiles were more efficient than the 256x256 default which
required too many round trips to the server to fetch enough tiles to
fill a larger screen.
Map-Source:
<map-source name='imagery' tiled='true' type='tms' width="512"
height="512" reference="off">
<layer name="imagery at g512" title="Imagery"/>
<url>https://my.server.com/mapcache/tms/</url>
<param name="layername" value="imagery at g512"/>
</map-source>
Map Cache:
<?xml version="1.0" encoding="UTF-8"?>
<mapcache>
<cache name="disk" type="disk">
<base>/srv/data/mapcache/disk</base>
<symlink_blank/>
</cache>
<source name="imagery" type="wms">
<getmap>
<params>
<FORMAT>image/jpeg</FORMAT>
<LAYERS>imagery_zone14,imagery_zone15,imagery_zone16</LAYERS>
</params>
</getmap>
<http>
<url>http://mywmsserver/cgi-bin/mapserv?map=/datasets/maps/imagery_ortho.map</url>
</http>
</source>
<grid name="utm15">
<metadata>
<title>UTM15</title>
</metadata>
<extent>176250.0589 1577463.0797 823749.9411 9106037.1690</extent>
<srs>EPSG:26915</srs>
<units>m</units>
<size>512 512</size>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.6 0.3</resolutions>
</grid>
<grid name="g512">
<metadata>
<title>GoogleMapsCompatible</title>
<!--
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
-->
</metadata>
<extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480
20037508.3427892480</extent>
<srs>EPSG:3857</srs>
<srsalias>EPSG:900913</srsalias>
<units>m</units>
<size>512 512</size>
<resolutions>156543.0339280410 78271.51696402048 39135.75848201023
19567.87924100512 9783.939620502561 4891.969810251280 2445.984905125640
1222.992452562820 611.4962262814100 305.7481131407048 152.8740565703525
76.43702828517624 38.21851414258813 19.10925707129406 9.554628535647032
4.777314267823516 2.388657133911758 1.194328566955879 0.5971642834779395
0.29858214173896975296 0.14929107086948487648
0.07464553543474243824</resolutions>
</grid>
<tileset name="imagery">
<metadata>
<title>2008 Imagery</title>
<abstract>2008 Imagery</abstract>
<wms_metadataurl_href>http://my.server.org/metadata.xml</wms_metadataurl_href>
<!--wms_metadataurl_type>FDGC</wms_metadataurl_type-->
<!--wms_metadataurl_format>text/html</wms_metadataurl_format-->
</metadata>
<source>imagery</source>
<cache>disk</cache>
<grid>WGS84</grid>
<grid>g512</grid>
<grid>utm15</grid>
<format>JPEG</format>
<metatile>1 1</metatile>
<metabuffer>0</metabuffer>
<expires>3600</expires>
<auto_expire>86400000000000</auto_expire>
</tileset>
<default_format>JPEG</default_format>
<service type="wms" enabled="true">
<full_wms>assemble</full_wms>
<resample_mode>bilinear</resample_mode>
<format>JPEG</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"/>
<errors>report</errors>
<lock_dir>/tmp</lock_dir>
</mapcache>
On 12/09/2016 10:25 AM, Brent Fraser wrote:
> Hey Jeff,
>
> So far so good. I've been able to edit the httpd.conf file (for
> some reason I had C:C: in my mapcache paths), restart Apache, and
> click on the Demo link under MapCache URLs heading in the
> http://localhost page of MS4W. The page showed me the demo data in
> the available tiling schemes. Took me a while to figure out the HTML
> did not exist on disk as mapcache was generating these demo pages.
>
> The next step will be a little more difficult as I need to configure
> MapCache and GeoMoose to show my data. We should consider shipping
> our demo data with a pre-configured mapcache mapsource, or at least
> adding a page in our doc on it.
>
> And many thanks for including mapcache in MS4W!
>
> Best Regards,
> Brent Fraser
>
> On 12/9/2016 5:52 AM, Jeff McKenna wrote:
>> Hi Brent,
>>
>> Also as you travel down that path let me know if you think any tweaks
>> are needed into the distributed "/apps/mapcache/mapcache.xml" file in
>> MS4W.
>>
>> -jeff
>>
>>
>>
>> On 2016-12-08 10:33 PM, Brent Fraser wrote:
>>> Hi all,
>>>
>>> I thought I would learn how to use mapcache. Does any one have any
>>> example snippets from a mapbook.xml and mapcache's config.xml?
>>>
>>> Thanks!
>>>
>>
>>
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
More information about the Geomoose-users
mailing list