[OSM-dev] generate_xml.py not generating osm.xml file?

Lennard ldp at xs4all.nl
Sun Aug 29 17:07:35 BST 2010

On 29-8-2010 14:31, Ákos Maróy wrote:

>> They are dynamically included, by putting the relevant&layer-xxx;
>> references at the right spot in osm.xml. The ordering of<Layer>
>> elements in the stylesheet determines the order in which mapnik renders.
> what do you mean by 'stylesheet' in this context?

Mapnik uses a stylesheet to tell it what to render and how to render it. 
The OSM stylesheet is called "osm.xml" and is what I'm referring to.

> yes, I see that. but to 'activate' my own layer, I'd still have to
> manually edit osm.xml, wouldn't I?

Yes, by referring to your external entity (the xml.inc file) at the 
right place in the osm.xml stylesheet.

> it's actually a pit confusing, that osm.xml both references layers via
> these external entities, and contains<Layer>  and<Style>  definitions on
> its own.

I know. Ideally everything would be found in the xml.inc files, and 
osm.xml would only be a small skeleton file, referring to the include files.

> I see. the confusion comes from the content of these xml.inc files and
> osm.xml in general to be of similar purpose. wonder what make something
> get into a layer files, and what is in osm.xml itself.

When I started to implement the external entities (the include files), I 
took the easy cases and split them off into xml.inc files. Most of what 
remains is so interwoven (all the roads/railways/etc and all the 
bridge/tunnel variants of those) that I left that part alone.

> but, still. it seems that there is no 'simple' or 'elegant' way of just
> dropping a new layer-foo.xml.inc file into inc, and to make osm.xml
> automatically use the definitions in there. as at least one has to add
> an external entity reference manually.
> is this correct?

That is correct, also because *you* have to tell mapnik *where* your 
style comes in the whole rendering order, by putting your &layer-xxx; at 
the correct spot.


More information about the dev mailing list