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

highway=services is an area #137

Closed
al-- opened this issue Aug 28, 2013 · 15 comments
Closed

highway=services is an area #137

al-- opened this issue Aug 28, 2013 · 15 comments
Labels
bug new features Requests to render new features roads

Comments

@al--
Copy link

al-- commented Aug 28, 2013

highway=services implicitely defines an area.

Please render it as an area (but not pink, if possible...).

@pnorman
Copy link
Collaborator

pnorman commented Sep 4, 2013

Just to be clear, is the issue solely one of a default assumption about what is/is not an area?

@al--
Copy link
Author

al-- commented Sep 4, 2013

Currently it is not rendered as an area, for instance:

http://www.openstreetmap.org/browse/way/187691678
steinhusl 2

@dieterdreist
Copy link

2013/9/4 al-- notifications@github.com

Currently it is not rendered as an area, for instance:

http://www.openstreetmap.org/browse/way/187691678https://f.cloud.github.com/assets/1458456/1080291/216f3a52-1561-11e3-9ce1-9685bf8e1a50.png

you have to add explicitly area=yes to specify it is an area. Current
osm2pgsql doesn't allow for k/v-tags to be defined as area default (only at
key-level). All highway tags are considered non-areas as long as they don't
have an area=yes tag.

@gravitystorm
Copy link
Owner

That's a bug in osm2pgsql then. If highway = services is always an area in openstreetmap, then mappers shouldn't be forced into adding an additional tag just because a particular piece of software can't handle it.

Of course, we can also work around it with a carefully constructed SQL statement, so we might not need any changes to osm2pgsql. But please don't ask mappers to add unnecessary tags!

@dieterdreist
Copy link

2013/9/4 Andy Allan notifications@github.com

That's a bug in osm2pgsql then. If highway = services is always an area in
openstreetmap, then mappers shouldn't be forced into adding an additional
tag just because a particular piece of software can't handle it.

Of course, we can also work around it with a carefully constructed SQL
statement, so we might not need any changes to osm2pgsql. But please don't
ask mappers to add unnecessary tags!

you are right, but this is a well known limitation of osm2pgsql for years,
there are also other frequently used tags involved, e.g. leisure=track
(this time the other way round). AFAIK it isn't resolved by adding a
tag-level config file to osm2pgsql because devs are hoping for a dedicated
area data type in the next API version. This would also solve situations
(require to better structure them) where people are using the same object
as linear and as polygon feature (e.g. landuse=*, barrier=fence).

@pnorman
Copy link
Collaborator

pnorman commented Sep 4, 2013

Of course, we can also work around it with a carefully constructed SQL statement, so we might not need any changes to osm2pgsql. But please don't ask mappers to add unnecessary tags!

Do we want to be taking this on in osm-carto? If so I can do so, I've written similar statements for addressmerge that do so efficiently

@matthijsmelissen
Copy link
Collaborator

devs are hoping for a dedicated area data type in the next API version

Has any progress been made with respect to this issue?

@gravitystorm
Copy link
Owner

Has any progress been made with respect to this issue?

I wouldn't hold my breath - if it happens, it'll be 6+ months away.

@matthijsmelissen
Copy link
Collaborator

@pnorman If you have time, I would be interested to see how the SQL would look like, yes.

@matthijsmelissen matthijsmelissen modified the milestones: 3.x - Needs upgrade to openstreetmap-carto.style, Bugs and improvements Feb 16, 2015
@matthijsmelissen
Copy link
Collaborator

Best done with osm2pgsql on import.

matthijsmelissen added a commit to matthijsmelissen/osm2pgsql that referenced this issue Apr 28, 2015
This allows the decision whether an object is treated as polygon or linestring
to be set in the style.lua file.

In particular, it treats man_made=embankment and natural=cliff as linestring,
and highway=services as polygon.

Including this in the default style.lua file has the following advantages:
* It serves as an easy-to-extend example of how the polygon/linestring decision
  can be made based on key.
* It provides sane defaults - it can be expeced that most users of the style
  want to treat man_made=embankment and natural=cliff as linestring, and
  highway=services as polygon.

This resolves the following downstream bugs in openstreetmap-carto:
* gravitystorm/openstreetmap-carto#892
* gravitystorm/openstreetmap-carto#268
* gravitystorm/openstreetmap-carto#137

