[Mapserver-users] Write a comment with python mapscript to the mapfile ?
Sean Gillies
sgillies at frii.com
Wed Jul 21 06:38:28 PDT 2004
On Jul 21, 2004, at 5:15 AM, Jan Schüngel wrote:
> Hi,
>
> I am writing a mapfile with mapscript and that all works fine, but now
> i want to
> write some lines with comments like "# file automatically created by
> program xyz
> to the beginning of the ne created file.
>
> Is there any possibility to do this with python mapscript ?
>
> Thanks
>
> Jan S.
Jan,
None of the mapscript modules can output comments.
What you *can* do is use the MAP metadata for this purpose. If you are
using
mapserver versions 4.2 or older, the syntax would be something like
the_map.setMetaData('Created By', 'Program XYZ')
or in 4.3
the_map.web.metadata.set('Created By', 'Program XYZ')
then, after you save the map, you should have a mapfile that includes
WEB
METADATA
"Created By" "Program XYZ"
...
I prefer this way because it will give you the future capablility of
programmatically accessing the metadata instead of trapping it in
comments.
cheers,
Sean
--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies
More information about the MapServer-users
mailing list