[mapserver-dev] Communicating Tile Coordinates Between Mapcache and Mapserver

thomas bonfort thomas.bonfort at gmail.com
Wed Jun 24 11:29:37 PDT 2015


No! You should NOT be adding a fixed bbox to the params, that one is
calculated by mapcache!
 On Jun 24, 2015 20:26, "seandisanti" <sdisanti at orionnetworksolutions.com>
wrote:

> Removing those, and adding the bbox to the request worked perfectly. Thank
> you so much for your help!
>
> On Wed, Jun 24, 2015 at 10:31 AM, tbonfort [via OSGeo.org] <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5212785&i=0>> wrote:
>
>> Mapcache queries the source as a wms getmap request, not as a tiled one.
>> Remove the 'tile' dimension from your tileset, and the mode=tile and all
>> the tile*= parameters from your mapcache source URL.
>> Thomas
>> On Jun 24, 2015 00:09, "seandisanti" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=5212774&i=0>> wrote:
>>
>>> I have a page that currently successfully requests tiles from Mapserver
>>> 6.0.3. The working request looks like:
>>>
>>> "?map=/map/ahps/precip.map&shape_path=2015/06/23/nws_precip_1day_observed_20150623&mode=tile&tilemode=gmap&service=WMS&version=1.1.1&request=GetMap&Styles=default&SRS=EPSG:102100&width=256&height=256&format=image/PNG&TRANSPARENT=TRUE&layers=conus-raster&dpi=120&tile=3+5+4"
>>>
>>> The layer is defined in the map file like:
>>>
>>>         LAYER
>>>                 NAME 'conus-raster'
>>>                 TYPE RASTER
>>>                 STATUS DEFAULT
>>>                 PROJECTION
>>>                         "init=epsg:4326"
>>>                 END
>>>                 VALIDATION
>>>                         "shape_path"
>>> "^[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/nws_precip_.*_[a-zA-Z]+_[0-9]{8}"
>>>                 END
>>>                 DATA "/shp/ahps/%shape_path%_conus.png"
>>>         END
>>>
>>> The decision has been made to use mapcache rather than querying mapserver
>>> directly, and I've set up a source and tileset (I will include below)
>>> but I
>>> am consistently running into errors. I have tried WMS and WMTS services
>>> because I need to use a dimension to pass the shape_path variable, but
>>> if I
>>> specify tile as a dimension, the regex requires me to treat the pluses in
>>> the value as spaces, but then it passes the literal string (with pluses)
>>> to
>>> mapserver. Mapserver returns an error that there are the wrong number of
>>> coordinates, that there should be 3.
>>>
>>> Any help would be greatly appreciated, the only thing stopping me from
>>> going
>>> in and modifying the source to split on plus or space is that I wouldn't
>>> be
>>> able to recompile mapserver in our production environment.
>>>
>>> The source in my config file is:
>>>    <source name="precip_conus" type="wms">
>>>       <getmap>
>>>          <params>
>>>             <map>/map/ahps/precip.map</map>
>>>             <version>1.3.0</version>
>>>             <SRS>EPSG:3857</SRS>
>>>             <CRS>EPSG:3857</CRS>
>>>                         <SRS>EPSG:102100</SRS>
>>>                         <CRS>EPSG:102100</CRS>
>>>             <TRANSPARENT>TRUE</TRANSPARENT>
>>>             <FORMAT>image/png</FORMAT>
>>>             <LAYERS>conus-raster</LAYERS>
>>>                         <MODE>TILE</MODE>
>>>                         <TILEMODE>gmap</TILEMODE>
>>>          </params>
>>>       </getmap>
>>>       <http>
>>>          <url>url_to_mapserver</url>
>>>          <headers>
>>>             <User-Agent>mod_mapcache/r175</User-Agent>
>>>             <Referrer>url_to_mapcache</Referrer>
>>>          </headers>
>>>          <connection_timeout>10</connection_timeout>
>>>           </http>
>>>    </source>
>>>
>>> and the tileset is:
>>>    <tileset name="precip_conus">
>>>       <source>precip_conus</source>
>>>           <LAYER>conus-raster</LAYER>
>>>       <cache>precip_cache</cache>
>>>       <grid>g2</grid>
>>>       <format>PNG</format>
>>>       <dimensions>
>>>          <dimension type="regex" name="shape_path"
>>>
>>> default="2015/01/01/nws_precip_1day_observed_20150101">^[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/nws_precip_.*_[a-zA-Z]+_[0-9]{8}$</dimension>
>>>                  <dimension type="regex" name="tile"
>>> default="3+5+4">^\d{1,3}\s\d{1,3}\s\d{1,3}$</dimension>
>>>       </dimensions>
>>>    </tileset>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://osgeo-org.1560.x6.nabble.com/Communicating-Tile-Coordinates-Between-Mapcache-and-Mapserver-tp5212572.html
>>> Sent from the Mapserver - Dev mailing list archive at Nabble.com.
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5212774&i=1>
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>>
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5212774&i=2>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://osgeo-org.1560.x6.nabble.com/Communicating-Tile-Coordinates-Between-Mapcache-and-Mapserver-tp5212572p5212774.html
>>  To unsubscribe from Communicating Tile Coordinates Between Mapcache and
>> Mapserver, click here.
>> NAML
>> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> Confidential Information:
> This email message, its chain, and any attachments: (a) may include
> proprietary information, trade secrets, confidential information and/or
> other protected information ("Confidential Information") which are hereby
> labeled as Confidential for protection purposes, (b) is sent to you in
> confidence with a reasonable expectation of privacy, (c) may be protected
> by confidentiality agreements requiring this notice and/or identification,
> and (d) is not intended for transmission to, or receipt by unauthorized
> persons. If you are not the intended recipient, please notify the sender
> immediately by telephone or by replying to this message. Please then delete
> this message, any attachments, chains, copies or portions from your
> system(s). Thank you.
>
> ------------------------------
> View this message in context: Re: Communicating Tile Coordinates Between
> Mapcache and Mapserver
> <http://osgeo-org.1560.x6.nabble.com/Communicating-Tile-Coordinates-Between-Mapcache-and-Mapserver-tp5212572p5212785.html>
> Sent from the Mapserver - Dev mailing list archive
> <http://osgeo-org.1560.x6.nabble.com/Mapserver-Dev-f4252683.html> at
> Nabble.com.
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20150624/0c470740/attachment.html>


More information about the mapserver-dev mailing list