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

Add island labels #399

Closed
nvkelso opened this issue Nov 9, 2015 · 14 comments
Closed

Add island labels #399

nvkelso opened this issue Nov 9, 2015 · 14 comments

Comments

@nvkelso
Copy link
Member

nvkelso commented Nov 9, 2015

earth layer label positions:

  • place=island Identifies the coastline of an island (> 1 km2), also consider place=islet for very small islands. zoom 14 default, area adjusted up to zoom 9
  • place=islet Identifies an islet (< 1 km2). zoom 16 default, area adjusted up to zoom 15.
  • place=archipelago {Relation} Identifies the relation of an archipelago, which contains several islands and islets. zoom 14 default, area adjusted up to zoom 9

These islands of southern California have names, but we don't include them yet:

z10/33.9060/-119.9944

screen shot 2015-11-09 at 10 39 54

Looks like the related tag is:

http://wiki.openstreetmap.org/wiki/Tag:place=island

But sometimes it's hiding on relation parts, fun.

@nvkelso
Copy link
Member Author

nvkelso commented Nov 9, 2015

Looks like these would also be useful:

  • place=archipelago {Relation} Identifies the relation of an archipelago, which contains several islands and islets.
  • place=island {Area} Identifies the coastline of an island (> 1 km2), also consider place=islet for very small islands
  • place=islet {Node, Area} Identifies an islet (< 1 km2).

@nvkelso nvkelso added the ready label Dec 18, 2015
@nvkelso nvkelso added this to the v0.7.0 milestone Dec 18, 2015
@nvkelso
Copy link
Member Author

nvkelso commented Dec 18, 2015

Target layer: physical-labels or earth or places, tbd.

@nvkelso
Copy link
Member Author

nvkelso commented Jan 15, 2016

Load balancing to v0.8

@nvkelso nvkelso modified the milestones: v0.8.0, v0.7.0 Jan 15, 2016
@nvkelso nvkelso removed the ready label Jan 15, 2016
@nvkelso nvkelso modified the milestones: v0.8.0, v0.7.0 Jan 15, 2016
@nvkelso nvkelso added the ready label Jan 22, 2016
@rmarianski
Copy link
Member

Is that what's happening in this case? Seems like it's coming through in the tile in the boundaries layer. This looks to be the relevant osm feature.

Can certainly add the places you mentioned, just don't think it'll help with this example, unless I'm missing something.

@rmarianski
Copy link
Member

Err sorry, I see it in the landuse layer. An example tile is: 10/171/409.

@nvkelso
Copy link
Member Author

nvkelso commented Jan 27, 2016

Other candidates, from http://taginfo.openstreetmap.org/tags/natural=strait:

  • natural=peninsula
  • natural=headland
  • natural=cape
  • natural=isthmus

@nvkelso
Copy link
Member Author

nvkelso commented Jan 27, 2016

That feature is the national park, this is the (generic) island, tagged place=island:

Distraction: The one you mention seems to have gotten corrupted somewhere (either in OSM or in our processing), the name of the "county" is not Santa Cruz Island!

@nvkelso
Copy link
Member Author

nvkelso commented Feb 4, 2016

@rmarianski I'd like to reprioritize adding island labels until later in the milestone. If this safe to move into the backlog or do you have partial code for it now?

@rmarianski
Copy link
Member

De-prioritizing sounds good. The actual code change was minimal.

@nvkelso nvkelso removed the in review label Feb 4, 2016
@nvkelso nvkelso modified the milestones: v0.9.0, v0.8.0 Feb 12, 2016
@nvkelso nvkelso modified the milestones: v0.10.0, v0.9.0 Mar 12, 2016
@nvkelso nvkelso added the ready label Apr 1, 2016
@nvkelso
Copy link
Member Author

nvkelso commented Apr 30, 2016

We're getting multiple island labels per feature part for each child tile:

10/33.9741/-119.8279
screen shot 2016-04-30 at 07 16 32

13/37.8595/-122.4186
screen shot 2016-04-30 at 07 13 20

14/37.8147/-122.3811
screen shot 2016-04-30 at 07 12 27

@nvkelso nvkelso added the bug label Apr 30, 2016
@nvkelso nvkelso self-assigned this Apr 30, 2016
@zerebubuth
Copy link
Member

Ooops, yeah. Looks like we need to pre-calculate centroids and split off the label_placement: yes points from the polygons.

@nvkelso nvkelso assigned rmarianski and unassigned nvkelso May 3, 2016
@nvkelso
Copy link
Member Author

nvkelso commented May 3, 2016

@rmarianski can you finish this off, please? I'm fading with jet lag.

If I remove label_position: yes from the output for islands, islets, and archipelago, then that fixes the multiple points per feature problem, but then all the node tests fail. As Matt suggests, we need to select the points separate from the polygons.

Additionally, these 2 polygon tests fail, likely because the resulting point is in a neighboring tile and the test just needs to be updated.

# LARGE island labels (from place polygons)
# http://www.openstreetmap.org/relation/4227580
# Manitoulin Island, Canada
# assert_has_feature(
#     7, 34, 45, 'earth',
#     { 'kind': 'island', 'label_placement': 'yes', 'name': 'Manitoulin Island' })

# LARGE island labels (from place polygons)
# http://www.openstreetmap.org/relation/5176042
# Trinidad, the island of the nation
# assert_has_feature(
#     7, 42, 60, 'earth',
#     { 'kind': 'island', 'label_placement': 'yes', 'name': 'Trinidad' })

@nvkelso
Copy link
Member Author

nvkelso commented May 4, 2016

Working for me :)

screen shot 2016-05-04 at 09 21 08

screen shot 2016-05-04 at 09 20 15

screen shot 2016-05-04 at 09 20 04

screen shot 2016-05-04 at 09 19 59

screen shot 2016-05-04 at 09 19 30

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

No branches or pull requests

3 participants