Re: [mapserver-users] Min/max pixelsize vs. min/max scaledenom

2013-08-28 Thread Frank Broniewski

Hey there,

yes, that's me again :-)
I'm currently poking around in map rendering software like mapserver and 
mapnik. I'd like to find out how I can organize my map publishing scheme 
most efficiently. It seems I'm hitting the same spot with all rendering 
softwares.


I wrote my mapserver question Thomas refers to, to the mapserver-dev 
list because I thought this would be a more appropriate place than the 
general user list. So I guess it didn't trigger that much attention ...


BTW. I created a google spreadsheet [1] for calculating a scale based on 
a desired meter / pixel value. Probably very trivial but maybe helpful 
in some situations ...



[1] 
https://docs.google.com/spreadsheet/ccc?key=0ArIoTsX_X90tdFRLQzI5MlRVUXk3NFdfM3dNdE1wYmcusp=sharing




Am 2013-08-27 13:14, schrieb thomas bonfort:

Jukka,
I would say that Frank also raised this issue on the mapserver list
[1]. Am I mistaken or is your request identical?

regards,
thomas

[1] http://osgeo-org.1560.x6.nabble.com/Scales-and-raster-maps-td5071674.html

On 27 August 2013 12:49, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote:

Hi,

Frank Broniewski wrote the following question to the Mapnik users list a few 
hours ago and I started to think that I would like to have such min/max 
pixelsize setting in Mapserver.  I can simply get the native pixel size of our 
maps with gdalinfo or something and I can estimate that when I am showing a 
topographic map with 1 m native pixel size on the screen the texts are readable 
and map looks good approximately at resolutions between 0.75 - 1.5 m/pixel. Now 
it would be nice to write into mapfile the scale range as
MINPIXELSIZE 0.75
MAXPIXELSIZE 1.5

I know that scale in Mapserver is based on a resolution on 72 dots per inch and that inch 
is 0.0254 meters and I can calculate that the native resolution of the map expressed as 
one image pixel drawn as one dot on the 72 DPI screen means scale of 
1:2836.65 and that I can write my good resolution range in a mapfile as
MINSCALEDENOM 2126
MAXSCALEDENOM 4252.

However, as Frank Broniewski writes, OpenLayers and tile cache programs like MapCaceh, 
MapProxy and GeoWebcache are configured by using units per pixel.  Why not to 
let Mapserver users use the same system in mapfile as an alternative for 
minscaledenom/maxscaledemon?

And this is what Frank wrote

 Hi all,

is it possible to use a resolution parameter (meter / pixel, that what 
map.scale() outputs) instead of Min/Maxscaledenominator? That would be really 
helpful in order to arrange map styles between different software.

Let's say I'm creating a map with a number of zoom levels and on each zoom level I'm 
changing the map, doing generalization or displaying more detail. The map is planned 
to be used in a web context with the Javascript OpenLayers Map library. Inbetween 
there is a proxy software like Mapproxy. Both OpenLayers and Mapproxy understand the 
principle of resolutions, ie natural distances per pixel. So I can define my map in 
OpenLayers with a list of resolutions like [500, 200, 100, etc.]. I can continue to 
use this list in Mapproxy so that each resolution matches a certain map layout. 
Unfortunately this breaks now because Mapnik uses scales in correlation with the dpi 
setting.

-Jukka Rahkonen-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users





--
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Point and radius features [SEC=UNCLASSIFIED]

2013-08-28 Thread Kathleen Hirst
Dear List,

I'm using MapServer to show a point and a radius (in kilometres) from the same 
point as part of the GetMap request

I'm using the following:

map.layer[location]=map.layer[location]=FEATURE+POINTS+144.97+-37.81+END+TEXT+'Melbourne'+END+END

map.layer[radius]=FEATURE+POINTS+144.97+-37.81+END+END
map.layer[radius].class[0].style[0]=SIZE+40+END+END
map.layer[radius].class[0].style[1]=SIZE+40+END+END

