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

Lennard ldp at xs4all.nl
Sat Aug 28 04:17:29 BST 2010


On 27-8-2010 15:58, Ákos Maróy wrote:
> Hi,
>
> Maybe I'm misunderstanding the generic purpose of the generate_xml.py
> file from the mapnik rendering toolset, but for me, it does not seem to
> touch my osm.xml file in any way.

That's correct.

> when I execute generate_xml.py with appropriate database setttings,
> osm.xml is not changed in any way. if I remove osm.xml, it is not
> generated by the gall to generate_xml.py in any way.

What does happen when you run generate_xml.py is that three files are 
created (or updated) in the inc directory. They are: 
datasource-settings.xml.inc, fontset-settings.xml.inc, settings.xml.inc

Some guides still give a syntax like:

generate_xml.py my_osm.xml <other stuff>

But that's needed only in rare cases where you actually want it to 
create a monolithic copy of the entire mapnik style. my_osm.xml would 
then be composed of osm.xml and all include files from the inc directory.

Normally, you use generate_xml.py to set the contents of the three files 
I mentioned earlier, and then point your map generating script or app to 
osm.xml. Through XML parsing, osm.xml will dynamically include the 
contents of the files in the inc directory.

Synching the stylesheet to OSM SVN is then only a matter of running svn 
up. You only need generate_xml.py again if you change any of the 
settings, or if a new setting was introduced (in the .template files in 
the inc directory).

> am I misunderstanding that generate_xml.py would actually create osm.xml
> based on the contents of the PostGIS database it connects to, and based
> on the templates in the inc directory?

osm.xml does not contain geographic data. It contains the stylesheet 
that tells mapnik how to render geo data that you load into the postgis 
db with osm2pgsql.

-- 
Lennard




More information about the dev mailing list