4

I am using mapcache for caching map raster data. Everything works fine except the map zooming, because at the some zoom level i am getting pink tiling images. <code>enter image description here</code> This is my mapcache xml file:

<?xml version="1.0" encoding="UTF-8"?>
<mapcache>
   <cache name="disk" type="disk">
      <base>C:/ms4w/tmp/ms_tmp/cache</base>
      <!--<symlink_blank/>-->
   </cache>

  <grid name="GDA94Z56" minzoom="20" maxzoom="1">
      <extent>7442400 4801518 7499100 4861481</extent>
      <srs>EPSG:3909</srs>
      <srsalias>EPSG:3909</srsalias>
 <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.2985821417389698 0.1492910708694849 0.0746455354347424 0.0373227677173712  0.0173227677173712</resolutions>
      <units>m</units>
      <size>256 256</size>
    </grid>

   <cache name="tiff" type="tiff">
      <template>C:/ms4w/tmp/ms_tmp/cache/{tileset}/{grid}/L{z}/R{inv_y}/C{x}.tif</template>
      <xcount>64</xcount>
     <ycount>64</ycount>
     <!-- <format>myjpeg</format> -->
   </cache> 

<source name="ms4wserver" type="wms">
  <http>
    <url>http://127.0.0.1:80/cgi-bin/mapserv.exe</url>
  </http>
  <getmap>
    <params>
      <map>D:\Mapserver\ortophoto.map</map>
      <layers>ortophoto</layers>
    </params>
  </getmap>
</source> 

<tileset name="test">
  <source>ms4wserver</source>
  <cache>disk</cache>
  <grid>GDA94Z56</grid>
  <format>PNG</format>
  <metatile>5 5</metatile>
  <metabuffer>15</metabuffer>
  <expires>3600</expires>
  <default_format>JPEG</default_format>
  <service type="wms" enabled="true"/>
<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>C:/ms4w/tmp/ms_tmp/cache</lock_dir>

</mapcache>

What I am doing wrong?

This is map file :

MAP
  DEFRESOLUTION 96
  EXTENT 2313390 5410266 2313545 5410368
  FONTSET "C:\\Program Files (x86)\\MapManager\\templates\\font.list"
  IMAGETYPE "png24"
  NAME "MS"
  RESOLUTION 96
  SHAPEPATH ""
  SIZE 1381 905
  STATUS ON
  SYMBOLSET "C:\\Program Files (x86)\\MapManager\\templates\\symbols.sym"
  UNITS METERS

  OUTPUTFORMAT
    NAME "png24"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

  OUTPUTFORMAT
    NAME "print"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

  PROJECTION
    "init=epsg:3857"
  END # PROJECTION



  WEB
    METADATA
      "distance_units"  "MS_METERS"
      "mapmanager_version"  "1.0.0.0"
      "ows_enable_request"  "*"
      "ows_srs" "EPSG:3909"
    END # METADATA
  END # WEB

  LAYER
    COMPOSITE
      OPACITY 73
    END # COMPOSITE
    DATA "D:\\orto\\ortophoto40.vrt"
    EXTENT 7443750 4802999 7497750 4859999
    METADATA
      "coordsys_name"   "+init=epsg:3909"
    END # METADATA
    NAME "ortophoto"
    OFFSITE 0 0 0
    PROJECTION
      "init=epsg:3909"
    END # PROJECTION
    STATUS ON
    TILEITEM "location"
    TYPE RASTER
    UNITS METERS
  END # LAYER

END # MAP

EDIT: This is the definitely problem on the mapserver side not on mapcahce. When I try to use this WMS in QGIS at from the zoom level 2524 I am getting next error:

server replied: Internal Server Error url:http://127.0.0.1/cgi-bin/mapserv.exe?map=D:\Mapserver\ortophoto.map&&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=7471878.024509754032,4843336.734027991071,7472385.57305229269,4843533.069678191096&SRS=EPSG:3909&WIDTH=972&HEIGHT=376&LAYERS=ortophoto&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE]

  • 1
    Usually pink tiles mean that MapCache did not get response from the backend WMS server. Because it seems to be your own MapServer you can have a look at the access.log and check a) if MapCache is sending GetMap requests and b) if there happens some error on the MapServer side. – user30184 Nov 17 '17 at 7:53
  • Is there a minimum zoom level in your Mapserver raster? – Gob Tron Nov 18 '17 at 2:00
  • I update my question with map file content. How I can see is there zoom level limit? – Nia Kovac Nov 18 '17 at 11:28
  • Maybe you could take a look at the Mapserver logs right after you try to zoom to the level where it fails. But first, see this link to set the debug level of the map file: mapserver.org/optimization/… – Gob Tron Nov 19 '17 at 23:50
  • I set the debug in map file but there is no log after I zoom to the lowest level. There is only log when raster is visible – Nia Kovac Nov 20 '17 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.