The layer, radius configuration is shown below, where the size of the symbol is 
half the size of the radius. The map projection is EPSG:4283. The circle drawn 
for the radius does not seem accurate eg for a 20 km radius, it is about 1.1 km 
out.  Is there a better way to do this? Eg using type CIRCLE. Any help would be 
appreciated.

LAYER
   STATUS ON
   NAME radius
   TEMPLATE  /web/etc/ws/gis/mapserver/query_templates/generic_empty.html
   TYPE POINT

   SIZEUNITS KILOMETERS

   CLASS
 NAME Search radius
STYLE
   SYMBOL circle_ol
   COLOR 198 134 0
 END
 STYLE
   SYMBOL cross
   COLOR 198 134 0
   WIDTH 0.1
 END
  END

..
END

Thanks

Kathleen
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] overlaysymbol depreciated?

2013-08-28 Thread andy

My current maps have railroads displayed like this:

CLASS
NAME 'Railroad'
SYMBOL 'circle'
COLOR 0 0 0
SIZE 1
OVERLAYSYMBOL 'railway'
OVERLAYCOLOR 0 0 0
OVERLAYSIZE 7
STYLE
GAP -25
END
END

Which works.  But OverlaySymbol and friends don't seem to be documented. 
 Did they go away at some point?  What should I be using instead?


Thanks,

-Andy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] overlaysymbol depreciated?

2013-08-28 Thread andy
It still draw's correctly, so I'd say its still in the code (I'm running 
6.2.1).


Reading: http://mapserver.org/mapfile/symbology/construction.html

it looks like I want have multiple SYLE's listed.  Something like:

CLASS
NAME 'Railroad'
STYLE
SYMBOL 0
COLOR 0 0 0
SIZE 1
END
STYLE
SYMBOL 'railway'
COLOR 0 0 0
SIZE 7
GAP -25
END
END

Yes?

-Andy


On 8/28/2013 9:25 AM, thomas bonfort wrote:

They've been deprecated ages ago... not sure when and if they were
actually removed completely...

CLASS
 NAME 'Railroad'
 STYLE
   COLOR 0 0 0
   WIDTH 1
 END
 STYLE
   SYMBOL 'railway'
   COLOR 0 0 0
   SIZE 7
   GAP -25
 END
END

On 28 August 2013 16:15, andy a...@squeakycode.net wrote:

My current maps have railroads displayed like this:

CLASS
 NAME 'Railroad'
 SYMBOL 'circle'
 COLOR 0 0 0
 SIZE 1
 OVERLAYSYMBOL 'railway'
 OVERLAYCOLOR 0 0 0
 OVERLAYSIZE 7
 STYLE
 GAP -25
 END
END

Which works.  But OverlaySymbol and friends don't seem to be documented.
Did they go away at some point?  What should I be using instead?

Thanks,

-Andy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] overlaysymbol depreciated?

2013-08-28 Thread thomas bonfort
They've been deprecated ages ago... not sure when and if they were
actually removed completely...

CLASS
NAME 'Railroad'
STYLE
  COLOR 0 0 0
  WIDTH 1
END
STYLE
  SYMBOL 'railway'
  COLOR 0 0 0
  SIZE 7
  GAP -25
END
END

On 28 August 2013 16:15, andy a...@squeakycode.net wrote:
 My current maps have railroads displayed like this:

 CLASS
 NAME 'Railroad'
 SYMBOL 'circle'
 COLOR 0 0 0
 SIZE 1
 OVERLAYSYMBOL 'railway'
 OVERLAYCOLOR 0 0 0
 OVERLAYSIZE 7
 STYLE
 GAP -25
 END
 END

 Which works.  But OverlaySymbol and friends don't seem to be documented.
 Did they go away at some point?  What should I be using instead?

 Thanks,

 -Andy
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] shptree command does not change .qix 'date modified' when re-run?

2013-08-28 Thread Robert R. Raiz
Hello,

A thing I noticed today is that when I run the shptree command on a
shapefile that already has a .qix file, a simple ls -l command shows the
old date of the file, it does not see it as being replaced. Is anyone
familiar with this behavior?

