-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
2 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,4 @@ | ||
1. Copy the Overture Parquet dataset to your local machine to `overture` dir: | ||
[Use these docs](https://github.com/OvertureMaps/data/blob/main/README.md#how-to-access-overture-maps-data). You don't need Microsoft Synapse or AWS Athena. | ||
2. Install DuckDB and run this script: | ||
```sql | ||
LOAD spatial; | ||
|
||
COPY ( SELECT | ||
json_extract_string(names, '$.common[0].value') as name, | ||
json_extract_string(categories, '$.main') as category_main, | ||
round(confidence,2) as confidence, | ||
st_geomfromwkb(geometry) | ||
from read_parquet('overture/theme=places/type=place/*')) TO 'places.geojsonseq' WITH (FORMAT gdal, DRIVER 'geojsonseq'); | ||
``` | ||
3. Feed the `geojsonseq` into [felt/tippecanoe](https://github.com/felt/tippecanoe): | ||
|
||
```sh | ||
tippecanoe -o overture-pois.pmtiles places.geojsonseq --force --read-parallel -j '{ "*": [ "attribute-filter", "name", [ ">=", "$zoom", 9 ] ] }' -l pois -rg --drop-densest-as-needed | ||
``` | ||
|
||
Bob's your uncle! | ||
2. Install DuckDB and [felt/tippecanoe](https://github.com/felt/tippecanoe) | ||
3. Run [places.sh places.pmtiles](scripts/2024-05-16-beta.0/places.sh) replacing `read_parquet(...)` with the path to your Overture copy. This streams GeoParquet into tippecanoe without any intermediate file. |