OSM customization problems

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

OSM customization problems

Kojo
Hi all,
this is my first post here, and at first I would like to congratulate you all for this great ecosystem of the OSM. If my question doesn´t fit to this chanel, please tell me. English is not my main language, so I will do my best to be clear. 

I am just starting to use OSM to move from GMaps. 
We already have the infrastructure set to render and to serve maps via Apache (mod_tle). The processo seems to be very slow to render the whole planet, but it is working. This is for another thread.

What I am trying to achieve is to execute some small parts of the complete process, which very simplified,is:
  • Dowload data (.osm file)
  • Import to Postgres
  • Serve tiles
Considering that the whole infrastructure is up and runnig, I have already downloaded Maldive Islands data to perform import/render process to acquire the necessary knowledge of all steps of the whole process.

Here I have some questions:
- I am using mapnik to style the maps, but it is not clear for me that the style is applied  while importing data from osm to database (and stored inside db data), or when the tile is rendered. 

- renderd.conf XML property, points to a style file. I change this file but the changes I made doesn´t show on tiles, even if I reload data to database, and even if I mark the tile as "dirty" to force re-render. This is the reason for the first question, that I can not even understand when the style is applied, during import, or during render.

- I tryed to check the png data direct on disk, but I couldn´t find it using this steps from here (https://github.com/openstreetmap/mod_tile/blob/master/readme.txt) :

"
/[base_dir]/[TileSetName]/[Z]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy]/[xxxxyyyy].png
Where base_dir is a configurable base path for all tiles. TileSetName
is the name of the style sheet rendered. Z is the zoom level.
[xxxxyyyy] is an 8 bit number, with the first 4 bits taken from the x
coordinate and the second 4 bits taken from the y coordinate. This
attempts to cluster 16x16 square of tiles together into a single sub
directory for more efficient access patterns.

It is ok for me up to the zoom level. 
"


Thanks in advance,
Koji









 














_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OSM customization problems

Jochen123
On Fri, Dec 07, 2018 at 01:36:32PM -0200, Kojo wrote:
> Here I have some questions:
> - I am using mapnik to style the maps, but it is not clear for me that the
> style is applied  while importing data from osm to database (and stored
> inside db data), or when the tile is rendered.

Styles are applied when rendering *not* when importing.

> - renderd.conf XML property, points to a style file. I change this file but
> the changes I made doesn´t show on tiles, even if I reload data to
> database, and even if I mark the tile as "dirty" to force re-render. This
> is the reason for the first question, that I can not even understand when
> the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

> - I tryed to check the png data direct on disk, but I couldn´t find it

Tiles are stored as "meta-tiles" on disk, one meta-tile contains 8x8
tiles. This might have thrown your calculations off.

Jochen
--
Jochen Topf  [hidden email]  https://www.jochentopf.com/  +49-351-31778688

_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OSM customization problems

Yves-2
Yep, renderd as to be restarted and it's a good thing to run "tail - f /var/log/syslog | grep renderd" in another terminal while restarting to see if the style loads without errors.
Apache also needs to be restarted if you change renderd.conf.
Yves

Le 7 décembre 2018 17:03:09 GMT+01:00, Jochen Topf <[hidden email]> a écrit :
On Fri, Dec 07, 2018 at 01:36:32PM -0200, Kojo wrote:
Here I have some questions:
- I am using mapnik to style the maps, but it is not clear for me that the
style is applied while importing data from osm to database (and stored
inside db data), or when the tile is rendered.

Styles are applied when rendering *not* when importing.

- renderd.conf XML property, points to a style file. I change this file but
the changes I made doesn´t show on tiles, even if I reload data to
database, and even if I mark the tile as "dirty" to force re-render. This
is the reason for the first question, that I can not even understand when
the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

- I tryed to check the png data direct on disk, but I couldn´t find it

Tiles are stored as "meta-tiles" on disk, one meta-tile contains 8x8
tiles. This might have thrown your calculations off.

Jochen

_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OSM customization problems

Andy Townsend
In reply to this post by Kojo
On 07/12/2018 15:36, Kojo wrote:
...
What I am trying to achieve is to execute some small parts of the complete process, which very simplified,is:
  • Dowload data (.osm file)
  • Import to Postgres
  • Serve tiles


A couple of things that you might find useful are:

https://switch2osm.org/manually-building-a-tile-server-18-04-lts/

which you may already be following

https://github.com/gravitystorm/openstreetmap-carto/blob/master/DOCKER.md

which describes how to set up something to allow you to modify a style and see the results quickly.

https://ircama.github.io/osm-carto-tutorials/

lots of other useful information.

Also, in addition to the software that openstreetmap.org uses you have lots of other options for rendering map tiles using completely different software, and various providers who can help you along the way.

Best Regards,

Andy



_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OSM customization problems

Kojo
In reply to this post by Jochen123
Jochen, Yves, 
thanks for your attention.

When I stop rendered:

