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

Expand shield coverage beyond the United States #334

Open
1ec5 opened this issue Jul 5, 2017 · 8 comments
Open

Expand shield coverage beyond the United States #334

1ec5 opened this issue Jul 5, 2017 · 8 comments
Labels
archived Archived issue. blocked Blocked by dependency or unclarity. feature New feature request. topic: localization

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 5, 2017

The turn banner and step table show graphical route shields for a number of route networks in the United States. Shields.plist maps ref prefixes to file name patterns on Wikimedia Commons. Commons has a much larger repertoire of shields, but we’ve run up against the limits of parsing the ref tag on ways, and even what we have now is prone to false positives. For example:

  • CA may denote California or Cantabría, Spain
  • NH may denote New Hampshire or National Highway (e.g., in India)
  • CO may denote Colorado or a county road.
  • We can’t add support for German shields to the turn banner, because we can’t tell whether to use a German, Austrian, Australian, or Chinese shield for A.

Unfortunately, there isn’t a better way to distinguish shields internationally until either Project-OSRM/osrm-backend#482 or Project-OSRM/osrm-backend#333 is implemented. This issue affects routes in the U.S. as well: state trunkline highways in Michigan have the prefix M, which is identical to motorways in several other countries.

For more background on graphical route shields and why they matter in navigation, see gravitystorm/openstreetmap-carto#508 and this OSM diary entry, or watch this talk from State of the Map 2011.

/ref #286 (comment)
/cc @ericrwolfe @danpat @freenerd

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 6, 2017

To illustrate the scale of worldwide shield coverage, MapKit on macOS 10.12 ships with an initial set of 27 packs of shields (/System/Library/PrivateFrameworks/GeoServices.framework/Versions/A/Resources/InitialResources/), each pack containing the shield assets needed for a particular region of the world. 0-0-1-north-america-shields-index-23.shieldindex contains 70 shield designs, while 3-2-2-oceania-shields-index-7.shieldindex contains 17. In all, MapKit supports 3,842 non-transit shield designs, multiplied by screen resolution (1×, 2×, 3×) and image size (XS, S, M, L, XL).

Here’s how I came up with the 3,842 figure:

strings /System/Library/PrivateFrameworks/GeoServices.framework/Versions/A/Resources/InitialResources/*.shieldindex | grep -v TRANSIT | wc -l

As you browse additional regions of the world, MapKit downloads additional shield packs automatically. It’s possible that these lines include all the on-demand assets as well as the ones that come out of the box.

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 7, 2017

For a more realistic (and relevant) figure, I took a look at Wikimedia Commons, which is our current source of shield images. Commons hosts 305 template SVG files, one per design/reflen combination, from which contributors have generated and uploaded 141,592 SVG images that have numerals baked into them, one image per route. There are also 229 shield blanks, one per design/reflen combination, each of which is a vector or raster image that can be composited with numerals. Note that many of these designs are for the county level and below, which are most likely out of scope for this issue. There are also some historical designs represented, which are definitely out of scope.

/cc @kronick

@brsbl-zz
Copy link

@1ec5 looks like both of these have been closed -- still blocked upstream?

Unfortunately, there isn’t a better way to distinguish shields internationally until either Project-OSRM/osrm-backend#482 or Project-OSRM/osrm-backend#333 is implemented.

@stale
Copy link

stale bot commented Jul 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the archived Archived issue. label Jul 26, 2020
@stale
Copy link

stale bot commented Aug 3, 2020

Stale.

@stale stale bot closed this as completed Aug 3, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Aug 5, 2020

Still blocked upstream.

@1ec5 1ec5 reopened this Aug 5, 2020
@stale stale bot removed the archived Archived issue. label Aug 5, 2020
@zugaldia zugaldia added blocked Blocked by dependency or unclarity. and removed blocked: upstream labels Sep 4, 2020
@stale
Copy link

stale bot commented Mar 10, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the archived Archived issue. label Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived Archived issue. blocked Blocked by dependency or unclarity. feature New feature request. topic: localization
Projects
None yet
Development

No branches or pull requests

4 participants