0

I have downloaded Austria official map tiles from http://www.basemap.at/index_en.html using the provided offline downloader tool. Tiles are stored in my hard disk with paths similar to /<level>/<number>/<number>.png .

I now need to create a .map configuration file for mapserver, however all I have is the GetCapabilities result from the provider: http://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml .

Being new to GIS, I am unsure about whether I can manually create a MapServer .map file from scratch based on the GetCapabilities information, or if there is any tool or approach I shall use.

What is the preferred approach to create a .map file for a given set of downloaded raster tiles?

0

Current QGIS .MAP export plugin (RT MapServer Exporter) was difficult to install on Windows 64 bit and yet, the resulting MAP file does not suit my needs.

The solution for me is to:

1) Downloaded tiles using the tool in the Basemap.AT page. Ensure you enable the checkbox in order to generate the .pgw files, which define the geographical location of each .png tile.

2) From the downloaded tiles, for each zoom level (in directories named '1', '2', '3'...), created a "tileindex" shape file (.shp) that indexes the tiles for that level. This is done using the gdaltindex tool:

gdaltindex 1.shp `find 1 -name '*.png'`
gdaltindex 2.shp `find 2 -name '*.png'`
...

3) Mapserver can use these shape files to serve a map. I manually constructed the map file. You need to define several levels and play with the MAXSCALEDENOM and MINSCALEDENOM on each level to show the appropriate tileset at the correct scale (I defined scale levels by looking at the original tileset metadata).

The resulting MapServer configuration file (.MAP) contains layers that look like:

  [...]

  LAYER # Main
    NAME         city_geoland
    TYPE         RASTER
  END # Main

  LAYER
    NAME city_geoland_5
    TYPE RASTER
    TILEINDEX "5"
    TILEITEM "LOCATION" 
    MINSCALEDENOM 8735659

    METADATA
      WMS_TITLE "City Area Basemap Level 5"
      WMS_ABSTRACT ""
      WMS_SRS "EPSG:3857"
    END 
  END  

  LAYER
    NAME city_geoland_6
    TYPE RASTER
    TILEINDEX "6"
    TILEITEM "LOCATION" 
    MAXSCALEDENOM 8735659
    MINSCALEDENOM 4367830

    METADATA
      WMS_TITLE "City Area Basemap Level 6"
      WMS_ABSTRACT ""
      WMS_SRS "EPSG:3857"
    END 
  END 

  [...]
| improve this answer | |
  • For anyone coming to this question: after having worked on this further, my preferred approach now is to use MapProxy to act as cache and offline server for maps. It seems to me far superior than manually configuring mapserver to do the same task. – jjmontes Sep 4 '15 at 9:22
0

You don't need to set up a mapserver to access the tiles.

Depending on the software you use, you can simply add the file structure. I have put together some workflows a while ago, unfortunately only in German: http://wiki.openstreetmap.org/wiki/User:Ajoessen/eigene_Tiles

For the use in QGIS, the Tile layer plugin does a better work than manipulating the Openlayers plugin as documented.

| improve this answer | |
  • Thanks. I however need a mapserver (WMS) because the map is meant to be accessed from an application that requires that protocol. – jjmontes Jul 29 '15 at 0:30

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.