root@abcdef:/# ps -ef | grep renderd
root      40901  38529  0 15:24 pts/0    00:00:00 grep --color=auto renderd


And I request HTTP to clean a tile, it still answer:
"Tile submitted for rendering"

And when I ask for tile´s status:
Tile is clean. Last rendered at Thu Dec 06 19:37:30 2018. Last accessed at Fri Dec 07 12:56:14 2018. Stored in file:///var/lib/mod_tile/default/14/0/33/223/20/0.meta
(Dates might not be accurate. Rendering time might be reset to an old date for tile expiry. Access times might not be updated on all file systems)

I thought that renderd was in charge to answer for Apache ModTiles, but I stoped renderd, restarted Apache but dirty/status stills answer. And still nothing changes to applying style.
Andy, I am reading lots of documents. I will check those too. 

Thank you,
Koji






> - renderd.conf XML property, points to a style file. I change this file but
> the changes I made doesn´t show on tiles, even if I reload data to
> database, and even if I mark the tile as "dirty" to force re-render. This
> is the reason for the first question, that I can not even understand when
> the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

 


Em sex, 7 de dez de 2018 às 14:03, Jochen Topf <[hidden email]> escreveu:
On Fri, Dec 07, 2018 at 01:36:32PM -0200, Kojo wrote:
> Here I have some questions:
> - I am using mapnik to style the maps, but it is not clear for me that the
> style is applied  while importing data from osm to database (and stored
> inside db data), or when the tile is rendered.

Styles are applied when rendering *not* when importing.

> - renderd.conf XML property, points to a style file. I change this file but
> the changes I made doesn´t show on tiles, even if I reload data to
> database, and even if I mark the tile as "dirty" to force re-render. This
> is the reason for the first question, that I can not even understand when
> the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

> - I tryed to check the png data direct on disk, but I couldn´t find it

Tiles are stored as "meta-tiles" on disk, one meta-tile contains 8x8
tiles. This might have thrown your calculations off.

Jochen
--
Jochen Topf  [hidden email]  https://www.jochentopf.com/  +49-351-31778688

_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OSM customization problems

Kojo
Yes, it seems that style.xml has problems. I can see that on logs when starting renderd. Maybe problem connecting to database. 

"
An error occurred while loading the map layer 'default': Postgis Plugin: FATAL:  role "www-data" does not exist#012Connection string: ' dbname=gis connect_timeout=4'#012  encountered during parsing of layer 'landcover-low-zoom' in Layer at line 691 of '/home/tileserver/src/openstreetmap-carto/style.xml'
"

I just don´t understand how does former tiles were rendering!? 

I may have overwriten style files...



 






Em sex, 7 de dez de 2018 às 15:45, Kojo <[hidden email]> escreveu:
Jochen, Yves, 
thanks for your attention.

When I stop rendered:

root@abcdef:/# ps -ef | grep renderd
root      40901  38529  0 15:24 pts/0    00:00:00 grep --color=auto renderd


And I request HTTP to clean a tile, it still answer:
"Tile submitted for rendering"

And when I ask for tile´s status:
Tile is clean. Last rendered at Thu Dec 06 19:37:30 2018. Last accessed at Fri Dec 07 12:56:14 2018. Stored in file:///var/lib/mod_tile/default/14/0/33/223/20/0.meta
(Dates might not be accurate. Rendering time might be reset to an old date for tile expiry. Access times might not be updated on all file systems)

I thought that renderd was in charge to answer for Apache ModTiles, but I stoped renderd, restarted Apache but dirty/status stills answer. And still nothing changes to applying style.
Andy, I am reading lots of documents. I will check those too. 

Thank you,
Koji






> - renderd.conf XML property, points to a style file. I change this file but
> the changes I made doesn´t show on tiles, even if I reload data to
> database, and even if I mark the tile as "dirty" to force re-render. This
> is the reason for the first question, that I can not even understand when
> the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

 


Em sex, 7 de dez de 2018 às 14:03, Jochen Topf <[hidden email]> escreveu:
On Fri, Dec 07, 2018 at 01:36:32PM -0200, Kojo wrote:
> Here I have some questions:
> - I am using mapnik to style the maps, but it is not clear for me that the
> style is applied  while importing data from osm to database (and stored
> inside db data), or when the tile is rendered.

Styles are applied when rendering *not* when importing.

> - renderd.conf XML property, points to a style file. I change this file but
> the changes I made doesn´t show on tiles, even if I reload data to
> database, and even if I mark the tile as "dirty" to force re-render. This
> is the reason for the first question, that I can not even understand when
> the style is applied, during import, or during render.

Not sure but you might have to restart renderd and/or apache when
changing the renderd config.

> - I tryed to check the png data direct on disk, but I couldn´t find it

Tiles are stored as "meta-tiles" on disk, one meta-tile contains 8x8
tiles. This might have thrown your calculations off.

Jochen
--
Jochen Topf  [hidden email]  https://www.jochentopf.com/  +49-351-31778688

_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev