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

Still using Unbuntu 18.04 and used the switch2osm guide along with some of @SomeoneElse's documentation.

Somewhere in the process of, in this order, cleaning up permissions, incorporating automatic updates, reloading the database, and pre-rendering some tiles, I seem to have broken the rendering process.

render_list works as I have pre-rendered, and they show up in the browser, z0 through z10. However, tiles not yet in existence fail to load.

Returned renderd to a manual run, and found it is now spitting an error:

An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR:  column reference "surface" is ambiguous...encountered during parsing of layer 'turning-circle-fill' in Layer at line 22178 of '/home/tileserver/src/openstreetmap-carto/mapnik.xml'

My initial thinking was that I didn't get a good database (osm2pgsql) load this time, but I didn't see any errors in the process and I was able to use render_list to generate a bunch of tiles.

Thoughts? Is this likely a database issue? Or something with mod_tile? Or is the real hint related to Postgis? Or, something I haven't thought of?


asked 01 Jun '18, 16:00

tim_rohrer's gravatar image

accept rate: 100%

I suspect that the SQL query at line 22178 of mapnik.xml will somehow join two tables ("select something from table1, table2 where condition" and that either "something" or "condition" will reference the "surface" column, which happens to be available in table1 and table2. You will either have to fix the query, or rob one of the tables of its "surface" column. Can you post the query?

permanent link

answered 01 Jun '18, 16:54

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Sorry for the delay. I had to drive to our new site.

Your suspicion is correct.

Here is the entire error:

(02 Jun '18, 00:04) tim_rohrer

I didn't know we were meanwhile applying different rendering to turning circles depending on the road surface but I guess the decline in rendering speed has to come from somewhere ;) you have a choice of changing the two occurrences of "WHEN surface IN" to either "WHEN l.surface IN" (to honour the surface tag of the road that ends in the turning circle) or to "WHEN p.surface IN" (to honour a potential specific surface description of the turning circle). I'd suggest the former, mimicking whe "WHEN l.service IN" line a bit further down.

(02 Jun '18, 11:11) Frederik Ramm ♦

It's not 100% clear from the question, but if you're using the "OSM Carto" style straight out of github I'd suggest mentioning the problem there, too.

(02 Jun '18, 11:21) SomeoneElse ♦

Last night I reloaded the database and found the problem persists.

Part of what is strange is that I had built another server using the same guides, but Washington state data vice California. That server seems to be working without this issue.

My goal with this project is to potentially help a non-profit set up a tile server to support a couple of apps they use. I mention this because as I'm assessing the viability of this effort, I am, in part, trying to understand if this issue I'm having is coming from the maturity of the tools, or because I've goofed something up good. :-)

Judging from your comments above, it may be helpful for the community if I continue to track this down and enter issues into GitHub. But I'd also like to know if there are more mature software packages I should be investigating?


(02 Jun '18, 16:18) tim_rohrer

But I'd also like to know if there are more mature software packages I should be investigating?


Short answer - no. OSM Carto is so mature it's like that piece of cheese in the fridge that it's almost opening the door from the inside in order to come out to meet you. New releases may be a bit "bleeding edge" though - it may be that there's a problem that you're seeing with different software versions that other users are not. You have various options - grab an earlier release, grab a version by date that just predates the "render surface" commit, or use a different style altogether. I regularly use the one described here on 18.04 and I've fixed at least one issue there that only appeared on 18.04 (one minor one, to do with roof handling, remains). You could try that instead if you don't mind blue interstates.

(02 Jun '18, 17:05) SomeoneElse ♦

Interestingly I've just loaded the latest OSM Carto style on an Ubuntu 18.04 machine. Line 22178 is still "turning circle fill" so I guess it's the same as you're using, but I don't see any loading errors and a small area (corresponding to in CA that has a turning circle in it with surface set) displays just fine.

(03 Jun '18, 11:44) SomeoneElse ♦

@SomeoneElse. Well, that seems to be both good news and bad news. The question then is why am I having this trouble.

I don't pretend to understand how all the pieces interact. Are you using carto 1.0.1 to generate mapnik.xml?

Also, I get a ton of warnings, but no obvious errors when I generate mapnik.xml. What is considered normal?

(09 Jun '18, 03:21) tim_rohrer

@tim_rohrer "carto -v" shows 1.0.0. This is on a laptop cleanly installed with Ubuntu 18.04 on 20th May 2018, and software initially installed as per here (which is a different map style to but the same software as here. I then added another section to renderd.conf to point at a "standard" OSM Carto style loaded from an adjacent database (I just edited dbname in mapnik.xml) on 3rd June.

(09 Jun '18, 10:33) SomeoneElse ♦

I switched over to your styles and things appear to be working, which seems to confirm my setup as okay, and that @Frederik Ramm may be correct that an issue needs to be raised.

I'd like to (eventually) switch back in order to test the styles identified in the switch2osm guide. Am I correct that to do that I (technically) need to:

1) Recreate the gis database using osm2pgsql, pointing to whichever style I want to use (-S), and using the associated (?) lua script? I'm a little confused on these dependencies still. 2) Recompile mapnik.xml from the project.mml in the chosen carto. 3) Restart renderd service

I guess I'd also need to remove the already generated tiles and recreate them...

Am I missing anything?

(09 Jun '18, 18:37) tim_rohrer
showing 5 of 9 show 4 more comments

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 01 Jun '18, 16:00

question was seen: 2,402 times

last updated: 09 Jun '18, 18:37

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