[OSM-talk] simplifying mapnik layout definition

Robert (Jamie) Munro rjmunro at arjam.net
Tue May 27 18:29:10 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy Allan wrote:
| Now, if someone is volunteering to make a concise definition format
| that can be pre-processed into the mapnik XML format (or mapnik python
| code, or even just read by a modified mapnik directly, or whatever)
| then I'd absolutely love to SEE THE WORKING CODE. That osm.xml is an
| unwieldy beast isn't in question, nor are the myriad of possibilities
| to improve it - what is lacking is working alternative.

IMHO in this case, the code is the easy part - it's designing a good
format that is hard. It has to be actually easier to read and edit in
general, rather than easier for whoever designed it but just as hard (or
even harder) for everyone else.

Whether it should be discussed here or in Mapnik's lists depends on if
the format will be generally useful, or specific to open street map's
needs - perhaps it will be tied intimately to our system of tags.
Perhaps the format could be used to generate osmarender formatting at
the same time.

If we can agree some basic ideas for how the format should work, and
what won't work, someone may come along and try to implement it. If you
just say "go away until you have finished the whole thing" every time,
it's not surprising people don't write anything because they have no
idea where to start.

Here's some working code that simplifies the file:
sed "s/(\[bridge] = 'yes' or \[bridge]='true')/isBridge/g" osm.xml

And the reverse:
sed "s/isBridge/([bridge] = 'yes' or [bridge]='true')/g"

Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg8ROMACgkQz+aYVHdncI3jsgCgsSeHDPwjdpEYCrCVazE6JBk1
kU4AoM9LhG9u7TiqfJ0wqmtT4O6mX5ua
=8bg+
-----END PGP SIGNATURE-----




More information about the talk mailing list