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

place=archipelago text is not displayed #3394

Open
jdhoek opened this issue Sep 14, 2018 · 10 comments
Open

place=archipelago text is not displayed #3394

jdhoek opened this issue Sep 14, 2018 · 10 comments
Assignees
Labels
new features Requests to render new features text
Milestone

Comments

@jdhoek
Copy link
Contributor

jdhoek commented Sep 14, 2018

Expected behavior

See a label Isles of Scilly when looking at them.

Actual behavior

No label at any zoom-level. The name of the town Hugh Town is rendered loud and clearly.

Links and screenshots illustrating the problem

scilly-z12
scilly-z11
scilly-z9

@jdhoek
Copy link
Contributor Author

jdhoek commented Sep 14, 2018

Is this a bug in osm-carto, or does place=archipelago require a label-node?

@kocio-pl kocio-pl added the text label Sep 14, 2018
@kocio-pl kocio-pl added this to the New features milestone Sep 14, 2018
@kocio-pl
Copy link
Collaborator

I don't see it anywhere in the code. Would you like to prepare the code?

https://taginfo.openstreetmap.org/tags/place=archipelago

taghistory 45

@kocio-pl
Copy link
Collaborator

However please note that for relations we probably need to resolve this issue first: osm2pgsql-dev/osm2pgsql#230.

@jdhoek
Copy link
Contributor Author

jdhoek commented Sep 14, 2018

Ah… That is the same issue that is blocking rendering of place=quarter relations and such isn't it?

For those kind of relations the current tagging approach favoured seems to be adding a node with place=* (same as the relation) and name=*, and adding that as role=label to the relation. Would that be a suitable approach for this case?

@kocio-pl
Copy link
Collaborator

Ah… That is the same issue that is blocking rendering of place=quarter relations and such isn't it?

Yes, that's bigger problem with relations rendering.

Wen it comes to tagging I think you should ask at Tagging list.

@pnorman
Copy link
Collaborator

pnorman commented Sep 15, 2018

However please note that for relations we probably need to resolve this issue first: openstreetmap/osm2pgsql#230.

No, that issue has nothing to do with rendering what is an administrative relation.

@matkoniecz
Copy link
Contributor

I will change the title to more general.

@matkoniecz matkoniecz changed the title Isles of Scilly, archipelago name not rendered at any zoom-level place=archipelago is not rendered Sep 22, 2018
@matkoniecz matkoniecz changed the title place=archipelago is not rendered place=archipelago text is not displayed Sep 22, 2018
@jeisenbe
Copy link
Collaborator

jeisenbe commented Apr 15, 2019

It looks like some of these are mapped as multipolygon relations, but the wiki page also suggest mapping as a "type=cluster" relation, which is not very clearly defined.

We could render a name label for multipolygons, but our easy options are not great:

  1. Render the name of the archipelago in the center of the largest island
  2. Render the name of the archipelago at the center of every island
  3. Render the name at the geometric center of the archipelago (probably in the ocean)
  4. Render the name of the archipelago along the coastline of the islands

The first 3 options would just be a horizontal label, not aligned to the shape of the archipelago.

Ideally an archipelago would be have a nice curved text label that embraces the chain of islands from end-to-end at the right zoom level.

But to do something like this, we would need to preprocess the archipelago relations and create a new linear way from the overall extent of the islands. I think this would have to be done by a new script or external process? [EDIT: see below; this can actually be done in SQL, no preprocessing require]

@imagico, do you know of any tools that could help with this kind of rendering? There are already 740 archipelagos mapped, too many for hand-placed labels.

@imagico
Copy link
Collaborator

imagico commented Apr 15, 2019

Use of place=archipelago on multipolygons is happening with fairly good consistency. There is some risk of this being abused for tagging descriptions or categories like islands of the Baltic Sea or Macaronesia. Like for place=island the risk of people drawing free form geometries is fairly low. There are a few cases of use of place=archipelago on closed ways for atolls which is not quite correct and should be filtered out for rendering (since an archipelago by definition would not be mappable with a single closed way).

The current documentation of place=archipelago does not provide any definition that limits its use to spatially cohesive groups of islands and therefore could be used to justify any abuse. This is something that i think would need to be fixed before it can be considered for rendering here.

That being said - the French style and the alternative-colors style both implement rendering of archipelagos based on convex hulls. What i use is essentially ST_ClosestPoint(way,ST_PointOnSurface(ST_ConvexHull(way))) plus some more elaborate logic to correctly treat archipelagos extending across the 180 degree meridian.

@mboeringa
Copy link

What i use is essentially ST_ClosestPoint(way,ST_PointOnSurface(ST_ConvexHull(way))) plus some more elaborate logic to correctly treat archipelagos extending across the 180 degree meridian.

I came to the same conclusion: usage of ST_ConvexHull(way) on the multipolygon relations of archipelagos gives decent results.

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

No branches or pull requests

7 participants