[Mapserver-dev] hierarchical map files

Sean Gillies sgillies at frii.com
Sun Sep 5 13:06:18 EDT 2004


Carlo,

Over a year ago, I made an enhancement proposal for functions to load
mapfile fragments.

   http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=357

This would allow us to make a mapserver that is more layer-centric
instead of map-centric, and make it easier to share layers between
applications.  This proposal generated very little interest, and my
own motivation for it is long gone.

I really like the solution using the C preprocessor.  It is easy to
understand, flexible, and reliable.  You could even use it from within
a script (system call to 'gcc -E') to do run-time mapfile preprocessing
with mapscript.  In fact, maybe QGIS should consider an enhancement to
support mapfile preprocessing?

cheers,
Sean


On Sep 5, 2004, at 9:52 AM, bertelli wrote:

> Ciao,
>
> thanks for the HOWTO on building map files via make and also about 
> qgis. I
> like it, I use it on Linux, I would use it even in Mac OS X if it only 
> had
> some point/polygon editing capabilities and some sort of spatial sql
> interface. I understand from your words that you are involved in that
> project.  It's a very interesting approach with unexpectedly easy and
> effective results.
>
> About the maing subject, hierarchical map files, i posted it on 
> mapserver-dev
> to say that this is not only a user's level question, it's a problem.
> When you maintain more than 10 projects on MapServer you have to have a
> simple and effective way to handle any upgrade in base maps.
>
> It's not a problem of generating a map file, this is easy and logical, 
> it has
> a clear structure from start-up (thanks Steve), but when you have to 
> upgrade
> a piece of a map you have to alter a mapfile for every single 
> application,
> maybe more, if you use maxscale/minscale mapfiles.
>
> Compiling a new map file via make o via a query, as I suggested, it's 
> not an
> issue. You still have to be sure you changed all your mapfiles (I have 
> more
> than 15 mapfiles working and they continue to break and to be fixed, 
> but this
> is a bad effort).
>
> Is there someone in the list that thinks I'm right? Should I file an
> enhancement bug?
>
> Carlo
>
> Carlo
>
> --- Titus von der Malsburg <malsburg at cl.uni-heidelberg.de> ha scritto:
>> On Fri, Sep 03, 2004 at 04:52:42PM +0000, bertelli wrote:
>>> thank you very much for your suggestion. I'm not very good at 
>>> setting up
>>> make, so, if you send me some sample file it would save a lot of 
>>> time.
>>
>> I'll outline it in a litte HOWTO document and post it on
>> this list later this weekend.
>>
>>> BTW, I was planning a somehow similar approach, putting every 
>>> information
>>> about layers inside a table in a database and generating the mapfile 
>>> with
>> a
>>> query, but I think hierarchical map files make sense.
>>
>> You are right, maybe make/cpp is not everyones taste.  But do you know
>> QuantumGIS (http://qgis.org)?  It's a quite nice clone of ArcView and
>> has the ability to export mapfiles and could therefore be used as a
>> WYSIWYG editor for Mapserver maps.  The exporter is incomplete in the
>> current version, but the code is very readable and straightforward.  
>> It
>> should be very easy to round it out, I guess.
>>
>> Maybe I will have the time to work on it in the next weeks -- maybe
>> someone else on this list is interested in working on it?
>>
>> 	Titus
>




More information about the mapserver-dev mailing list