Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electrification style #24

Merged
merged 19 commits into from
Feb 11, 2021
Merged

Electrification style #24

merged 19 commits into from
Feb 11, 2021

Conversation

Nakaner
Copy link
Collaborator

@Nakaner Nakaner commented Feb 25, 2020

This is the current state of work on the electrification style.

Rastatt at zoom levels 11, 13 and 16:

electrification_rastatt_z11
electrification_rastatt_z13
electrification_rastatt_z16

Wendlingen (zoom level 11):

electrification_wendlingen_z11

Europe at zoom level 4 (The database used for this test contained data of Europe only):

electrification_z4

Sande (zoom level 8 and 12):

electrification_z8
electrification_z12

Karlsruhe (zoom level 17):
electrification_ka_z17

Power off section between Delitzsch u Bf and Rackwitz (bei Leipzig) at zoom level 17:
electrification_null_z17

@DerDakon
Copy link
Contributor

The dashing you showed in the preview images is not in the style anymore, see also #14.

@jonsger
Copy link
Contributor

jonsger commented Jun 26, 2020

So what is required for merge? Change the style of railway lines under construction?

Nakaner and others added 14 commits August 22, 2020 12:04
* Add missing fields in SQL queries and views
* Add missing functions
* Remove maxspeed stuff
Before: 909 kB 57 seconds, afterwards 724 kB 15 seconds
This requires preprocessing with SQL because otherwise we would end up
with transpilation times of more than 4 minutes and 6.5 MB XML instead
of 737 kB.
* fix bugs in SQL queries
* equal minimal zoom levels for lines and labels
* fix SQL function
This makes lines without electrification but one in future
(proposed/construction) to appea as colored dashed lines on top of a
black line.
An additional style for the fill layers is not going to work reliably.
Changes to order of the .mss files which seem to have to same meaning
from a style author point of view lead to different results in XML and
make authors become crazy. Splitting of into a separate layer is a bit
more difficult because we need compositing operations to achieve the
same effect but it makes working on the style easier.
This applies the changes from #34 to the electrification style.
This was a leftover of copy-pasting.
@Nakaner Nakaner marked this pull request as ready for review August 23, 2020 09:37
@Nakaner
Copy link
Collaborator Author

Nakaner commented Aug 23, 2020

Please mind that the images shown in the comments above do not reflect the changes I made in later commits. However, the tiles at https://tiles.openrailwaymap.org/#osm.org/9/53.304495/8.340068&overlays=electrification are up to date.

@DerDakon
Copy link
Contributor

With the current tiles, I see the following problems:

  • at zoom 7 and 8 existing lines with proposed/construction are just shown in grey (see Oldenburg - Wilhelmshaven)
  • new tracks under construction with electrification are not shown at all (Bahnumfahrung Sande)

@c933103
Copy link

c933103 commented Sep 6, 2020

Issues:

  1. Currently, railway tagged as frequency=0 (explicitly DC electrification) and railway without specific frequency tag (could be just the editor forgot to put the tag in) apparently isn't being distinguished and both show a "=" sign after their voltage. If my observation is correct then please change the rendering to show DC electrification line differently from rail lines without frequency tag.
  2. Currently, the style does not appears to indicate information like third rail electrification or overhead line? Can this be added into the style?
  3. I don't understand way OSM way 244938138 and OSM way 41703938 are now rendered in different color despite they are both 1500V DC contact line electrification. Can someone explain what's their different?

@Nakaner
Copy link
Collaborator Author

Nakaner commented Feb 6, 2021

@c933103 wrote:

  1. Currently, railway tagged as frequency=0 (explicitly DC electrification) and railway without specific frequency tag (could be just the editor forgot to put the tag in) apparently isn't being distinguished and both show a "=" sign after their voltage. If my observation is correct then please change the rendering to show DC electrification line differently from rail lines without frequency tag.

I admit that I have never thought about ways with voltage=* but without frequency=*. I queried the database and got the following numbers of electrified ways with railway=rail and unset frequency=* tag. The following list is grouped by voltage (total number is 5964):

gis=# select count(1) as number, voltage from openrailwaymap_osm_line where osm_id > 0 and railway = 'rail' and electrified IS NOT NULL and electrified != 'no' and voltage IS NOT NULL AND frequency IS NULL group by voltage order by number desc;
 number | voltage 
--------+---------
   2151 | 3000
   1534 | 25000
   1412 | 1500
    451 | 800
    100 | 15000
     93 | 1200
     82 | 0
     58 | 600
     30 | 20000
     30 | 750
     14 | 50000
      3 | 33000
      2 | 3400
      2 | 10000
      1 | 138000
      1 | 1000

On the other hand, we have 753,912 ways with frequency set.

The MapCSS style does not show a = character if there is not frequency set. Therefore, I removed it a few minutes ago.

  1. Currently, the style does not appears to indicate information like third rail electrification or overhead line? Can this be added into the style?

Yes, but this is out of scope for this pull request. The pull request aims to rebuild the MapCSS map style as that style is.

  1. I don't understand way OSM way 244938138 and OSM way 41703938 are now rendered in different color despite they are both 1500V DC contact line electrification. Can someone explain what's their different?

There are not differences in rendering. Even their edit history does not explain any differences back then when you wrote your comment.

arrow

@DerDakon
Copy link
Contributor

DerDakon commented Feb 7, 2021

When you look on the other 1.5kV track at the upper right of your image, there are some segments that are rendered in gray. I suspect there are actually 2 tracks close to each other, one of them without electrification tagging.

This commit adds coloured dashing for railway=construction without
usage=* and service=*.
On zoom < 9, electrification under construction and proposed
electrification is rendered like electrified=no.
@Nakaner
Copy link
Collaborator Author

Nakaner commented Feb 11, 2021

With the current tiles, I see the following problems:

  • at zoom 7 and 8 existing lines with proposed/construction are just shown in grey (see Oldenburg - Wilhelmshaven)

I fixed this.

Zoom 8:

z8-small

Zoom 9:

z9-small

  • new tracks under construction with electrification are not shown at all (Bahnumfahrung Sande)

umfahrung-sande-small

The bug became visible because the track has neither usage=* nor service=*.

Copy link
Contributor

@DerDakon DerDakon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's start with what we have and improve incrementally, otherwise this will take another year or more.

@Nakaner Nakaner merged commit dbd054a into master Feb 11, 2021
@DerDakon DerDakon deleted the electrification branch October 22, 2022 12:13
@DerDakon DerDakon added enhancement fixed in MapCSS This issue has been resolved in MapCSS and is likely a feature which has not been ported to CartoCSS style:electro electrification style labels Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed in MapCSS This issue has been resolved in MapCSS and is likely a feature which has not been ported to CartoCSS style:electro electrification style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants