osmbe / openstreetmap-carto-be

A general-purpose OpenStreetMap mapnik style, in CartoCSS (Belgium)
Other
11 stars 2 forks source link

Icon: brewery #15

Closed seppesantens closed 4 years ago

seppesantens commented 5 years ago

Preferably for both craft=brewery and industrial=brewery. We could use the same icon or differentiate.

Who can deliver the SVG icon(s)?

ghost commented 5 years ago
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
    <path d="m7.0438.083984c-2.4685 5.244e-5-4.4694.50027-4.4688 1.1172.00366.61616 2.0033 1.1152 4.4688 1.1152 2.4663.0002176 4.467-.49889 4.4707-1.1152.000656-.61711-2.0014-1.1174-4.4707-1.1172zm-4.5723 1.498c-.1078.41805-.35284 1.519-.51953 2.918 3.0952 1.2274 7.081 1.3739 10.186-.0019531-.16581-1.4058-.41055-2.4989-.51953-2.916-.67688.7656-3.1979.97918-4.5742.98438-1.6642-.020476-3.9841-.26063-4.5723-.98438zm-.62109 4.0137c-.1157 1.162-.040884 2.3268.044922 3.4258 2.9598 1.7136 7.6233 1.5222 10.297 0 .14108-1.2049.11142-2.2982.04492-3.4258-3.3268 1.2539-7.1345 1.3289-10.387 0zm.24805 4.7754c.22374 1.2536.48311 2.0978.48828 2.1133 5.11e-5.000152.00195.0098.00195.0098h.00195c.18077.83962 2.1202 1.4878 4.4531 1.4883 2.3329-.000484 4.2724-.64866 4.4531-1.4883h.0039s.26365-.8481.49023-2.123c-2.7482 1.385-7.0291 1.5116-9.8926 0z"/>
</svg>

Created by me

ghost commented 5 years ago

It's a barrel. If you're going to use it, please commit with --author M1dgard <M1dgard@users.noreply.github.com> to attribute me

jbelien commented 5 years ago

Not bad at all 👍 Thanks @M1dgard !

seppesantens commented 5 years ago

I like it, simple and elegant at the same time

jbelien commented 5 years ago

So we use that icon for craft=brewery and industrial=brewery ? What color do we use ? The brown color same as the restaurants ?

seppesantens commented 5 years ago

Fine with me!

jbelien commented 4 years ago

I did a bit of cleaning (related to the work we're currently doing with Champs-Libres for our OSMBE tileserver).

What's your opinion on this one ? Should we update our style ?

I like it and I think it's a nice update but maybe the icon is not "clear" enough ?

joostschouppe commented 4 years ago

Looks good to me. The only alternatives I can think of are things like "an industrial buidling with something to clarify the use" (but that's overly complicated for a map) or a "destillation thingy" (but that's not what's actually happening there!)

jbelien commented 4 years ago

I just spent some time to try to figure out how to add it in our openstreetmap-carto-be but tags craft and industrial seems not to be imported/used in the style at the moment.

I'll give it another try later. @nobohan If you have any idea, that would be awesome :)

nobohan commented 4 years ago

Yop, I think we have to do something like that, but I won't do it today ;-):

1) add in openstreetmap-carto.style:

node,way   industrial      text         polygon
node,way   craft      text         polygon

2) add in project.mml, for instance in the layer: "id: amenity-points" something like this

WHEN (industrial IN ('brewery')) OR (craft IN ('brewery')) THEN brewery END,

or, even better, to respect the convention of the carto style:

'industrial_' || CASE WHEN (industrial IN ('brewery')) OR (craft IN ('brewery')) THEN brewery END,

and add the industrial and craft fields in the FROM clause below.

3) add in style/amenity-points.mss

[feature = 'industrial_brewery'][zoom >= 15] {
  marker-file: url('symbols/amenity/brewery.svg');
  marker-fill: @amenity-brown;
  marker-clip: false;
}

And we can also label the brewery with "name"!

jbelien commented 4 years ago

Nice, I knew you were THE guy :P

I understand it works for points but does it also covers the buildings (tags on a area) ? And if so ,what does it do in that case ? The icon and label in the center ?


Looking at the documentation, if I understand correctly

node,way   industrial      text         polygon
node,way   craft      text         polygon

translate both node and way to a polygon anyway and I suppose it then takes the center. I guess it answers my questions :P

jbelien commented 4 years ago

@nobohan Could you review the PR ?

I used

'industrial_' || CASE WHEN industrial IN ('brewery') THEN industrial END,
'craft_' || CASE WHEN craft IN ('brewery') THEN craft END
nobohan commented 4 years ago

Actually polygons with such tags are converted to points using ST_PointOnSurface. So the layer is the UNION of some points and some surfaces converted to points. If you look at the end of the query in project.mml, you have smthg like:

            FROM
              (SELECT
                  ST_PointOnSurface(way) AS way,
                  name,
                  access,
                  aeroway,
                 ...
                FROM planet_osm_polygon
                ...
              UNION ALL
              SELECT
                  way,
                  name,
                  access,
                  aeroway,
                  ...
                  NULL AS way_area
                FROM planet_osm_point
jbelien commented 4 years ago

Actually polygons with such tags are converted to points using ST_PointOnSurface.

Okay, I understand :) Makes sense to use that as well for breweries ! 👌

Does the PR makes sense ? Did I forget something ? :P

nobohan commented 4 years ago

No it is seems OK!

And you corrected me: 'industrial_' || CASE WHEN industrial IN ('brewery') THEN industrial END, is the right query, since smthg like 'industrial_' || CASE WHEN industrial IN ('brewery') THEN brewery END,would fail!

Anyway if carto can compile it, I think there will be no problems with mapnik for serving the tiles.

jbelien commented 4 years ago

Thank you ! 🍾