I am not sure if it replaces the file or not.

-- 
*Raiz Roland Robert*
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] shptree command does not change .qix 'date modified' when re-run?

2013-08-28 Thread Lime, Steve D (MNIT)
Working as expected on SuSE 11, I see the timestamp change. I did notice that 
the utility doesn't produce an error if it can't create the file for some 
reason (I tested with permissions), it just fails silently. Maybe you're 
running into that?

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert R. Raiz
Sent: Wednesday, August 28, 2013 10:36 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] shptree command does not change .qix 'date modified' 
when re-run?

Hello,

A thing I noticed today is that when I run the shptree command on a shapefile 
that already has a .qix file, a simple ls -l command shows the old date of the 
file, it does not see it as being replaced. Is anyone familiar with this 
behavior?

I am not sure if it replaces the file or not.

--
Raiz Roland Robert

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Min/max pixelsize vs. min/max scaledenom

2013-08-28 Thread Rahkonen Jukka
Hi,

Your spreadsheet may be trivial but still was useful. I had used resolution of 
72 DPI in my scale-to-pixel-size conversion because I had understood that it is 
what Mapserver is using when it calculates the WMS scalehint. But now I see 
that when playing with min/maxscaledenominators the screen pixel size of 0.28 
mm is used which makes 91 DPI. Could someone who knows the Mapserver code say 
the final word and verify that scaledenominator 3.571,4286 is producing 1 metre 
pixels?

-Jukka Rahkonen-


Frank Broniewski wrote:

 Hey there,

 yes, that's me again :-)
 I'm currently poking around in map rendering software like mapserver and
 mapnik. I'd like to find out how I can organize my map publishing scheme
 most efficiently. It seems I'm hitting the same spot with all rendering
 softwares.

 I wrote my mapserver question Thomas refers to, to the mapserver-dev
 list because I thought this would be a more appropriate place than the
 general user list. So I guess it didn't trigger that much attention ...

 BTW. I created a google spreadsheet [1] for calculating a scale based on
 a desired meter / pixel value. Probably very trivial but maybe helpful
 in some situations ...


[1]
https://docs.google.com/spreadsheet/ccc?key=0ArIoTsX_X90tdFRLQzI5MlRVUXk3NFdfM3dNdE1wYmcusp=sharing



Am 2013-08-27 13:14, schrieb thomas bonfort:
 Jukka,
 I would say that Frank also raised this issue on the mapserver list
 [1]. Am I mistaken or is your request identical?

 regards,
 thomas

 [1] http://osgeo-org.1560.x6.nabble.com/Scales-and-raster-maps-td5071674.html

 On 27 August 2013 12:49, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote:
 Hi,

 Frank Broniewski wrote the following question to the Mapnik users list a few 
 hours ago and I started to think that I would like to have such min/max 
 pixelsize setting in Mapserver.  I can simply get the native pixel size of 
 our maps with gdalinfo or something and I can estimate that when I am 
 showing a topographic map with 1 m native pixel size on the screen the texts 
 are readable and map looks good approximately at resolutions between 0.75 - 
 1.5 m/pixel. Now it would be nice to write into mapfile the scale range as
 MINPIXELSIZE 0.75
 MAXPIXELSIZE 1.5

 I know that scale in Mapserver is based on a resolution on 72 dots per inch 
 and that inch is 0.0254 meters and I can calculate that the native 
 resolution of the map expressed as one image pixel drawn as one dot on the 
 72 DPI screen means scale of 1:2836.65 and that I can write my good 
 resolution range in a mapfile as
 MINSCALEDENOM 2126
 MAXSCALEDENOM 4252.

 However, as Frank Broniewski writes, OpenLayers and tile cache programs like 
 MapCaceh, MapProxy and GeoWebcache are configured by using units per 
 pixel.  Why not to let Mapserver users use the same system in mapfile as an 
 alternative for minscaledenom/maxscaledemon?

 And this is what Frank wrote

  Hi all,

 is it possible to use a resolution parameter (meter / pixel, that what 
 map.scale() outputs) instead of Min/Maxscaledenominator? That would be 
 really helpful in order to arrange map styles between different software.

 Let's say I'm creating a map with a number of zoom levels and on each zoom 
 level I'm changing the map, doing generalization or displaying more detail. 
 The map is planned to be used in a web context with the Javascript 
 OpenLayers Map library. Inbetween there is a proxy software like Mapproxy. 
 Both OpenLayers and Mapproxy understand the principle of resolutions, ie 
 natural distances per pixel. So I can define my map in OpenLayers with a 
 list of resolutions like [500, 200, 100, etc.]. I can continue to use this 
 list in Mapproxy so that each resolution matches a certain map layout. 
 Unfortunately this breaks now because Mapnik uses scales in correlation with 
 the dpi setting.

 -Jukka Rahkonen-
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




