Thanks, Nino.  I've had the same itch but never got around to doing
anything about it...
 
Terry Laurenzo
MapQuest

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Dane
Springmeyer
Sent: Tuesday, May 25, 2010 4:33 PM
To: Nino Walker
Cc: Mapnik users mailing-list
Subject: Re: [Mapnik-users] Alternative for managing Mapnik data sources


Nino, 

Cool stuff, I look forward to taking a look. Also, nice that you are
working with git-svn and mapnik_utils. Maybe we could even move
mapnik_utils to github to make sharing code easier...

Cheers,

Dane

On May 25, 2010, at 12:49 PM, Nino Walker wrote:


        We've been managing a bunch of cascadenik mml files which
contain duplicate data source references; e.g. same thing rendered with
different classes.  Using XML entities is great, but it's a bit hokey.
I've implemented a solution that scratches our itch, but I thought I'd
proffer it to the community.

        In a nutshell: 
        1) Define data sources and their SRS separately from layers
(parse using python ConfigParser)
        2) Layers refer to a data source by name
        3) Support variable substitutions through the config parser's
builtin mechanism
        4) Allow for overrides of datasources and substitution vars
(like settings.py and local_settings.py in django)
        5) Compile .mml to .xml

        This makes cascadenik mml more MVCish: .mms == view, .cfg ==
model, .mml == controller

        Example: 
        
http://github.com/umidev/mapnik-utils/commit/806cfd75eb3774d27bf7a4a2e2e
0f0621edec695

        Implementation:
        
http://github.com/umidev/mapnik-utils/blob/806cfd75eb3774d27bf7a4a2e2e0f
0621edec695/trunk/serverside/cascadenik/cascadenik/source.py
        
http://github.com/umidev/mapnik-utils/blob/806cfd75eb3774d27bf7a4a2e2e0f
0621edec695/trunk/serverside/cascadenik/cascadenik/compile.py#L536

        This was done quickly; not lots of comments in code, but not a
lot of code.

        Cheers

        Nino Walker :: Urban Mapping, Inc
        690 Fifth Street, Suite 200 :: San Francisco, CA 94107
        T. 415.946.8170 x805 :: F. 866.385.8266 :: www.urbanmapping.com
<http://www.urbanmapping.com/> 

        _______________________________________________
        Mapnik-users mailing list
        [email protected]
        https://lists.berlios.de/mailman/listinfo/mapnik-users
        


_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to