[Mapserver-users] data/mapfile organization advice sought
Ed McNierney
ed at topozone.com
Tue May 13 17:02:09 PDT 2003
Puneet -
As I've mentioned before on this list, I use the C preprocessor to
create master mapfile templates with macro expansions, #ifdef blocks,
etc. It allows me to maintain one master set of template files, with a
make script to crank out all the mapfiles I need.
As for performance, I have at least one mapfile with 185 layers in it.
If you think about the amount of data being read / processed from your
spatial data files, reading a few more lines of text is really pretty
minor.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: (978) 251-4242 Fax: (978) 251-1396
ed at topozone.com
-----Original Message-----
From: Puneet Kishor [mailto:pkishor at geoanalytics.com]
Sent: Tuesday, May 13, 2003 12:09 AM
To: Mapserver
Subject: [Mapserver-users] data/mapfile organization advice sought
To ms data mavens -- please give me a piece of your mind.
I have shapefile data of several countries, about 14 countries.
Each country has 8 to 12 different layers, but they are all called the
same. For example, all countries have a layer called "layer1",
"layer2", and so on, while a few countries may not have "layer8" or
"layer11," etc.
If I were to draw all the countries together, they would draw
correctly, that is, they are in the correct geographic space. However,
their data are self-contained. That is, even though country1 and
country2 are contiguous, drawing country1 does not bring up country2...
they are in different folders.
How do I create and work with their mapfiles?
I can't really have one big mongo mapfile with all the layers of all
the countries... it would be unworkable, and probably very inefficient.
On the other hand, if I have 14 different mapfiles, they will be almost
identical to each other except for the path to the data. If I make a
tweak in any one mapfile (for example, change the color or visible
scale of a layer), I will have to go and change it in 14 different
mapfiles.
Ideally I would like to have one master mapfile (like a template), and
just substitute (on the fly) the path to the data. I guess I could do
some preprocessing with Perl, and swap a filter keyword using regexp
search, to create a working, valid mapfile on the fly, but I would also
have to account for those one or two particular layers that happen to
be absent for a given country.
Please share your insight.
Many tia.
Puneet.
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list