Steve.Toutant | 26 Mar 14:19 2015

ms7 How to use FILTER

I'm confused on how to use FILTER when datasource is postgis or Oracle Spatial (Native Connection)

In an old thread, I was told to not use FILTER, but use a WHERE clause in the Data statement.
In the ms7 Mapfile-Layer-Data doc, I see for Oracle
"Note that there are important performance impacts when using spatial subqueries however. Try using MapServer’s FILTER whenever possible instead."

I remember I had a bug with MS6 when using FILTER using WFS. A getfeature on the layer with a spatial or logical filter, the FILTEr in the mapfile was overwritten.

Please, how should we define/use FILTER int a mapfile with postgis and also oracle (using native connection, not ogr)?


mapserver-users mailing list
mapserver-users <at>
rishi | 26 Mar 04:55 2015

setting zoomand map center by default

hi all

iam displaying my map layer on the google map. it is working but the map layer is very small and also it is not center.plz tell me how to do this using open layers.
mapserver-users mailing list
mapserver-users <at>
Martin Ouellet | 25 Mar 21:38 2015

passing parameter to a OGRVRTDataSource layer

Hi all,
I'm using the virtual plugin of OGR to consume a web service who return CSV coordinates and mapserver is able to draw the points without any problems.

The connection definition in my mapfile is something like this.
CONNECTION "<OGRVRTDataSource><OGRVRTLayer name='select'><SrcDataSource>CSV:/vsicurl/http://<my server>/service.php</SrcDataSource><GeometryType>wkbPoint</GeometryType><SrcLayer>select</SrcLayer><LayerSRS>WGS84</LayerSRS><GeometryField encoding='PointFromColumns' x='PHOTO_LONGITUDE' y='PHOTO_LATITUDE'/></OGRVRTLayer></OGRVRTDataSource>"

I would like to pass arguments to that CONNETION string so I could build dynamic request.  something like this
CONNECTION "<OGRVRTDataSource><OGRVRTLayer name='select'><SrcDataSource>CSV:/vsicurl/http://<my server>/service.php?param1=%PARAM1%&amp;param2=%PARAM2%</SrcDataSource><GeometryType>wkbPoint</GeometryType><SrcLayer>select</SrcLayer><LayerSRS>WGS84</LayerSRS><GeometryField encoding='PointFromColumns' x='PHOTO_LONGITUDE' y='PHOTO_LATITUDE'/></OGRVRTLayer></OGRVRTDataSource>"

I know the argument values (in my example PARAM1 and PARAM2) are OK because I'm seeing them in the error message thrown by mapserver (see below).  But mapserver refuse to render the points:

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "">
<ServiceExceptionReport version="1.1.1">
msDrawMap(): Image handling error. Failed to draw layer named &#39;photo_ownedby_all&#39;.
msOGRFileNextShape(): OGR error. Failed to find layer &#39;select&#39; on datasource &#39;CSV:/vsicurl/http://<my server>/geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011&amp;PARAM2=63.97980162961738%2C-43.587402343750284&#39;.

Strangely, if I copy paste this url in the browser, the web service is returning valid csv data:
http://<my server>/geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011&amp;ur=63.97980162961738%2C-43.587402343750284
PHOTO_LATITUDE,PHOTO_LONGITUDE 48.8099315451953,-77.0906915758454 48.8119226339273,-77.123176861499 48.8139039864207,-77.1556648776822 48.8158756013937,-77.1881556113468 48.8178374775437,-77.2206490494331 48.8171607148511,-77.2546364217682 48.8164732928131,-77.2886228129866 48.8157752119077,-77.3226082078249 48.815066472652,-77.356592590973

any thoughts?

mapserver-users mailing list
mapserver-users <at>
TallDragon | 25 Mar 14:53 2015

Newbie problem: mapfile for wgs84 based on epsg:28992

Sorry, but after weeks of reading and trying solutions, I really need some
help. I have a shapefile in RD New Amersfoort. I understand that there are a
lot of problems with the conversion, however my mapserver output is empty
and stays empty for weeks now.

Can someone please get me in the right direction for this? My map file is
  NAME           EHAM
  EXTENT         4.70774 52.28803 4.80941 52.36267
  SIZE           1400 900
  SHAPEPATH      "/var/maps/eham"
  IMAGECOLOR     255 255 255


  CONFIG "MS_ERRORFILE" "/home/andre/log/mapserv.txt"
      LAYER # Groen
    NAME         groenvoorziening
    DATA         groen
    STATUS       ON
    TYPE         POLYGON

        "wms_srs" "EPSG:28992 EPSG:4326"
#      "proj=sterea"
#      "lat_0=52.15616055555555"
#      "lon_0=5.38763888888889"
#      "k=0.9999079"
#      "x_0=155000"
#      "y_0=463000"
#      "ellps=bessel"
#      "units=m"
#      "no_defs"
#    END

      NAME       GROEN
        COLOR        232 232 232
        OUTLINECOLOR 32 32 32
  END # States polygon layer ends here


the call to
http://localhost/cgi-bin/mapserv? gives an
empty map

