[mapserver-users] layer.dump not saved with mapscript

Daniel Morissette dmorissette at mapgears.com
Thu Sep 29 08:06:15 EDT 2011


The DUMP keyword has been made obsolete by the mechanism introduced in 
RFC-67 (http://mapserver.org/es/development/rfc/ms-rfc-67.html) to 
enable/disable OGC requests at the mapfile and layer level. It seems 
that we failed to document this change in the migration guide and to 
update the docs accordingly.

I have reopened ticket #3830 about the docs update:
http://trac.osgeo.org/mapserver/ticket/3830

Daniel


On 11-09-29 05:48 AM, Frank Broniewski wrote:
> Hi,
>
> I have noticed a possible bug with mapscript. The value of layer.dump
> gets not saved in version 6 to the map file, which used to work in 5.6.5.
>
> Please see the following examples:
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import mapscript
>  >>> mapscript.msGetVersion()
> 'MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
> SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
> SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE'
>  >>> m = mapscript.mapObj()
>  >>> l = mapscript.layerObj()
>  >>> l.dump = mapscript.MS_TRUE
>  >>> m.insertLayer(l)
> 0
>  >>> m.save('/home/brfr/test.map')
> 0
>
> creates a layer as follows:
> 76 LAYER
> 77 DUMP TRUE
> 78 NAME "(null)"
> 79 STATUS OFF
> 80 UNITS METERS
> 81 END
>
>
> while:
> Python 2.5.2 (r252:60911, Jan 20 2010, 23:14:04)
> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import mapscript
>  >>> mapscript.msGetVersion()
> 'MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE'
>  >>> m = mapscript.mapObj()
>  >>> l = mapscript.layerObj()
>  >>> l.dump = mapscript.MS_TRUE
>  >>> m.insertLayer(l)
> 0
>  >>> m.save('/home/brfr/test.map')
> 0
>
> creates a layer as follows:
> LAYER
> STATUS OFF
> TILEITEM "location"
> UNITS METERS
> END # LAYER
>
> Dump is still in the docs as a valid parameter, so I presume the
> behaviour is not wanted. The above examples are only that, examples. I
> discovered the behaviour with a working mapfile ...
>
> Can someone else confirm this? Or is it only me?
>
> Frank
>
>
>


-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000



More information about the mapserver-users mailing list