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

2010-08-30 Thread Ákos Maróy
Lennard,

> 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.

now I see how it works. thank you for the clarification.


Akos

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-29 Thread Lennard

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
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  and

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

2010-08-29 Thread Ákos Maróy
Lennard,

> They are dynamically included, by putting the relevant &layer-xxx;
> references at the right spot in osm.xml. The ordering of 
> elements in the stylesheet determines the order in which mapnik renders.

what do you mean by 'stylesheet' in this context?

> So water, for instance, is loaded by way of osm.xml including
> inc/layers.xml.inc, then including any file defined there, and then it's
> actually 'activated' by encountering &layer-water; in osm.xml itself.
> You may have missed that last bit.

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

it's actually a pit confusing, that osm.xml both references layers via
these external entities, and contains  and 

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

2010-08-29 Thread Lennard

On 29-8-2010 11:20, Ákos Maróy wrote:


what I'm trying to achieve is to include my own

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

2010-08-29 Thread Ákos Maróy
Lennard,

> 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

thanks for the info - now I see that.

> Some guides still give a syntax like:
> 
> generate_xml.py my_osm.xml 
> 
> 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.

unfortunately, this does not seem to be the case.

what I'm trying to achieve is to include my own 

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

2010-08-27 Thread Lennard

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 

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


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-27 Thread Stephan Knauss

Hi,

Sajjad Anwar wrote:
The following link contains pointers to setting up Mapnik and basic 
rules file modifications 
http://sajjad.in/mapping/setting-up-mapnik-for-rendering-tiles-in-your-language/


you can find the trick to render bilingual maps like 
http://thaimap.osm-tools.org/ or http://greece.osm-tools.org/ on my 
download space:


http://downloads.osm-tools.org/bilingual/

I did set up a view to return the matching names from the DB. This is 
also the place you want to edit in case you like a different fallback rule.


Stephan

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-27 Thread Sajjad Anwar
Dear Akos

>
> I did read the README file, but this seems to be a catch-22 here. if it
> uses osm.xml itself to generate osm.xml - how do you initially create
> the first osm.xml, from the style sheets / templates?
>
> The osm.xml file is a bit confusing in this scenario. You can see that the
osm.xml file that came along with Mapnik is not the dataset, rather, it
contains certain rules which support the rendering of tiles. You are
actually loading the map data into the pgsql db and asking *
generate_image.py *or*generate_tiles.py *to generate the image or set of
tiles as the case may be.

If you want to make some modifications in the styles and fonts for the
rendering, you could tweak this rule file.
Also note that, Mapnik does not intend you to give the data in xml format,
but it reads the data only from the pgsql database.

The following link contains pointers to setting up Mapnik and basic rules
file modifications
http://sajjad.in/mapping/setting-up-mapnik-for-rendering-tiles-in-your-language/


Hope
this helps

Cheers
-- 
Sajjad Anwar | http://geohackers.in | Blog: http://sajjad.in | Twitter:
geohacker
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-27 Thread Sajjad Anwar
Taking the freedom to post the email that skipped the list


From: Ákos Maróy 
Date: Fri, Aug 27, 2010 at 7:43 PM
Subject: Re: [OSM-dev] generate_xml.py not generating osm.xml file?
To: Sajjad Anwar 


Sajjad,

> I think you have misunderstood the purpose of generate_xml.py
> generate_xml.py as far as I understand is to prepare the osm dataset (by
> default osm.xml) ready for rendering. It fetches the style sheets,
> symbol information etc and modifies the dataset to create the new osm.xml
>
> The README coming with mapnik also explains its use.

thanks for the answer.

I did read the README file, but this seems to be a catch-22 here. if it
uses osm.xml itself to generate osm.xml - how do you initially create
the first osm.xml, from the style sheets / templates?


Akos

-- 
Sajjad Anwar | http://geohackers.in | Blog: http://sajjad.in | Twitter:
geohacker
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-27 Thread Sajjad Anwar
Dear Akos,

I think you have misunderstood the purpose of generate_xml.py
generate_xml.py as far as I understand is to prepare the osm dataset (by
default osm.xml) ready for rendering. It fetches the style sheets, symbol
information etc and modifies the dataset to create the new osm.xml

The README coming with mapnik also explains its use.

Regards.

-- 
Sajjad Anwar | http://geohackers.in | Blog: http://sajjad.in | Twitter:
geohacker
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2010-08-27 Thread Ákos Maróy
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.

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.

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?


Akos

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev