"includes" in mapfiles?

uli mueller [geOps] uli.mueller at GMX.CH
Fri Jun 3 15:27:57 EDT 2005


I also wished to have something like an #include in mapfiles. Usually 
you have one or only few more optimal ways to represent a set of geodata 
in MapServer. I would like to be able to keep these representations (the 
MapServer layer object) separate from the mapfiles, possibly in the same 
location as the geodata itself.
This would ease the creation of mapfiles. Updates of a layer definition 
could be done in one place instead of in all mapfiles that use the data.

WMS as an alternative is fine, but I don't need it if I only combine 
layers from a single server. And I am not sure, if WMS layers aren't 
slower than directly accessing my data (Can anyone comment on this?).

Could this go into bugzilla as an enhancement bug? Or does MapLab 
already provide a similar feature (never tested)?

So far my thoughts for a Friday night (it's Europe here)

Uli



Pagurek,Debbie [NCR] wrote:
> As far as I know, I don't think there is a way to "include" a mapfile in 
> another as you have suggested.
>  
> However, there are possibilities.
> First - do you have to have 12 or so different mapfiles? Can't you put 
> them all into one file and use the GROUP feature to group 5 or so layers 
> together?
>  
> Second - if you DO want to have separate mapfiles, perhaps you 
> could "serve" your ancillary data layers as WMS, and then in each of the 
> other mapfiles, you could just act as a WMS client to that wms. So you'd 
> only be putting one layer into each of the mapfiles, instead of a number 
> of ancillary data layers.
>  
> Just my thoughts for a Friday afternoon.
>  
> D. Pagurek
>  
> -----Original Message-----
> *From:* UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] 
> *On Behalf Of *McGraw, Joanne
> *Sent:* Friday, June 03, 2005 8:51 AM
> *To:* MAPSERVER-USERS at LISTS.UMN.EDU
> *Subject:* [UMN_MAPSERVER-USERS] "includes" in mapfiles?
> 
>     Is there any syntax for including the contents of another file in a
>     mapfile?
> 
>      
> 
>     I have about 60+ layers that need to go online and most of them fall
>     into fairly clear groups of five layers each. Based on their
>     selection in a drop-down list, users will indicate the group of maps
>     they are interested in looking at and the application will load that
>     map file. There are, however, about 10 ancillary layers of data that
>     should be available no matter what map is loaded (roads, hydro,
>     cities, etc.). Rather than repetitively defining this information in
>     every map file, is there any way I can define the ancillary layers
>     in one file, and then simply load that file’s contents from within
>     the other map files?
> 
>      
> 
>     I’m not sure what to call these except “includes.” I haven’t had any
>     luck in the archive with that expression, but I cannot believe no
>     one has wanted to do this before.
> 
>      
> 
>     Cheers,
> 
>     jtm
> 
>     Joanne T. McGraw
>     Spatial Data Visualization Specialist / Spécialiste en visualisation
>     des données spatiales
>     Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
>     Telephone/Téléphone: (613) 759-6103
>     Facsimile/Télécopieur: (613) 759-1937
>     960 Carling Ave, #1136
>     Ottawa, Ontario
>     K1A 0C6
> 
>     mcgrawj at agr.gc.ca <mailto:mcgrawj at agr.gc.ca>
> 
>      
> 
>     Agriculture and Agri-Food Canada - Agriculture et Agroalimentaire Canada
> 
>      
> 


-- 
geOps GeoInformatics
D-79100 Freiburg



More information about the mapserver-users mailing list