Add labels for rendered landuse and leisure polygons #352

merged 2 commits into from Feb 25, 2014


None yet
8 participants

mrwojo commented Feb 23, 2014

Add labels for rendered landuse and leisure polygons

This shows name labels for all rendered leisure/landuse polygons. That is:

  • leisure: swimming_pool, stadium, sports_centre, playground, park, recreation_ground, common, garden, golf_course
  • landuse: quarry, vineyard, orchard, cemetery, grave_yard, residential, garages, field, meadow, grass, allotments, forest, farmyard, farm, farmland, recreation_ground, conservation, village_green, retail, industrial, railway, commercial, brownfield, landfill, greenfield, construction, military


  • Unifies polygon/point labels in amenity-points.
  • park-text merged into amenity-points text. The "text"/"text-poly" layers were doing roughly the same thing except unified between points and polygons. (Note leisure=marina, for instance.)
  • Removes the now superfluous point=yes catchall.
  • Text color is mostly the darken()ed color of the polygon.
  • Halo 2px->1px (the more common value) for most of these labels now. Exceptions are cemetery and vineyard, which needed stronger halos to override the background pattern.
  • swimming_pool name will now render at z17+. Everything else renders at z15+, like it did before. We can tweak all this now that they're split up.
  • Darkens the danger_area text color (was pink on pink).

The following image shows the various types of polygon/text renderings at z18. (This is not all the features with names.)

boxes osm 18

@mrwojo mrwojo referenced this pull request Feb 23, 2014


Landuse and building labels #351


mrwojo commented Feb 23, 2014

With that last commit, the most common leisure/landuse tags (>10,000 TagInfo uses) will render labels and polygons. The exceptions are:

  • landuse=greenhouse_horticulture (see #82)
  • leisure=slipway (we didn't render a name for this before)
  • landuse=scrub (13k uses; we render natural=scrub, which has 500k uses)

hlaw commented Feb 23, 2014

Just to share some views for consideration -

As the text size of the playgrounds, parks etc has been enlarged to 11, should similar or more prominent features e.g. stadium follow suit, instead of remaining at 9, and begin to render at z14 if they satisfy a size criteria?

Similarly, for the text size for buildings vs that for landuse (residential, commercial, etc), the latter often encloses a number of the former, and should not be given less prominent labels.


Am 23/feb/2014 um 03:05 schrieb mrwojo

This shows name labels for all rendered leisure/landuse polygons. That is:

could the key "landcover" also be integrated? Currently this is " trees" (e.g. lc=trees or
landuse=forest), grass water gravel sand

Having landuse in a rule set called landcover seems strange btw


mrwojo commented Feb 23, 2014

@hlaw: I'd like that. While not affected by this change, natural=water was often large enough to render at z14 under the catch-all. Likewise, larger fonts also should make us think about features that are too small to render at z15 (I'm seeing pond names that are now larger than their pond).

@dieterdreist: landcover would be a difficult addition because it's not in the DB at the moment. We need to sort that out because there's several such requests.


matkoniecz commented Feb 23, 2014

"Darkens the danger_area text color (was pink on pink)." - it may be necessary also for landuse=military


matthijsmelissen commented Feb 23, 2014

@mrwojo Good job!

javbw commented Feb 25, 2014

@mrwojo Thanks for the hard work =D I was hoping the greenhouse_horticulture landuse would get rendered as well - I followed the links to #82 which leads to #78 - does what is written in #78 mean that it is going to get rendered now too?


Rovastar commented Feb 25, 2014

Edit: I read it properly now.

Good job.


mrwojo commented Feb 25, 2014

@javbw landuse=greenhouse_horticulture won't be rendered yet with this change. For now I was focusing on restoring labels for areas that had been rendered previously.

@gravitystorm gravitystorm merged commit 828e30c into gravitystorm:master Feb 25, 2014


gravitystorm commented Feb 25, 2014

@mrwojo this is a fantastic commit, exactly what I was hoping for. The grid of outputs was especially handy when reviewing it! Thank you.

@mrwojo mrwojo deleted the mrwojo:area-labels branch Feb 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment