Dietmar Stolz | 27 Jun 15:35 2014

KML output with blank point bitmaps

Dear list,

my kml output basically works.
Everything works fine with line and polygon type, I get correct kml files.
Point layers works also but mapserver generated blank png's.

The bitmap exist in the right directory with the right size.
The url path in the kml file is right.
I can see the kml point layer in the gis, the points have tooltips and 
are clickable.
The bitmaps have 24 bpp.
Pixmap or vector layer symbols makes no difference.

Debug 5 shows no error and no kml specific information.

MapServer version 6.4.1 on windows 7 64 bit

Any ideas?

Thank you
mapserver-users mailing list
mapserver-users <at>

Stefanos Anastasiou | 27 Jun 15:29 2014

Permission settings on htdcos

Hello list..!

I'm just trying to load a simple shapefile in the browser. Both mapfile and template are located in /home/mapdata. When I try to browse: I get the error that says:  "msSaveImage(): Unable to access file. Failed to create output file".

I presume that it has to do with the permission settings in tmp folder in htdcocs. As far as I know it's not a good idea giving permission 666 or 777 to htdocs.  So should I handle this ? 
mapserver-users mailing list
mapserver-users <at>
Oliver Christen | 27 Jun 09:27 2014

symbol rotation follow map rotation ?

dear list

Observed using mapserver 6.0.1, I have noticed that symbol rotation 
doesn't seem to follow map rotation, ie. the symbols keep the same 
absolute angle whatever the map angle is.
I have the feeling this is a current limitation of Mapserver, as it 
doesn't know if the symbol angle is an absolute value (independent of 
the map angle) or relative (map angle should be added to symbol angle).

example here:

no map rotation (signs symbols with angle aligning them with the streets):

with map rotation (signs symbols have kept their initial angle and are 
not aligned

could someone confirm or infirm?

In my opinion I would prefer a relative angle calculation by default, 
but that's just me :)

thanks for reading
kind regards


Camptocamp SA
Oliver Christen
CH-1015 Lausanne

+41 21 619 10 23 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)

mapserver-users mailing list
mapserver-users <at>

Carlos Ruiz | 26 Jun 17:24 2014

Re: color attribute question

To achieve more flexibility as you want, you have to code a function with PL/pgSQL in PostgreSQL or with
PHP/Python/Java/C# with Mapscript to define which is the base color (red, green, blue, yellow ...) and
then to calculate the percent in the right RGB channel.


Mtro. Carlos Ruiz

On Mon, 6/23/14, Do Wi <dowi84 <at>> wrote:

 Subject: Re: [mapserver-users] color attribute question
 To: "Carlos Ruiz" <boolean10001 <at>>
 Date: Monday, June 23, 2014, 2:56 PM

 thanks allot!
 Steve and another user here mentioned this path
 and it did work!only problem is that it cannot be
 changed later if for example the user chooses a blue

 how will i go about doing it with
 maybe it relates to my question here

 thanks allot!dovi

 On Mon, Jun 23, 2014
 at 6:13 PM, Carlos Ruiz <boolean10001 <at>>

 you want to do this without using mapscript, you can pull
 the gradient calculation as an attribute from your data

 ALTER TABLE mytable ADD COLUMN gradient_color
 UPTATE mytable SET gradient_color = floor(gradient *
 255)::text || ' 0 0';


  Mtro. Carlos Ruiz


 On Monday, June 23, 2014 4:59 PM, "Lime, Steve D
 (MNIT)" <Steve.Lime <at>>



 You can compute a color
 string using PostgreSQL string functions: 
   SELECT percentage ||
 ‘ 0 0’ AS color FROM … 
 From: mapserver-users-bounces <at>
 [mailto:mapserver-users-bounces <at>]
 On Behalf Of Do Wi

 Sent: Sunday, June 22, 2014 3:50 PM

 To: mapserver-users <at>

 Subject: [mapserver-users] color attribute



 i have this

 i have a column in my
 postgis table which contains a double representing a


 i want to color my
 polygons in a gradient fashion based on that


 the docs states three
 ways to specify color: 

 1. three [1-255]

 2. hex



 but the attribute must
 be a string by itself in the same format as options 1 or


 how can i achieve
 something like  


 COLOR [percentage]*255 0


 COLOR [percentage] 0

 if percentageis already


 for a red gradient for




 mapserver-users mailing list
 mapserver-users <at> 
mapserver-users mailing list
mapserver-users <at>
Størner.Henrik Juul HSO | 26 Jun 13:03 2014

Mapcache on Windows with IIS - any binaries available?



I am trying to setup a mapserver+mapcache installation on Windows 2012, using IIS as the webserver.


(The powers that be insist on trying it on Windows before doing it on Linux…)


I’ve found the mapserver binaries on, and have mapserver working in FastCGI mode on IIS. So I’d like to add mapcache to the software stack, but it isn’t included in the package. I have seen Paul James’ message that building and running it is possible - but I don’t have Visual C available.


So I guess what I am really asking for is: Is there a precompiled binary of mapcache for Windows x64 available anywhere?


Thanks in advance.



Best regards / Venlig hilsen


Henrik Juul Størner, Servicearkitekt


 Application Technology


Lautrupparken 40-42, DK-2750 Ballerup

Direkte +4544604433 Mobil +4591375751

Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svarfunktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selvom e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse med at modtage og bruge e-mailen.

Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or it-system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message.

mapserver-users mailing list
mapserver-users <at>
Basques, Bob (CI-StPaul | 25 Jun 16:11 2014

PDF output and file naming (.pdf)


I got the PDF output to work, but the outputted file ends up being output as <some_name>.map.

I'm using CGI (streaming result?) with map.imagetype=pdf, the result is indeed a PDF, but with a .map file name.

I tried setting  EXTENTION "pdf" and MIMETYPE "application/x-pdf" inside of FORMATOPTION to no effect as far as the file name tag.  Do I maybe need to output temporarily to a server location (WEB) for subsequent download?


mapserver-users mailing list
mapserver-users <at>
Travis Kirstine | 25 Jun 15:17 2014

MapCache inverted Y values

I just configured mapcache using a grid using 512 512 size.  Everything seems OK however when I view the resultant tilesets in the demo map viewer they have a inverted Y value, the latitudes are negative values when they should be positive.  Do I need to create a custom cache to handle tile sizes other that 256?

   <grid name="gmaps_512">
      <extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>
      <size>512 512</size>
      <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.29858214173896975 0.149291070869484875 0.0746455354347424375</resolutions>

   <cache name="disk" type="disk">

  <tileset name="default_512">
    <metatile>2 2</metatile>

  <source name="default_wms" type="wms">


Travis Kirstine
First Base Solutions Inc.
140 Renfrew Dr. | Suite 100 | Markham, ON | L3R 6B3
p. 905-477-3600 ext. 301 | m. 647-534-4798
mapserver-users mailing list
mapserver-users <at>
Malm Paul | 25 Jun 07:36 2014

Map data strategy


I’ve just started using Mapserver and have a question, that could help me to cut corners.


1)      I have a lot of S57 charts in different scale groups 1-6.

2)      It should be simple to maintain the map data (a lot of upgrades).

3)      Of course, it should be fast.


Strategy of today:

I have the original data stored in the original format on ram disk. I have one map file that INCLUDEs all “layer” files (one per chart).

The layer files defines the all the interesting chart features (layers) and the max scale.

I was thinking that I only shall use max scale, not min scale, because if I don’t have a chart with a larger scale a certain position when I zoom in, then I shall at least see a chart. Even if has a to small scale for this zoom. I don’t have any spatial restrictions on each layer or layer file, just for the map file -90, -180, 90, 180 (i.e no limits)

Is it possible to have spatial limitations on a layer?


When I use this strategy the map server chokes then I zoom in too much.


I can see that the map configuration could be done in a lot of different ways,

How would your strategy be?


Kind regards,



mapserver-users mailing list
mapserver-users <at>
Kalbermatten Michaël | 24 Jun 17:02 2014

SIZEUNITS set to meters

Hi list,


I'm trying to render a road given a certain width in meters.


To achieve that, I did use SIZEUNITS METERS in the LAYER definition.


I'm using this layer via WMS in QGIS. At small scales (1:10'000), this is working great, the roads is well-sized regarding its real width, but as soon as I zoom in and have a larger scale then approximately 1:5'000, then this is not working anymore and the line width stays constant the more I zoom in.


I'm using MapServer 6.0.3. I did partially copy the mapfile content hereunder.


I think that I tried almost every possible parameter combination (like using MINSIZE, MAXSIZE, MINWIDTH, and so on), but nothing seems to work…


Did anyone ever encounter that issue ? Am I doing sometime wrong ?


Best regards




    NAME "… "


    EXTENT 400000 100000 800000 300000


    IMAGETYPE "png"

    MAXSIZE 5120








        NAME "…."

        TYPE LINE


            "wms_srs"             "EPSG:21781"

            "wms_title"           "…."


        STATUS ON


        CONNECTION "…."


        DATA "geom from …. using unique idobj using srid=21781"

        TEMPLATE "foo"




        CLASSITEM "objektart"





            NAME "Road"

            EXPRESSION "Road"


                COLOR 255 0 0

                WIDTH 40





mapserver-users mailing list
mapserver-users <at>
Stefanos Anastasiou | 24 Jun 16:23 2014

htdocs settings and mapfile status

Hi list.  I have two questions that are confusing me a little bit.
First of all I am keeping all my HTML template files /usr/local/apache2/htdocs.  This folder has read-only permission settings by default so every time I want to edit/create a template I use nano or pico through terminal with root privileges. So, would it be wise (would it be secure?) to make htdocs folder have read/write permission and if not what other way is there so I can edit/make template files easily? 

Another question is that when I make my mapfile and set STATUS to default everything works fine. But when it's set to on I get a blank page (needless to mention about STATUS off). That's not normal right?
mapserver-users mailing list
mapserver-users <at>
Krishna Priya Patury | 24 Jun 15:30 2014

Re: PostGIS Connection Failure

Hi All,
Any other ideas?
The map server application installed outside of my Centos VM can connect to the Postgres database on the VM. I can also connect to the database both from within and outside the VM using psql.
I believe the Mapserver installation on my VM is fine too as my shp2img and running the mapserver through command line work just fine. The issue is only when I try to connect to the database through the application from my VM.
I do not see anything additional in the logs. I can see that the database logs are not updated when I hit it though the application within the VM, understandably so with the error message in the browser.
The only difference between running shp2img and the application is perhaps the user? I was able to open a succesful connection through psql as an 'apache' user as well(User which is running the Apache server). So am not sure what is missing.

On Mon, Jun 23, 2014 at 5:24 PM, Krishna <krishna.patury <at>> wrote:
Yes I can connect to Postgres using the same connection information through psql both from within and outside my vm.

Sent from my iPhone

> On Jun 23, 2014, at 5:20 PM, Paul Ramsey <pramsey <at>> wrote:
> Did you restart your postgresql after making the changes to pg_hba and postgresql.conf? Can you telnet to port 5432? Can you connect with psql? Just ignore mapserver for now, you have a connection issue.
> P.
> --
> On June 23, 2014 at 2:17:19 PM, Krishna (krishna.patury <at> wrote:
>>> As I mentioned I have disabled the firewall. Or so I think. When
>> I login as 'root' and click firewall it says disabled. Any way
>> I can confirm/ test this?

mapserver-users mailing list
mapserver-users <at>