Skip to content

Power portals render #2107

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

Open
flacombe opened this issue Apr 5, 2016 · 12 comments
Open

Power portals render #2107

flacombe opened this issue Apr 5, 2016 · 12 comments
Labels
Milestone

Comments

@flacombe
Copy link

flacombe commented Apr 5, 2016

Hi,

Recently, power=portal ways and nodes got a bit more used in the db.
http://wiki.openstreetmap.org/wiki/Tag:power%3Dportal
As shown on wiki, power portals may have a strong visual impact and can be used for orientation when they stand in the country.

It may be useful to draw a thinner grey line than power lines over power=portal ways on zoom >= 15
Those structures are often big, as seen on pictures.
http://wiki.openstreetmap.org/wiki/File:Power_substation_portal.jpg

Wiki describes two different options for mapping power portals : ways and nodes but nodes can't easily be rendered on carto for such features.
I think adding a rendering rule for ways only (which is more complete than using power=portal over a single node) is enough.

You can look here to see how those objects are used
https://www.openstreetmap.org/#map=17/47.32641/4.68773
https://www.openstreetmap.org/way/407818672

All the best

François

@matkoniecz matkoniecz added this to the New features milestone Apr 6, 2016
@matkoniecz
Copy link
Contributor

but nodes can't easily be rendered on carto for such features

Render them like power=pole?

@flacombe
Copy link
Author

flacombe commented Apr 6, 2016

Render them like power=pole?

Why not at zoom < 17

What about a little "H" to differ from poles when zoom >= 17?
At line ends, the H is perpendicular to it.
In the middle of a line, it can be placed in the middle of any angle.

Something like this, but lighter, smaller, anything which doesn't clutter the map.
portal

I don't know if mapcss allows such things to happen on mapnik.

@Tomasz-W
Copy link

Tomasz-W commented Jul 13, 2018

Power lines without anything at their end looks weird. I also think that rendering power=portal the same as power=pole is the best solution.

https://github.com/gravitystorm/openstreetmap-carto/blob/master/power.mss
https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/square.svg

@flacombe
Copy link
Author

flacombe commented Jul 14, 2018

Hi Tomasz,

What about large power portal mapped as ways like this ?
https://www.openstreetmap.org/way/367165002
https://wiki.openstreetmap.org/wiki/File:Portal_portal_as_way.png

I use to map them like this in large substations because they can be really huge
https://www.openstreetmap.org/way/398618638

At the intersection with power lines it's usual to find power=insultator objects
https://www.openstreetmap.org/node/2471603110
These would be nice as a green dot the same size as power poles (zoom 17 to 19 only)

@Tomasz-W
Copy link

I think they should be rendered as power lines with power=pole rendering in the middle

@flacombe
Copy link
Author

In the middle of legs ?
I would find confusing to make them look as power lines.
Although osm-carto isn't a dedicated render for power networks, portals don't have the same look than power lines at all.

I provide two possibilities with solid line wider than power lines with dark or light look.
portal_insulator
portal_1
portal_2

@kocio-pl
Copy link
Collaborator

I prefer solid line with dark look. It gives me proper feel of line termination plus it uses the visual feature which is hard to be confused with anything other in this context.

@Tomasz-W
Copy link

It looks very good, so I vote for dots for portal nodes and solid line (it's a little bit too prominent, could be a little bit lighter, I think) for portal linear ways.

@gustavecha Are you going to make a PR?

@turnsole80
Copy link

Agreed on the solid dark line.

@flacombe
Copy link
Author

flacombe commented Jul 15, 2018

Hi, nice to have your feedbacks, thanks

I didn't render it on mapnik but only draw it on paint.net
Can someone test the following code on a mapnik test instance since I don't have any to do this on my own please ?

Here are project.mml edits :

- id: power-portals-way
    geometry: way
    <<: *extents
    Datasource:
      <<: *osm2pgsql
      table: |-
        (SELECT
            way
          FROM planet_osm_lines
          WHERE power = 'portal'
        ) AS power_portals
    properties:
minzoom: 16
- id: power-portals-node
    geometry: point
    <<: *extents
    Datasource:
      <<: *osm2pgsql
      table: |-
        (SELECT
            node
          FROM planet_osm_point
          WHERE power = 'portal'
        ) AS power_portals
    properties:
minzoom: 16
- id: power-insulators-node
    geometry: point
    <<: *extents
    Datasource:
      <<: *osm2pgsql
      table: |-
        (SELECT
            way
          FROM planet_osm_point
          WHERE power = 'insulator'
        ) AS power_insulators
    properties:
minzoom: 16

Here is the corresponding power.mss adds I'd use if I have to :

#power-portals-way {
  [zoom >= 16] {
    width: 3;
    color:#212121;
  }
}
#power-portals-node {
  [zoom >= 16] {
    marker-file: url('symbols/square.svg');
    marker-fill: #212121;
    marker-width: 3;
  }
}
#power-insulators-node {
  [zoom >= 16] {
    marker-file: url('symbols/square.svg');
    marker-fill: #00960F;
    marker-width: 3;
  }
}

All the best

@kocio-pl
Copy link
Collaborator

@gustavecha Could you prepare fork and initiate PR with this code? I would test it then.

@flacombe
Copy link
Author

That's kind of you @kocio-pl
Here you go : #3464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants