Openstreetmap-carto: Power portals render

Created on 5 Apr 2016  路  12Comments  路  Source: gravitystorm/openstreetmap-carto

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

power

Most helpful comment

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.

All 12 comments

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

Render them like power=pole?

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.

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

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)

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

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

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.

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?

Agreed on the solid dark line.

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

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

That's kind of you @kocio-pl
Here you go : https://github.com/gravitystorm/openstreetmap-carto/pull/3464

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lakedistrictOSM picture lakedistrictOSM  路  3Comments

HolgerJeromin picture HolgerJeromin  路  3Comments

d1g picture d1g  路  4Comments

manfredbrandl picture manfredbrandl  路  5Comments

Phyks picture Phyks  路  3Comments