-
Notifications
You must be signed in to change notification settings - Fork 130
Wrong generated XML Style/Rule from MSS #110
Comments
Carto doesn't know that the columns #amenity[tourism='motel'][zoom = 20] {
point-file: url('/usr/share/icons/sjjb/png/accommodation/motel.glow.0092DA.24.png');
} is what it starts out with and merges in #amenity[amenity='bench'][zoom = 20] {
point-file: url('/usr/share/icons/sjjb/png/amenity/bench.glow.8E7409.24.png');
} This results in #amenity[tourism='motel'][zoom = 20][amenity='bench'] {
point-file: url('/usr/share/icons/sjjb/png/amenity/bench.glow.8E7409.24.png');
} However, there's a slight inefficiency in carto as it wouldn't have to generate the second rule because the previous roule would already have rendered all those, so the |
I'll use a different layer for each column then. ie. #amenity which just selects amenity, and #tourism which just selects tourism. I realise now that this generated XML is exactly how I expected the rendering style to be applied. That is, if it finds tourism=motel AND amenity=bench then it will apply the style of the most recent one, which is what the rules generated do, I just didn't realise it needs to write this out to the XML file, as it just blows up the file size to a point that it can't be used. I thought Mapnik would implicitly decide this just from the ([amenity] = 'bench') rule and the ([tourism] = 'motel') rule without the need of another rule dealing with both. Thanks anyway, at least I can fix it it my style sheet. |
You in fact found a valid bug (it generates too many styles), so I'll keep this open. However, this bug shouldn't affect rendering at all; it's only about the efficiency. |
I'm pretty sure this is a dupe of #20 - it's describing the same situation and the same end result. |
Yep, closing as a duplicate of #20 |
This could be a dup of issue #20, but
When I use carto to convert the following mss/mml to xml...
I get...
Notice the XML has rules for
([amenity] = 'bench') and ([tourism] = 'motel')
which given my original mss I can't see how these rules should be present.The text was updated successfully, but these errors were encountered: