gravitystorm / openstreetmap-carto

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

Add rendering for elevators #720

Closed matthijsmelissen closed 9 years ago

matthijsmelissen commented 10 years ago

Elevators should be rendered as icon.

See also https://trac.openstreetmap.org/ticket/3545.

matkoniecz commented 10 years ago

Elevators are tagged highway=elevator ( http://wiki.openstreetmap.org/wiki/Tag:highway%3Delevator )

k1wiosm commented 9 years ago

This would be nice. Any idea when will this be added?

matthijsmelissen commented 9 years ago

The problem is that some elevators are very important (the public elevators in Lisbon and Luxembourg come to mind), but others are totally irrelevant for a general purpose map (elevators inside small offices for example). We currently have no way to distinguish them.

@k1wiosm Did you have any particular elevator in mind?

k1wiosm commented 9 years ago

I was thinking about a public elevator in this university (http://www.openstreetmap.org/#map=19/32.77629/-117.07330).

Definitely, only public elevators shoud be shown on the map. Is there really elevators inside small offices mapped on OSM?

matkoniecz commented 9 years ago

@k1wiosm Certainly some people will start mapping anything that is rendered. Includinh indoor elevators in any high building.

pnorman commented 9 years ago

I'm uncertain on this. Elevators would be more useful if we rendered elevation via hillshading and/or contour lines.

kocio-pl commented 9 years ago

Elevators are important on viaducts, subway/train stations or underground footway passages and other transportation-related places, even without other ground elevation context. I would be very happy to see them there as I draw a lot of footways and it's not always clear how are they linked between the levels.

But I don't know how to easily recognize which one elevator is important public amenity and which one is private or useful only in the building context. For example train station elevator is of course a not-that-interesting building feature to get to the x floor, but it works mainly as the important link between footway and the platform in a journey planning (be it with heavy luggage, on wheelchair or with a bicycle), so it is useful in a broader context than the building itself.

I also remember people with physical disabilities needs them also in places like townhalls or shopping centers, so I tend to think it would be good to know they are there.

RAytoun commented 9 years ago

@kocio-pl You have raised an important strong case for showing elevators as a means for the physically disabled to plan their way through towns even if it includes shop and office elevators. By showing a visual difference to the rendered symbols it will highlight which elevators are a part of a route through the town and which are specific to a building.

kocio-pl commented 9 years ago

Maybe we need to sort them out by the access=* tag (just like we do for public/private parkings). I think all the public places and some semi-public (like shopping centers, which are open to the public even if privately-owned) should have the elevators visible.

kocio-pl commented 9 years ago

My proposition for elevator icon (10 px): 1) elevator-10-5

mboeringa commented 9 years ago

My proposition for elevator icon (10 px):

Looks fine

kocio-pl commented 9 years ago

Field test shows it's too small, so I made a 12 px draft: elevator-12-z19 elevator12-z19-tarasy

Notes of the current state:

  1. Icons are shown from z18 and name should be visible from z19, however I couldn't find elevator with name in Warsaw, so this is still not tested.
  2. I'm still not sure if they should be maybe 14px, because there's so much visual distractions in the first example and I guess that may be the issue in many other places (footways with casing or other things in dense places).
  3. Private part not implemented - I have to check how it's made in cases like parkings.
  4. Generally I copy-pasted the bus stop styling and I'm even more overwhelmed with project.yaml than when dealing with shops. Let me know if something should be done different here or in amenity-points.mss.
mboeringa commented 9 years ago

Icons are shown from z18 and name should be visible from z19, however I couldn't find elevator with name in Warsaw, so this is still not tested.

I doubt you need to render any name labels for this feature, unless you intend to render any indoor elevator with its name / ref number also... In the rare case an elevator is a historic relic and tourism attraction, like the Santa Justa elevator in Lisbon Portugal (http://www.openstreetmap.org/way/115238861), it will have been tagged as such, and show up anyway.

kocio-pl commented 9 years ago

Sure, fixed it, so at least 1. is clear now.

kocio-pl commented 9 years ago

Could somebody help me please - I don't quite get what is the problem with this syntax:

  [feature = 'highway_elevator'][zoom >= 18] {
    [access = ''],
    [access = 'public'],
    [access = 'yes'] {
      marker-file: url('symbols/elevator-12.svg');
      marker-fill: @transportation-icon;
      marker-placement: interior;
    }
  }

I took these access values from a parking feature. I guess the problem is with [access = ''], which is probably essential, because most of public elevators won't have any access tag.

On the other hand private elevators are a minority, like this one in Berlin, so maybe we can not try to hide them.

matkoniecz commented 9 years ago

@kocio-pl What is happening? What you expected? What and how went wrong?

kocio-pl commented 9 years ago

When the code looks like this:

  [feature = 'highway_elevator'][zoom >= 18] {
      marker-file: url('symbols/elevator-12.svg');
      marker-fill: @transportation-icon;
      marker-placement: interior;
  }

the elevator icon is visible within specified range (all elevators on z18+), but with the access restrictions test added, it disappears completely.

pnorman commented 9 years ago

The problem is [access = '']. Checking for null has been annoying within carto, but I believe is now possible.

https://github.com/mapbox/carto/issues/75#issuecomment-11861115 indicates [field=null] works

mapbox/carto#227 is somewhat related, but not what you want here

HolgerJeromin commented 9 years ago

Access = public is imo only defined for toilets. All other features should use only the value yes

kocio-pl commented 9 years ago

OK, PR is ready, thanks for all the help!

But both comments suggest this part of code meant for visually "hide" any non-public parking places is flawed:

    [access != ''][access != 'public'][access != 'yes'] {
      marker-opacity: 0.33;
    }

and instead should look like:

    [access != null][access != 'yes'] {
      marker-opacity: 0.33;
    }

Am I right?

pnorman commented 9 years ago

But both comments suggest this part of code meant for visually "hide" any non-public parking places is flawed:

    [access != ''][access != 'public'][access != 'yes'] {
      marker-opacity: 0.33;
    }

and instead should look like:

    [access != null][access != 'yes'] {
      marker-opacity: 0.33;
    }

Am I right?

Maybe. For some layers (e.g. landuse), null is turned into '' in the SQL - see #1614 for details. This should be changed to check in mss.