View this message in context:
Sent from the Mapserver - User mailing list archive at
mapserver-users mailing list
mapserver-users <at>

scott159 | 24 Mar 08:07 2015

- Mapserver 7

Is there a date to next beta or release ?
mapserver-users mailing list
mapserver-users <at>

rishi | 20 Mar 13:43 2015

display only one district

Hi all
Iam using Postgres database to diasplay districts on the google map

It is working.
But now i want to display only one district instead of 50.
In my database there are 50 districts data, but i want to display only one.
And also i have to use the same mapfile in to 3 projects, in one project all the districts has to be displayed and in one project only one district has to be display.

How to do this
plz send me the code
mapserver-users mailing list
mapserver-users <at>
Passmore, James H. | 19 Mar 11:59 2015

Re: Is there a way to convert a QGIS layout

Message: 4
Date: Thu, 19 Mar 2015 08:32:34 +0000
From: "Rahkonen Jukka (MML)" <jukka.rahkonen <at>>
To: "b.j.kobben <at>" <b.j.kobben <at>>,
        "mapserver-users <at>" <mapserver-users <at>>
Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout
        into a ".map" file?
        <d2d80a25ab9a410ba05a8835e2c1a07f <at> C119S212VM022.msvyvi.vaha.local>

The SLD output of QGIS can be good but I am not so sure how good Mapserver is with importing SLD. That could be
tested through WMS GetMap and &SLD= or with &SLD_BODY= but there is no tool for converting SLD into layer
styles as text which could be saved and used in static mapfiles, or is there?

MapServer handles application of external SLD just fine.

Original styling:,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&LAYERS=UKCoShelf_BGS_1M_SBS&

External SLD styling:,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&

Not sure if this is what you meant though?


This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information
Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt
from release under the Act. Any material supplied to NERC may be stored in an electronic records
management system.
mapserver-users mailing list
mapserver-users <at>

Christian Braun | 19 Mar 11:23 2015

WFS 1.1.0 Axis order in returned data for German GK

Dear all,
I am facing a serious problem with Mapserver (both 6.2 and 6.4.1) and data retrieval via WFS 1.1.0.
We have a client running which is taking the data as GML and importing it into GRASS. The switched order of axis makes it impossible to overlay and thus process data.

The following request gets back data in yx axis order:


I wonder if this is a bug or feature due to the WFS 1.1.0 axis order specification?

If I send the same request to a instance of Geoserver, what I get back is xy axis order:


I also found the master thesis of Weichand [1] where in Section 4.3.5 he is describing this issue as well. But Geoserver has a mechanism to treat EPSG:31467 as xy. The correct order of the CRS (by definition) is yx, but this is not used like that in Germany.

Can you give any ideas about the behaviour of Mapserver and how to get around this axis order issue?

Christian Braun

Luxembourg Institute of Science and Technology (LIST)
Environmental Research and Innovation (ERIN) Department
41, rue du Brill
L-4422 Belvaux

Tel: +352 42 59 91 - 6608
Fax : +352 275 885
E-mail : christian.braun <at>

mapserver-users mailing list
mapserver-users <at>
Michael Kleih | 18 Mar 08:47 2015

Is there a way to convert a QGIS layout into a ".map" file?

Hello all,
I am using Mapserver since nearly 20 years and like it a lot.
QGIS is getting better and better and it would be nice to layout a map 
in QGIS and then convert it to a ".map"-file to be used with Mapserver. 
Does anybody know if this is possible?

Thanks to all,
mapserver-users mailing list
mapserver-users <at>

Ahmed Aboulenein | 17 Mar 15:18 2015

Best integration with dynamic map information


We serve traffic lines that gets updated every 5 minutes from our feeds. We would like to use Map Server to generate transparent tiles showing colored polylines of the traffic.

I am newbie to Map Server, I got the server and workshop running and also I think I have some good understanding of the map file and layers concept. I have a question about integrating our traffic information as a data source to the MapServer.
Important aspects for us:
1. Performance: since we are updating large areas every 5 minutes. We will need throughput like 10K images per second. Does this sound okay?
2. Threads safety: my concern what happens if while updating the source, the MapServer is actually rendering an image from old data. Any locks?

I understand our options are:
1. Data files: such as shape files or KML files.
2. Database: PostGIS for example.
3. Service that pulls data: WMS server - I didn't dig much here.

Thanks in advance for your help, some pointers or information to go further.

Best regards,
mapserver-users mailing list
mapserver-users <at>
Karma Kolabor | 17 Mar 01:23 2015

Rendering OSM Data on Ubuntu 14.04 ?


I found this [1] wiki page about Rendering OSM data on Ubuntu 12.04 -
well, now I would like to ask if these instructions are still valid
for Ubuntu 14.04 or if I will run into problems following that guide?

Also I would like to ask: does exist some script (or some recipe for
any configuration management system) that automates the steps
described in the wiki page, what would make it possible to set this up
without too many options for errors?

Thank you very much for your attention,

mapserver-users mailing list
mapserver-users <at>