Thanks Nino for sharing your approach. I was just beginning to research about a way for handling XML entities and your code looks very interesting!
Maybe we could even move mapnik_utils to github to make sharing code > easier... +1 for putting mapnik_utils on github Cheers, - Waldemar On Tue, May 25, 2010 at 6:23 PM, Nino Walker <[email protected]> wrote: > +1 for git. > > On May 25, 2010, at 3:33 PM, Dane Springmeyer wrote: > > 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/806cfd75eb3774d27bf7a4a2e2e0f0621edec695 > > Implementation: > > http://github.com/umidev/mapnik-utils/blob/806cfd75eb3774d27bf7a4a2e2e0f0621edec695/trunk/serverside/cascadenik/cascadenik/source.py > > http://github.com/umidev/mapnik-utils/blob/806cfd75eb3774d27bf7a4a2e2e0f0621edec695/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 > > _______________________________________________ > 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 > >
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

