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
Render names of power=plant tagged as site relation #2940
Comments
|
Good label placement would be tricky, even for human it is not easy to select good location of label for http://www.openstreetmap.org/relation/6949277 See #2108 that was closed due a poor documentation, but it seems that documentation was improved. |
|
I actually looked at rendering site relations (in a different map style) but in the UK site relation usage was so inconsistent that it made it impractical. Also, as @matkoniecz label placement is going to be difficult (especially in urban or other busy areas). Another problem is that I don't think that osm2pgsql processes node relation members at all currently (that's something I'm planning to change in a fork for a different reason, but that's some way off). Maybe you could have a go at defining which site relations should be rendered, and also how? It should then be possible to "mock up" a rendering in a test server, even without osm2pgsql support. |
I suppose it should just be in the middle - it's the same problem for other large ways and relations. As you can see from: http://overpass-turbo.eu/s/sSM most of the them aren't that too large, so the name in the middle should be ok. I didn't realise there was a problem with type=site relations, but I see this type=mulitpolygon is rendered http://www.openstreetmap.org/relation/2507475 - so what needs to happen to allowed type=site to be rendered? |
|
The problem is that "inside" of an area is well defined, and set of points has no "inside". Can you make a picture with expected placement of the label?
For start, one would need to verify whatever Mapnik od capable of labelling sets of points (likely not, and somebody would need to design, write and test this code) and check whatever osm2pgsql is supporting sets of nodes (likely not and or would again require designing, writing, reviewing and testing code). |
|
Re "what needs to happen" to osm2pgql there's a brief reference to part of the problem at osm2pgsql-dev/osm2pgsql#791 . http://www.openstreetmap.org/relation/2507475 consists of ways, http://www.openstreetmap.org/relation/6949277 mostly of nodes. When the tag transform code is called for a relation only the ways are passed through (or were, the last time I looked). As far as I'm aware, there's currently no code in there that can build a geometry of just a set of points. Maybe you could start digging through previous questions about this sort of thing to see what you can find out about the problems in osm2pgsql/mapnik. In addition to that there are the selection ("which site relations?") and rendering ("how?") side of things to think about. All in all, it's not a simple problem to solve. |
|
I see. Here's an example of a way which connects to all of the outer wind turbines: http://www.openstreetmap.org/way/478476077 Maybe a way could somehow be added to the other relations so that it helps define the outer limits of the site? Not sure how the tagging would work. |
|
I'm not convinced about the tagging there, TBH. If you look at https://map.atownsend.org.uk/maps/map/map.html#zoom=13&lat=55.77155&lon=-3.7278 for example, it renders the whole of the area in a different background colour (compare for example https://map.atownsend.org.uk/maps/map/map.html#zoom=14&lat=53.72154&lon=-1.28438 ). I'm sure if you walk up Black Law https://map.atownsend.org.uk/maps/map/map.html#zoom=16&lat=55.78012&lon=-3.73186 there are wind turbines all around you, but you're not really in the generating station are you? |
|
A couple of remarks here:
|
|
Just for the record: we have a PR ready for rendering power=plant outline (#2839), but it looks like a hard problem too. If nobody help me fix this code to the acceptable form, I plan to close it without merging. |
|
I propose to close this issue per
by @mboeringa |
Many wind farms are correctly tagged as site relations yet their names do not get rendered on the map unless an additional power=plant way is added around them. This should be fixed to avoid duplication.
For example:
http://www.openstreetmap.org/relation/6949277 - name not rendered
http://www.openstreetmap.org/way/492184731 - same wind farm, name rendered
The text was updated successfully, but these errors were encountered: