[Mapserver-dev] Proposal for mapfile IO changes for
steve.lime at dnr.state.mn.us
Thu Jul 3 15:24:59 EDT 2003
I like the idea. In addition, this could be considered as a general
replacement for the map_ syntax already supported by the CGI
application. It works well if you only need to make a change or two but
is to clunky for much broader use. Moving to a single parser that would
work for a complete mapfile or just a piece would really simplify
maintenence. I don't believe the loader would really have to change
much, in fact the lexer would work "as is" and could have a bunch of
crap removed (it could also parse an XML version with very little
change). What would have to be added is logic in the various loading
functions to detect the existance of that object so that particular
pieces are modified and not overridden. Perhaps that decision logic
(replace/update/...) could live in the string fragment.
I agree with Dan. Toss your original email into bugzilla and mark it as
high priority for 4.1.
>>> Sean Gillies <sgillies at frii.com> 07/02/03 11:33AM >>>
I'd like to proposal a change to the manner in which mapfiles
are read and written for 4.1. My proposed changes would enable
us to write and load mapfile fragments. Would love to hear
what you think of this proposal.
To start, I'd like to see msLoadMap() overhauled so that all
the work is performed by a msLoadMapString() function. Then
we could reduce msLoadMap() to something like the following
fh = open(filename)
map_string = fh.read()
map = msLoadMapString(map_string)
I'd also like to see this extended to layers, classes, etc.
It would be really handy to take an existing map and then
add a layer defined in a string like in this mapscript
layer_string = 'NAME "foo"\nTYPE POLYGON\n' # for example
layerobj = layerObj(mapobj, layer_string)
An msLoadLayerString() function would be used in this new layerObj
As well, I'd like to see *writeString() functions for map, layer,
classes, and have msSaveMap() rewritten to call these.
Mapserver-dev mailing list
Mapserver-dev at lists.gis.umn.edu
More information about the mapserver-dev