read up the mapfile
Huub Fleuren
hfl at HOME.NL
Fri Sep 2 12:03:49 PDT 2005
Okay,
This is a rudimentary include for the actual labour pre-preprocessing fase
works with awk (on windows with awk95, a 32bit version of awk (long names))
http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe
any (recursive) perl code can do the same
t'is run by
awk95 -f include.awk
your_main_map_template.map_stuffed_with_INCLUDE_filenames
example mapfile
MAP
INCLUDE include_files.txt
INCLUDE web.txt
INCLUDE legend.txt
INCLUDE scalebar.txt
INCLUDE first.layer
INCLUDE second.layer
INCLUDE third.layer
#INCLUDE not_this.layer
END
layers 1,2 and 3 could INCLUDE a_common.class
*file contents : include.awk*
BEGIN {
OUTPUT = "my.map"
while ((error = getline) == 1) {
gsub(/^.*[I]/,"I")
if ($1 == "INCLUDE") {
print "#"$2 >> OUTPUT
system ("awk95 -f include.awk " $2)
} else {
print $0 >> OUTPUT
}
}
}
Regards, Huub
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.18/89 - Release Date: 9/2/2005
More information about the MapServer-users
mailing list