NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

I'm on struggle street now, hence posting here - I am running my own ubuntu 22.04 tile server, per the switch2osm.org guide, and it's running great. I've since started trying to customize it, by trying to remove text, symbols/icons and (administrative) boundaries - the purple ones.

I've scoured the web for answer, similar questions and more, with minor success - I've deleted the majority of text using the 3rd tip by SomeoneElse here - however, I'm finding some building names and street numbers are still appearing.

My biggest struggle, however, has been removing all symbols and purple boundaries. I've tried simply deleting the "admin.mss" and "symbols" folder, altering the names, modifying the colour variables in the mss file and a whole heap of other hacks/attempts but to no avail (in most cases, when updating there is no difference, even if the files are deleted).

Unfortunately I'm quite new, so I apologies beforehand for the possible hand holding I'll need.

I'd really appreciate any/all advice. Thanks

asked 23 May '22, 03:02

hicallmeal's gravatar image

hicallmeal
11112
accept rate: 0%


The project is driven by layers defined in project.mml. Many of the things you ask for are rendered by individual layers. You can remove them if you don't want them, but if your plan is to maintain a for of the main style, I think it would be better if you just disable them using status: off.

As for specific symbols and such, the project file also defines the SQL queries used to fetch data for rendering. They're also defined in the .mms files under style. you can either remove the fetch of the data from the SQL queries (but beware on how you edit the file if you plan to maintain the fork) or comment out (with /* */ à la C/C++/others) in the style files.

I keep my own fork here. Here I disable a whole layer. Here I do all kinds of modifications to the SQL queries to change or reduce the amount of rendered data. Here I disable a whole style block.

permanent link

answered 23 May '22, 10:03

Marcos%20Dione's gravatar image

Marcos Dione
71113
accept rate: 0%

Hey Marcos, thanks for the reply! So that looked really promising, so I tried out adding status:off to a bunch of items (like you did in that example), including amenities and boundaries, and I also commented out the whole amenity.mss file excluding the variables just to be safe. Unfortunately I must either be doing something wrong, as no matter what I do, the changes don't appear (my process is, carto project.mml > mapnik, find and delete all .meta tiles, restart server and renderd, if all fails then I run the osm2pgsql command). At this point, I'm worried I'm not clearing the cached tiles or perhaps I'm running it differently to you. Any ideas?

(23 May '22, 11:14) hicallmeal

I'm sorry, but I don't know anything about the rest of your stack. What I do locally is to edit the style with a text editor and check changes in kosmtik. Once I'm happy with my changes I might do some rendering or otherwise wait for the next opportunity to do it (I only render places that I go visit or maybe the city where I live).

(23 May '22, 21:11) Marcos Dione
1

At this point, I'm worried I'm not clearing the cached tiles

Tiles might still be cached locally, to protect against that request them locally from a new incognito browser window (close any other incognito browser windows and create a new one).

(02 Jun '22, 12:27) SomeoneElse ♦
1

To see what is actually in the database for a particular OSM object, try this (as the user who owns the database)

psql gis
gis=> select * from planet_osm_polygon where osm_id=142724406;
gis=> select * from planet_osm_line where osm_id=142724406;
gis=> select * from planet_osm_point where osm_id=142724406;

nodes will be in planet_osm_point, unclosed ways and relations in planet_osm_line, and closed ways and relations in planet_osm_polygon.

You can look at the tags in there to see what tags are "escaping into the database" for a particular feature. You can also do things like this:

select count(*) from planet_osm_line where name='High Street';
(02 Jun '22, 12:33) SomeoneElse ♦

Hey @SomeoneElse, I tried playing around with some of that stuff you suggested but I'm going to be honest, this is far beyond me.

Really not where to start or what to do. I really appreciate your advice/assistance. Might just have to leave it here for now.

(08 Jun '22, 12:14) hicallmeal

Ultimately, if you want to change the way that osm2pgsql / renderd / mapnik displays things, you do need some sort of basic knowledge of the database that underpins it.

Does anything at https://ircama.github.io/osm-carto-tutorials/ help? Failing that, would https://umap.openstreetmap.fr/en/ allow you to do whatever you are trying to do?

(08 Jun '22, 14:25) SomeoneElse ♦
showing 5 of 6 show 1 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440
×341
×129
×54
×16

question asked: 23 May '22, 03:02

question was seen: 1,987 times

last updated: 05 Jan '23, 14:06

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum