2

I'm exploring openstreetmap-carto style and I wonder what does such syntax mean:

  [natural = 'water']::natural,
  [landuse = 'reservoir']::landuse,
  [waterway = 'riverbank']::waterway

Is this declaring multiple attachments at once, or is it redirecting filters somehow? I'm clueless.

1 Answer 1

1

I believe that syntax is declaring multiple attachments. This works for waterways because they are all the same colour, no layering is involved, so ordering does not matter.

Without the attachments, this turns into a combinatorial explosion, which is a fundamental problem with carto.

This technique cannot be used for layers like the landcover layer, where ordering does matter, hence a truly horrific SQL statement.

Andy Allan's State of the Map US 2013 talk has some more information about this approach, and the drawbacks to each way.

1
  • Thanks Paul, I kinda got it now. But if multiple attachements break ordering (and I still guess what is the drawing order in such cases) then why SQL query has this: ORDER BY z_order, way_area DESC ? Maybe this isn't quite related to the question, but the same query has way_area/(!pixel_width!*!pixel_height!) and Tilemill returns a "Division by zero" error when creating a new layer. Are Mapnik tokens allowed here?
    – mofoyoda
    Commented Sep 29, 2014 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.