--
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Draw PHP labels

2013-08-28 Thread Michael McInnis
Thanks for the suggestion.

Actually, my problem was in the font and size definitions. 
Once I happened upon those assignments (below in the // Label section)
my label text magically appeared. 

You would think the text would default to something like everything else.

Thank you for all the feedback!









// Layer 3 airports

// Point Symbol
$nSymbolId = ms_newSymbolObj($oMap, circle);
$oSymbol = $oMap-getsymbolobjectbyid($nSymbolId);
$oSymbol-set(type, MS_SYMBOL_ELLIPSE);
$oSymbol-set(filled, MS_TRUE);
$aPoints[0] = 1;
$aPoints[1] = 1;
$oSymbol-setpoints($aPoints);

// Layer
$oLayerAirports = ms_newLayerObj($oMap);
$oLayerAirports-setConnectionType(MS_POSTGIS);
$oLayerAirports-set(name, airports);
$oLayerAirports-set(type, MS_LAYER_POINT); # This is crucial
//$oLayerAirports-set(type, MS_LAYER_ANNOTATION); # This is crucial
$oLayerAirports-set(status, MS_DEFAULT);
$oLayerAirports-set(labelitem, icao);
//$oLayerAirports-set(classitem, MyAirports);
$oLayerAirports-set(connection, host=xxx port=xxx dbname=xxx user=xxx 
password=xxx);
$oLayerAirports-set(data, geom From (select a.icao, geom From airports a 
left join airportdata e on a.icao = e.icao where e.icao Is Not Null) as 
subquery using unique icao using srid=4326); 

// Class with Labels
$oAirportsClass = ms_newClassObj($oLayerAirports);
$oAirportsClass-set(name,MyAirports);

// Style
$airportsStyle = ms_newStyleObj($oAirportsClass);
$airportsStyle-color-setRGB(255, 22, 22);
$airportsStyle-set(symbolname, circle);
$airportsStyle-set(size, 3);

// Label
$oAirportsClass-label-color-setRGB(0,0,0);
$oAirportsClass-label-set(font, verdana);
$oAirportsClass-label-set(size, tiny);
$oAirportsClass-label-set(position, MS_AUTO);
$oAirportsClass-label-set(antialias, MS_TRUE);




  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] WMS GeoTIFF query with multiple bands

2013-08-28 Thread geoguru
How would you go about serving a 16bit GeoTIFF with n number of bands and be
able to have the WMS query return all the bands in the GeoTIFF.  I've
attempted to use the GDAL/GTiff driver to return tiffs, but could only
return a max of 4 bands using the RGBA ImageMode.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/WMS-GeoTIFF-query-with-multiple-bands-tp5074859.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WMS GeoTIFF query with multiple bands

2013-08-28 Thread Chheang Be
How would you go about serving a 16bit GeoTIFF with n number of bands and
be able to have the WMS query return all the bands in the GeoTIFF.  I've
attempted to use the GDAL/GTiff driver to return tiffs, but could only
return a max of 4 bands using the RGBA ImageMode.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] WMS GeoTIFF query with multiple bands

2013-08-28 Thread Frank Warmerdam
Chheang Be,

You will want IMAGEMODE INT16 which takes a quite distinct code path which
supports multiple bands.

You may also need to use FORMAT GDAL/GTiff in your OUTPUTFORMAT
declaration for this to work properly, I don't exactly recall.   The BANDS
declaration may also be of use if you want to control the band selection.

See:
  http://mapserver.org/mapfile/outputformat.html

https://github.com/mapserver/msautotest/blob/master/gdal/rawmode_multiband.map

Best regards,
Frank



On Wed, Aug 28, 2013 at 2:39 PM, geoguru chhean...@gmail.com wrote:

 How would you go about serving a 16bit GeoTIFF with n number of bands and
 be
 able to have the WMS query return all the bands in the GeoTIFF.  I've
 attempted to use the GDAL/GTiff driver to return tiffs, but could only
 return a max of 4 bands using the RGBA ImageMode.



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/WMS-GeoTIFF-query-with-multiple-bands-tp5074859.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Software Developer
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Orientation of vector symbols on a LINE

2013-08-28 Thread TC Haddad
Hello, I'm trying to understand symbol orientation and (maybe) use of
ANCHORPOINT on a line in Mapserver 6.2.

The vector symbol that I have been using for line cartography in MapServer
6.0.3 is below, and I am trying to get the same effect in Mapserver 6.2.1.

SYMBOL
  NAME wavy_line
  TYPE vector
  POINTS
0 0
1 1
2 1
3 0
4 -1
5 -1
6 0
  END
END

Display in Mapserver 6.0.3:
https://dl.dropboxusercontent.com/u/42845001/mapserver6.0.3.png

Relevant Style bloc from Mapserver 6.0.3:

STYLE
 SYMBOL wavy_line
 WIDTH 1
 SIZE 2
 GAP -1
 COLOR 0 0 0
END

This did not translate directly to Mapserver 6.2.1, but I came close with
this:

STYLE
SYMBOL wavy_line
 WIDTH 1
 SIZE 4
 GAP 6
 COLOR 0 0 0
END

which produced this:
https://dl.dropboxusercontent.com/u/42845001/mapserver6.2.1.png

Obviously I am missing something about how to get the symbol to orient
along the line, I played with ANCHORPOINT as that  was new in 6.2 and it
seemed like the default of 0.5 0.5  should work for my symbol, but I also
tried several other value combinations and it seemed to merely shift the
symbol around laterally, while maintaining an upright orientation.

So I'm a bit confused on how to achieve the original effect, (behavior
something like the equivalent of FOLLOW for Labels). Any pointers
appreciated...
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Fwd: cgi variable substituition in DATA statement

2013-08-28 Thread Peter Freimuth
Hi everybody,
thanks for all the hints and solutions. After switching to a shell script 
wrapper everything works perfectly. I needed to adapt my reg expressions to get 
it work by removing the ^ at the beginning and the $ at the end. 
Thanks again for the great support. I know why the umm mapserver is one of the 
best software projects in the OSGEO environment. Functionality is great and 
stable and support through dev and user list is always great.
Best,
Peter
-- 
Peter Freimuth 

Begin forwarded message:

 From: thomas bonfort thomas.bonf...@gmail.com
 Subject: Re: [mapserver-users] cgi variable substituition in DATA statement
 Date: 27 August, 2013 3:04:15 AM MDT
 To: Peter Freimuth freimut...@gmail.com
 Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org
 
 Peter,
 I've updated the documentation to make this issue clearer. Feel free
 to amend if you see anything more is needed.
 
 https://github.com/mapserver/docs/commit/ff28660f9b3e25539921d0c39e2a47597d81ebd7
 
 --
 thomas
 
 On 26 August 2013 18:41, Peter Freimuth freimut...@gmail.com wrote:
 Hi Thomas,
 this is the wrapper script which is used:
 Somewhere in the documentation it says that this should do the same than
 using the standard cgi way so i expected it would also handle the variable
 substitution in the same way.
 
 import mapscript
 req = mapscript.OWSRequest()
 req.loadParams()
 map = mapscript.mapObj(r'/***/OwsDataStreamingTest/LI_USA-MT.map')
 map.OWSDispatch(req)
 exit()
 
 So if i switch to:
 
 #!/bin/sh
 MAPSERV=/usr/lib/cgi-bin/mapserv
 MS_MAPFILE=/***/OwsDataSteamingTest/LI_USA-MT.map exec ${MAPSERV}
 
 everything works fine.
 
 But if i try to run this as fcgi to make use of keeping the db connection
 and GDAL_CACHEMAX  i get an error that map param is not set.
 
 Which mechanismn should be used in context of fcgi to make the map param in
 the URL unnecessary?
 
 Thanks,
 Peter
 
 
 On 23/08/2013 12:32 AM, thomas bonfort wrote:
 
 yes, that's it. the substitutions only work for the mapserver CGI, not
 mapscripts. if you're using mapscript, you can manipulate your mapfile
 directly.
 
 --
 thomas
 
 On 23 August 2013 04:41, Peter Freimuth freimut...@gmail.com wrote:
 
 Hi,
 i will do so on Monday. Is it possible that the fact that we use a tiny
 map
 script wrapper to avoid the map file in the url have something to do with
 it.
 By the way i tried the leaving away of the single '  '  already but it
 just
 fails again because the parameter name doesn't get replaced. Thanks for
 all
 of your hints.
 Just to complete the circumstances. The map file uses the include
 mechanism
 to get the layer definitions and the layer which needs the substitutions
 is
 only referenced by a raster layer as an tile index. Don't know if this
 have
 something to do with it. If i use static values everything is working
 fine.
 
 Kind regards,
 --
 Peter Freimuth
 
 
 On 2013-08-22, at 3:17 AM, thomas bonfort thomas.bonf...@gmail.com
 wrote:
 
 Peter,
 can you email me your full mapfile, with the snippets you provided I
 can't see anything wrong and would therefore need to see any
 side-effects from the rest of the mapfile, and/or run it through a
 debugger to see where it's failing.
 
 --
 thomas
 
 On 21 August 2013 01:26, Peter Freimuth freimut...@gmail.com wrote:
 
 Hi,
 i am trying to get the dynamic variable substitution work on Mapserver
 6.3dev but somehow it does'nt work as it worked before and as documented.
 When i execute
 
 http://10.10.4.18/cgi-bin/LI_USA-MT.cgi?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=48.046271,-115.929840,48.198407,-115.666914CRS=EPSG:4326WIDTH=1647HEIGHT=953LAYERS=data_viewSTYLES=FORMAT=image/pngDPI=96TRANSPARENT=TRUESTARTDATE=2011-01-01ENDDATE=2013-09-01
 
 or
 
 
 http://10.10.4.18/cgi-bin/LI_USA-MT.cgi?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=48.046271,-115.929840,48.198407,-115.666914CRS=EPSG:4326WIDTH=1647HEIGHT=953LAYERS=data_viewSTYLES=FORMAT=image/pngDPI=96TRANSPARENT=TRUE
 
 I get an error in
 msDrawMap(): Image handling error. Failed to draw layer named
 'data_view'.
 msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:
 invalid input syntax for type date: %STARTDATE%
 LINE 8: ... (((acquisition_date = date_trunc('day',date
 '%STARTDAT...
 ^
 So the substitution does not happen or the default is not applied.
 Any hint on what i am doing wrong would be great.
 
 See below the components from the mapfile:
 
 MAP
 .
#
# Start of web interface definition
#
DATAPATTERN '^[a-zA-Z0-9\-\_\,]+$'
 
WEB
IMAGEPATH
 /mnt/mapserver/mapserver_wms/geocloud_config/image_path
METADATA
.
'PRODUCTID_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'
'default_PRODUCTID'  '1234567'
'CONTRACTIDS_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'
'default_CONTRACT_IDS'  ''
'STARTDATE_validation_pattern'
 '^([0-9]{4})-([0-9]{2})-([0-9]{2})$'