This builds on osm2pgsql-dev#345, and thus assumes osm2pgsql-dev#345 is merged first.
matthijsmelissen added a commit to matthijsmelissen/osm2pgsql that referenced this issue Apr 28, 2015
This allows the decision whether an object is treated as polygon or linestring
to be set in the style.lua file.

In particular, it treats man_made=embankment and natural=cliff as linestring,
and highway=services as polygon.

Including this in the default style.lua file has the following advantages:
* It serves as an easy-to-extend example of how the polygon/linestring decision
  can be made based on key.
* It provides sane defaults - it can be expected that most users of the style
  want to treat man_made=embankment and natural=cliff as linestring, and
  highway=services as polygon.

This resolves the following downstream bugs in openstreetmap-carto:
* gravitystorm/openstreetmap-carto#892
* gravitystorm/openstreetmap-carto#268
* gravitystorm/openstreetmap-carto#137

This builds on osm2pgsql-dev#345, and thus assumes osm2pgsql-dev#345 is merged first.
matthijsmelissen added a commit to matthijsmelissen/osm2pgsql that referenced this issue Apr 28, 2015
This allows the decision whether an object is treated as polygon or linestring
to be set in the style.lua file.

In particular, it treats man_made=embankment and natural=cliff as linestring,
and highway=services as polygon.

Including this in the default style.lua file has the following advantages:
* It serves as an easy-to-extend example of how the polygon/linestring decision
  can be made based on key.
* It provides sane defaults - it can be expected that most users of the style
  want to treat man_made=embankment and natural=cliff as linestring, and
  highway=services as polygon.

This resolves the following downstream bugs in openstreetmap-carto:
* gravitystorm/openstreetmap-carto#892
* gravitystorm/openstreetmap-carto#268
* gravitystorm/openstreetmap-carto#137

This builds on osm2pgsql-dev#345, and thus assumes osm2pgsql-dev#345 is merged first.
@joakimfors
Copy link

Found this in osm2pgsql-dev/osm2pgsql#346

Why should a closed highway=service automatically be treated as area when no other highway= is? I know of a lot of places where service is mapped as closed ways but aren't areas IRL.

@HolgerJeromin
Copy link
Contributor

We talk about highway=services not highway=service here :-)

@matthijsmelissen
Copy link
Collaborator

http://wiki.openstreetmap.org/wiki/Tag:highway%3Dservices

Very confusing, I admit.

@joakimfors
Copy link

Ah, sorry. I shouldn't comment on issues in the middle of the night. ;)

@jojo4u
Copy link

jojo4u commented Jul 25, 2015

Please also treat highway=rest_area as area, it's the small cousin of services (http://wiki.openstreetmap.org/wiki/Tag:highway%3Drest_area).

matthijsmelissen added a commit to matthijsmelissen/osm2pgsql that referenced this issue Feb 21, 2016
This allows the decision whether an object is treated as polygon or linestring
to be set in the style.lua file.

In particular, it treats man_made=embankment and natural=cliff as linestring,
and highway=services as polygon.

Including this in the default style.lua file has the following advantages:
* It serves as an easy-to-extend example of how the polygon/linestring decision
  can be made based on key.
* It provides sane defaults - it can be expected that most users of the style
  want to treat man_made=embankment and natural=cliff as linestring, and
  highway=services as polygon.

This resolves the following downstream bugs in openstreetmap-carto:
* gravitystorm/openstreetmap-carto#892
* gravitystorm/openstreetmap-carto#268
* gravitystorm/openstreetmap-carto#137

This builds on osm2pgsql-dev#345, and thus assumes osm2pgsql-dev#345 is merged first.
matthijsmelissen added a commit to matthijsmelissen/osm2pgsql that referenced this issue Apr 3, 2016
This allows the decision whether an object is treated as polygon or linestring
to be set in the style.lua file.

In particular, it treats man_made=embankment and natural=cliff as linestring,
and highway=services as polygon.

Including this in the default style.lua file has the following advantages:
* It serves as an easy-to-extend example of how the polygon/linestring decision
  can be made based on key.
* It provides sane defaults - it can be expected that most users of the style
  want to treat man_made=embankment and natural=cliff as linestring, and
  highway=services as polygon.

