-
-
Notifications
You must be signed in to change notification settings - Fork 81
[WIP] Add Overture data source support #541
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
Draft
migurski
wants to merge
77
commits into
protomaps:main
Choose a base branch
from
migurski:migurski/add-overture-basemap-source
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] Add Overture data source support #541
migurski
wants to merge
77
commits into
protomaps:main
from
migurski:migurski/add-overture-basemap-source
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ined failure with aerodrome/iata tags
…tags for zoom checks
…and line splitting - Updated 6 existing tests to include access_restrictions and road_flags data - Added 6 new splitting tests for partial bridge/tunnel/oneway/level application - Tests use simple geometries (0,0)-(1,0) for easy verification - All 12 tests failing as expected (property extraction and splitting not yet implemented) - References real Overture feature IDs and OSM way IDs in comments
…way/level properties
Major Changes:
- Created com.protomaps.basemap.geometry.Linear utility class for line splitting operations
- Rewrote Roads.processOverture() to handle fractional 'between' ranges from Overture data
- Implemented collectSplitPoints() to gather all split positions from road_flags, access_restrictions, and level_rules
- Implemented extractSegmentProperties() to determine which properties apply to each split segment
- Added emitRoadFeature() to create features with custom split geometries
Results:
- 15/21 tests now passing (6 original property extraction tests now pass)
- 6 splitting tests create correct features with correct attributes and geometries
- Only remaining issue: cosmetic Norm{} wrapper in test assertions (geometries are actually correct)
Implementation handles:
- Partial bridges via road_flags with 'is_bridge' flag
- Partial tunnels via road_flags with 'is_tunnel' flag
- Partial oneway restrictions via access_restrictions with heading='backward'
- Partial level changes via level_rules
- Overlapping property ranges (e.g., bridge + oneway on same segment)
- Multiple split points creating 2-5 output features per input feature
…urved roads - Add comprehensive unit tests for line splitting with curves - Rewrite Linear.splitAtFractions() to preserve all vertices between split points - Add coordinate transformation from lat/lon to world coordinates before emitting - All 9 new Linear tests pass, roads render correctly with curves preserved 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ot overtureKindsIndex
a905299 to
03a5d92
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




Add basemap support for Overture Maps input data as alternative to OSM extracts. Port
kind=/kind_detail=/min_zoom=mappings with no changes to MapLibre styles.🚧 This PR will stay in draft for a few days until some pre-requisites are complete 🚧
TODO
mainafter merge of Migrate POI minZoom assigment from plain Java to MultiExpression rules #539get-overture.pyandfeature-finder.pyLayers
All Protomaps layers except for Boundaries and Transit have some coverage in this PR.
POIs
theme=placesbasic_categorymapped to Protomapskind, with limited exceptionsRoads
theme=transportationtype=segmentsubtype=road,subtype=rail, andsubtype=waterclassandsubclassmapped to Protomapskind,kind_detail, and internalhighwayroad_flagsto split linestrings on bridge, tunnel, and level flags to match rendering of OSM basemapPlaces
theme=placesBuildings
theme=buildingstype=buildingandtype=building_partto match Protomaps visual styleLanduse
theme=basetype=land_useto match Protomaps visual styleEarth, Water, and Land Cover
theme=basetype=land,type=water,type=land_coverto match Protomaps visual styleTesting
Extract Overture data with e.g. DuckDB:
COPY ( SELECT * FROM read_parquet( 's3://overturemaps-us-west-2/release/2025-12-17.0/**/*.parquet', hive_partitioning=1, filename=1, union_by_name=1 ) WHERE theme IN ('transportation', 'places', 'base', 'buildings', 'divisions') AND bbox.xmin <= -121 AND bbox.xmax >= -123 AND bbox.ymin <= 38 AND bbox.ymax >= 37 ) TO 'data/sources/bay-area.parquet' (FORMAT PARQUET);Generate PMTiles from Overture data:
java -jar target/protomaps-basemap-HEAD-with-deps.jar \ --overture=data/sources/bay-area.parquet --download --forceRun the
app/map frontend or one of the HTML examples to preview.Screenshots
Taken from interactive preview at mike.teczno.com; compare with OSM data at maps.protomaps.com.
Flavor Compatibility
The changes in this PR map Overture properties to existing Protomaps conventions with no changes to styles, so all five of the included flavors are compatible: black, grayscale, white, light, and dark.