Comments (6)
geocoder-abbreviations is more comprehensive; however, it doesn’t distinguish the more aggressive abbreviations from the less aggressive ones. You’d need to be careful about applying abbreviations only to words that are unlikely to be the base name, so that “South Park Street” would get abbreviated as “S Park St” rather than “S Pk St”, which wouldn’t be very recognizable. This touches on a broader problem with OSM’s unstructured representation of street names, combined with insisting on spelled-out words in name
, but some heuristics like avoiding abbreviating the middle word(s) could help.
from planetiler.
mapnik-german-l10n doesn’t produce very good results in English because it has to avoid stepping on the toes of the French abbreviation code and also abbreviates words out of context (e.g., “Court Street” becomes “Ct Street”). I’d imagine it would be straightforward to write more robust abbreviation code from scratch. Ideally, the abbreviator would know the country that the feature is in, allowing it to make language-specific assumptions about name
and perhaps avoid abbreviating a French name in France that was copied to name:en
.
/ref openmaptiles/openmaptiles#1360
from planetiler.
Some possible data sources:
These projects have different use cases, so they apply different inclusion criteria. The abbreviations in OSRM Text Instructions are used by the Mapbox Directions API, which tags words in name
or destination
with potential abbreviations that the Mapbox Navigation SDK can progressively apply1 until the text fits the allotted space. Priority is given to directions
abbreviations, then classifications
abbreviations, then abbreviations
abbreviations in a last-ditch attempt to make the text fit.
Mapnik has a similar ability to progressively abbreviate labels, but as you’ve noted, MapLibre does not yet have this capability. If you use OSRM Text Instructions’ abbreviations without progressive abbreviation, avoid the abbreviations
table, which would make the results look desperate but probably wouldn’t salvage many labels of borderline length.
Footnotes
from planetiler.
Thanks for the feedback @1ec5 ! Of those 3 options above, I was leaning towards geocoder-abbreviations since it includes things like "one" -> "1" and "fifteenth" -> "15th" with something like: point -> country -> default language for that country -> tokens file for that language. Do you foresee any issues going that route? Or alternatively are you aware of any other better data sources to power these kinds of abbreviations?
from planetiler.
Good points, I'll keep a running list of test cases that should pass at the top of this issue.
Another thought I had was using libpostal (https://github.com/openvenues/jpostal) to try to extract some more structure from raw street names. Not sure it would handle street names and not addresses though...?
from planetiler.
Moved the openmaptiles profile to https://github.com/openmaptiles/planetiler-openmaptiles. This ticket will track adding the generic capability of abbreviating road-names, and openmaptiles/planetiler-openmaptiles#17 will track using that from the openmaptiles profile.
from planetiler.
Related Issues (20)
- [FEATURE] Merge with already existing tiles HOT 2
- Prefer name statements over Wikidata labels HOT 2
- [FEATURE] Log problematic geometry causing JTS exceptions HOT 22
- [FEATURE] Min polygon area for including center point
- [FEATURE] Expose OSM entity metadata in the process feature context HOT 2
- [FEATURE] Lua profile followups
- [BUG] US admin level 4 boundary lines appear incomplete HOT 3
- Tilejson attributes missing attributes added or removed during post-processing
- [BUG] tiles missing >= zoom 7 HOT 13
- [FEATURE] Log planet version being used HOT 2
- [BUG] Charging stations won't be exported HOT 4
- [FEATURE] Add arbitrary extra metadata using the Profile interface
- [BUG] GeoPackageReader with EPSG:3067 results in swapped lat & lng
- [BUG] IOException/GOAWAY happening in parseResults()
- [FEATURE] Speed-up Planetiler by skipping OSM reads when generating only layers which do not need OSM data HOT 2
- Derive progress % from logs
- [FEATURE] Clarify documentation on CLI function arguments HOT 2
- Use google/cel-java ?
- [FEATURE] OSM multiline relation handling HOT 8
- [FEATURE] Please clarify what triggers "match_key" in YAML configurations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from planetiler.