This resolves the following downstream bugs in openstreetmap-carto:
* gravitystorm/openstreetmap-carto#892
* gravitystorm/openstreetmap-carto#268
* gravitystorm/openstreetmap-carto#137

This builds on osm2pgsql-dev#345, and thus assumes osm2pgsql-dev#345 is merged first.
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue May 16, 2016
This PR proposes a database-reload. It changes the documentation on the use of
osm2pgsql, and adds a .lua file for preprocessing.

This database import aims to be backwards compatible with older versions of
the style.

This resolves (at least part of) gravitystorm#1504.

Adding the hstore option to osm2pgsql allows the database to use all keys.

This PR proposes using hstore for new keys, and using traditional columns for
old keys. This allows us to stay compatible with old versions of the style.

According to [@pnorman's benchmarks](http://www.paulnorman.ca/blog/2014/03/osm2pgsql-and-hstore/),
using hstore without dropping columns would lead to a 9% size increase and a
0.38% speed decrease. Given the benefits of having all columns available, I
would consider this acceptable.

This is based on the following unmerged PR to osm2pgsql:
osm2pgsql-dev/osm2pgsql#346

It makes the polygon/linestring decision based on the tag value, in addition to
the tag key. In particular, highway=services and junction=yes are now treated as
polygon, while leisure=track, man_made=embankment, man_made=breakwater,
man_made=groyne, natural=cliff, natural=tree_row, historic=citywalls,
waterway=derelict_canal, waterway=ditch, waterway=drain, waterway=river,
waterway=stream, waterway=wadi, waterway=weir, power=line, and power=minor_line
are now treated as linestring.

This resolves gravitystorm#1362, resolves gravitystorm#137, resolves gravitystorm#268, and resolves gravitystorm#892.

The new .lua file creates a osmcarto_z_order value in the database, which stores
the rendering order we use. This will allow us to simplify the road queries.

This resolves gravitystorm#59.

This resolves gravitystorm#101.

The .lua file drops some more meta-information from imports that is of no
need for rendering.

This is based on the following unmerged PR to osm2pgsql:
* osm2pgsql-dev/osm2pgsql#532
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue May 16, 2016
This PR proposes a database-reload. It changes the documentation on the use of
osm2pgsql, and adds a .lua file for preprocessing.

This database import aims to be backwards compatible with older versions of
the style.

This resolves (at least part of) gravitystorm#1504.

 #Hstore
Adding the hstore option to osm2pgsql allows the database to use all keys.

This PR proposes using hstore for new keys, and using traditional columns for
old keys. This allows us to stay compatible with old versions of the style.

According to [@pnorman's benchmarks](http://www.paulnorman.ca/blog/2014/03/osm2pgsql-and-hstore/),
using hstore without dropping columns would lead to a 9% size increase and a
0.38% speed decrease. Given the benefits of having all columns available, I
would consider this acceptable.

 # Make polygon/linestring decision based on value
This is based on the following unmerged PR to osm2pgsql:
osm2pgsql-dev/osm2pgsql#346

It makes the polygon/linestring decision based on the tag value, in addition to
the tag key. In particular, highway=services and junction=yes are now treated as
polygon, while leisure=track, man_made=embankment, man_made=breakwater,
man_made=groyne, natural=cliff, natural=tree_row, historic=citywalls,
waterway=derelict_canal, waterway=ditch, waterway=drain, waterway=river,
waterway=stream, waterway=wadi, waterway=weir, power=line, and power=minor_line
are now treated as linestring.

This resolves gravitystorm#1362, resolves gravitystorm#137, resolves gravitystorm#268, and resolves gravitystorm#892.

 # Rendering order
The new .lua file creates a osmcarto_z_order value in the database, which stores
the rendering order we use. This will allow us to simplify the road queries.

 # Recommend -G flag for multipolygons
This resolves gravitystorm#59.

 # Import ele on buildings
This resolves gravitystorm#101.

 # Delete more meta-tags from imports
The .lua file drops some more meta-information from imports that is of no
need for rendering.

This is based on the following unmerged PR to osm2pgsql:
* osm2pgsql-dev/osm2pgsql#532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new features Requests to render new features roads
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants