gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 819 forks source link

Render icon for shop=motorcycle_repair #4146

Open Adamant36 opened 4 years ago

Adamant36 commented 4 years ago

Currently there is no icon for shop=motorcycle_repair. Unfortunately, it has led to a number of motorcycle repair shops wrongly being tagged as shop=motorcycle + motorcycle:repair=yes + motorcycle:sales=no etc etc (or some other long-winded variation). Which isn't correct and pointlessly clutters things, just to have a work around due there not being a specific icon.

The tag currently has 2,714 uses, there is already a generic shop dot for it or a motorcycle icon (in cases where they are miss-tagged). Therefore, a specific icon wouldn't add map clutter. Also, it would be fairly easy to re-purposing the current shop=motorcycle icon by adding a wrench to it. So, I don't see a reason not to add a specific icon for this. Especially since doing so would definitely fit the purpose of the style by improving tagging.

jragusa commented 4 years ago

an icon like this: motorcycle_repair

for comparison shop=motorcycle: motorcycle

Adamant36 commented 4 years ago

Can you create an SVG for it? If so, I'll probably do a PR.

jragusa commented 4 years ago

My apologies for the delay, here is the link for the svg icon: https://gist.github.com/jragusa/da0b98a9cbe5bf8b2f871694cdb9b313

jeisenbe commented 4 years ago

Since this fits in with the style of shop=car vs shop=car_repair it should be reasonable to add this icon. (Compare with https://wiki.openstreetmap.org/wiki/File:Car_repair-14.svg)

Adamant36 commented 4 years ago

@jeisenbe after doing a fresh setup I'm getting an error that the polygon files are missing and it appears they aren't downloaded automatically when running Kosmtik the first time anymore. So, is there an extra step to download them now or something?

BTW, apparently if I copy the polygon files to the data directory I get the same error that they don't exist.

Adamant36 commented 4 years ago

@jeisenbe is there a different or extra step you have to do for the coding to get an icon to render now? I guess the [feature = 'whatever'], section for shops isn't in the amenity file anymore and the code for it only has to be added to the project file in one place now?

Adamant36 commented 4 years ago

@jragusa I can't seem to figure out the code to get it to render. I guess it's changed some since the last time I did a PR. So, any chance you could do a PR for it?

jeisenbe commented 4 years ago

@Adamant36 sorry for the delay.

See https://github.com/gravitystorm/openstreetmap-carto/blob/master/style/amenity-points.mss - under the new /style directory

https://github.com/gravitystorm/openstreetmap-carto/blob/5724017f5b549ba954d9d645c0b2383dd16237d1/style/amenity-points.mss#L1031

Under car_repair add:

[shop = 'motorcycle_repair'][zoom >= 18] {
      marker-file: url('symbols/shop/motorcycle_repair.svg');
      marker-fill: @amenity-brown;
    }