I have a working local OSM tile renderer (courtesy the kind people at switch2osm for the instructions). I'd like it to render labels in English where available, falling back to the local name if there is no English. I don't want to show both, or a translation / transliteration.
I'm using the openstreetmap-carto style from git://github.com/gravitystorm/openstreetmap-carto.git
After making sure the rendering works, I've modified the style (based on some guidance on the OSM discussion forums), with this change:
diff --git a/project.mml b/project.mml index 7fb3d472..2d5099a7 100644 --- a/project.mml +++ b/project.mml @@ -90,7 +90,7 @@ Layer: way, name, religion, way_pixels, is_building, COALESCE(aeroway, golf, amenity, wetland, power, landuse, leisure, man_made, "natural", shop, tourism, highway, railway) AS feature FROM (SELECT - way, COALESCE(name, '') AS name, + way, COALESCE(tags->'name:en', name) AS name, ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway END)) AS aeroway, ('golf_' || (CASE WHEN (tags->'golf') IN ('rough', 'fairway', 'driving_range', 'water_hazard', 'green', 'bunker', 'tee') THEN tags->'golf' ELSE NULL END)) AS golf, ('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi', I've regenerated mapnik.xml, and checked it has a corresponding change. I've checked I have the hstore tags entries in my database.
However even after forcing regeneration of tiles and clearing browser cache, I still see the name value rather than the name:en value. For example, I see "Soomaaliya الصومال" rather than "Somalia".
Can anyone suggest the required changes to render the English name for this style?
Failing that, changes for a similar style would be almost as useful.
render_list --force ...for the re-rendering? Is renderd linking the changed mapnik.xml style file correctly? So I would first look at renderds conf and restart renderd and apache to have that style change working.--forceas noted in the question ("after forcing regeneration"). I may or may not have restarted apache though - will try that when I can get back into the lab.