# MapServer in WMS mode for geotiff folder

I spent a few days trying to configure MapServer to work as a WMS server. I have a folder full of geotiff files (454 GB total, 62 MB per file). Each raster has embedded pyramid and I generated .vrt for that set. This works in Geoserver, but performance is very poor. So now I am trying to do the same in MapServer (hopefully it will be much faster).

Serving shapefiles in MapServer works, but when I try to publish tif files, in QGIS I get this message:

Invalid Layer: WMS provider Cannot calculate extent Raster layer Provider is not valid (provider: wms, URI: contextualWMSLegend=0&crs=EPSG:3908&dpiMode=7&featureCount=10&format=image/png&layers=Urbane%20zone%202012&styles=&url=http://localhost:8181/cgi-bin/mapserv.exe?map%3DC:%5C%5Cwmstif.map

Here is my map file content:

MAP
EXTENT 6304500 4709990 6635000 5027700 #Tile Cache
TEMPLATEPATTERN "."
SIZE 512 512
MAXSIZE 8192
STATUS ON
UNITS METERS
NAME "Test map name"
IMAGETYPE AGG_PNG
OUTPUTFORMAT
NAME "AGG_PNG"
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
TRANSPARENT ON
EXTENSION "png"
END
PROJECTION
"init=epsg:3908"
END
WEB
ows_title "Zoran example"
ows_enable_request "*"
ows_srs "EPSG:3908" #Recommended
ows_abstract "This is an example WMS server from MapServer"
END
LOG "C:/ms.log"
END
LAYER
NAME "Urbane zone 2012"
STATUS ON
TYPE RASTER
UNITS METERS
DATA "F:\geoserver_data\data\urbane_zone\index.vrt"
ows_title "Urbane zone 2012"
ows_abstract "rezolucija 25 cm"
wms_extent "6304500 4709990 6635000 5027700" #Can use the map level extent values
END
TEMPLATE "blank.html"
END
END


In QGIS I tried "Ignore axis orientation" options, but it doesn't help.

I am running MapServer on Windows Server 2012 R2, SSD disk, CPU i7-4790K, RAM 32GB. Raster files are on WD 3TB Green HDD.

• Why don't you put a PROJECTION for the layer? – juminet Jun 30 '17 at 10:41
• I added PROJECTION "init=epsg:3908" END to the layer, but still same error – Zoran Petrović Jun 30 '17 at 10:48
• Using VRT in GeoServer is very slow, because it is not a native implementation, but uses GDAL reader. You could try to use the Imagemosaic extension which should be very good in your case. docs.geoserver.org/stable/en/user/data/raster/imagemosaic/… – pLumo Jun 30 '17 at 11:49
• Do GetCapabilities and include the part about layer "Urbane zone 2012". BTW. while layer names with spaces are valid in WMS they tend to make trouble sometimes. – user30184 Jun 30 '17 at 11:50
• @RoVo, this is MapServer even your comment about VRT is right. With small number of files it is OK but the native way in MapServer is to use tileindex. – user30184 Jun 30 '17 at 11:52