OpenGeofiction

Transit layer

Posted by Dmdogs900 on 19 July 2018 in English (English)

In the real life open street map there is a transit layer I think this should be added to open geofiction

Comment from Dmdogs900 on 19 July 2018 at 20:20

Ps there other layers too

Hide this comment

Comment from austinhuang on 20 July 2018 at 13:56

Transit layer has been mentioned before. I don't think it's an option to add more layers right now since there's server load and other stuff

Hide this comment

Comment from andrepoiy on 21 July 2018 at 19:59

It would be cool to see transit... Really cool...

Hide this comment

Comment from FancyFoxy on 21 July 2018 at 23:13

I think the layer would be useful for making bus routes. On OpenStreetMap, bus routes only show on the Transit layer.

Hide this comment

Comment from austinhuang on 22 July 2018 at 00:39

Indeed. I personally would like to see a transit layer as well, but let's see if we actually have the ability to do so.

Hide this comment

Comment from Eevee on 22 July 2018 at 16:40

I would like to have a transit layer too. I know I will plan bus routes for my cities so it would be nice to see the bus network easily on the map.

Hide this comment

Comment from Subway on 22 July 2018 at 21:54

You can see transit routes with the route relations tool here. You just have to set your transit routes as relations (which you should be doing), and you can also even colour the lines with the colour tag.

The Reload button allows the page to reload all the relations in the area of the map you are looking at.

Hide this comment

Comment from austinhuang on 22 July 2018 at 21:59

Apparently that tool also shows road route relations (route=road). Is it possible to restrict the rendering to public transit routes? (Ref)

Hide this comment

Comment from Subway on 22 July 2018 at 22:25

You can just download and run the page locally. Just modify the underlying source code and add a filter so that it retrieves the route relations that follow your specific conditions (i.e. if you only want route = bus, or (route = bus OR train OR tram OR light_rail)). At a quick glance the only place I think you need to make a change is in the ogf.publicTransport function.

Hide this comment

Comment from austinhuang on 22 July 2018 at 23:59

the actual place that needs modification to make the change is loadRouteData

So I guess the alternative is here, changes from the original one are:

  • Bus/Train/Tram/Light Rail only
  • stop:1 (Or whatever number follows other than 1) is now rendered as stops

As a result...

  1. TCC would like this
  2. This should be sufficient to work as an external transit layer.
Hide this comment

Comment from Luciano on 23 July 2018 at 00:17

That is excellent. Tarrases looks good.

Hide this comment

Comment from nehalem501 on 23 July 2018 at 07:04

How is determined the displayed colour of the line / relation ? It could be nice to take into account the "colour" tag. And also the transport mode if no colour is given.

As the relation rendering is done on the client, it would be nice to have options on which transport mode you want to display.

Hide this comment

Comment from The_Cute_Chick on 23 July 2018 at 09:24

I do hope that one day some form of transit tool/feature would be implemented on OGF.

It is unfortunate [for me] that the current route relations tool only works from zoom 10 and closer zooms since I do map some large relations that cannot be fully seen with zoom 10.


@austinhuang,

stop:1 (Or whatever number follows other than 1) is now rendered as stops

What I find interesting is that stop:1 is rendered as stops for bus routes relations but not for rail route relations (in the case of the rail routes I have supplied, Ywearley Glade and San Juesto stations are not rendered as stops).

So my question is "why stop:1 is not rendered as a stop for rail routes when they are for bus routes?".

Hide this comment

Comment from austinhuang on 23 July 2018 at 12:56

@TCC You didn't supply member role on either station. So there's no stop:1. In San Juesto line relation the last line says "Node 114576503" with no "as..." following. The alternative works from Zoom 6, but it might change.

@nehalem501 It does take colour into account, check if it's a valid value (HTML colour or HEX code). My knowledge is limited and I'd like someone else to improve on it.

Hide this comment

Comment from nehalem501 on 23 July 2018 at 12:58

@austinhuang If someone has a github/gitlab repo with the code for this, I'll gladly take a look at what's possible.

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment