overture-maps

所属分类:GIS/地图编程
开发工具:Shell
文件大小:0KB
下载次数:0
上传日期:2023-10-21 07:08:49
上 传 者sh-1993
说明:  玩OvertureMaps数据,
(Playing with OvertureMaps data,)

文件列表:
data/ (0, 2023-10-21)
data/images/ (0, 2023-10-21)
data/images/pmtiles.jpg (201556, 2023-10-21)
notebooks/ (0, 2023-10-21)
notebooks/hello_overture.ipynb (14269, 2023-10-21)
notebooks/map_configs/ (0, 2023-10-21)
notebooks/map_configs/hello_overture_map_1.json (7957, 2023-10-21)
requirements.txt (83, 2023-10-21)
scripts/ (0, 2023-10-21)
scripts/convert/ (0, 2023-10-21)
scripts/convert/country_bounds.parquet (276582, 2023-10-21)
scripts/convert/daylight/ (0, 2023-10-21)
scripts/convert/daylight/geojson_to_pmtiles.sh (3077, 2023-10-21)
scripts/convert/daylight/parquet_to_geojson.sh (2530, 2023-10-21)
scripts/convert/daylight/parquet_to_geoparquet.sh (3662, 2023-10-21)
scripts/convert/overture/ (0, 2023-10-21)
scripts/convert/overture/geojson_to_pmtiles.sh (3010, 2023-10-21)
scripts/convert/overture/parquet_to_geojson.sh (3057, 2023-10-21)
scripts/convert/overture/parquet_to_geoparquet.sh (2770, 2023-10-21)
scripts/create_country_bounds.sh (439, 2023-10-21)
scripts/create_wkt_bounds.sh (467, 2023-10-21)
scripts/download_daylight_data.sh (1273, 2023-10-21)
scripts/download_overture_data.sh (1657, 2023-10-21)
scripts/install/ (0, 2023-10-21)
scripts/install/install_duckdb.sh (502, 2023-10-21)
scripts/install/install_gpq.sh (673, 2023-10-21)
scripts/install/install_miniconda.sh (1092, 2023-10-21)
scripts/install/install_pmtiles.sh (967, 2023-10-21)
scripts/install/install_tippecanoe.sh (265, 2023-10-21)
viewer/ (0, 2023-10-21)
viewer/.prettierrc (140, 2023-10-21)
viewer/dist/ (0, 2023-10-21)
viewer/dist/assets/ (0, 2023-10-21)
viewer/dist/assets/index-008d17ac.css (65141, 2023-10-21)
... ...

# overture-maps Playing around with data from OvertureMaps. - Download OvertureMaps and Daylight data - Extract data from OvertureMaps and Daylight for a country and convert to geoparquet - Create PMTiles from extracted data - Notebook with some queries and a map to display some data Demo viewer for generated PMTiles: [https://tebben.github.io/overture-maps/](https://tebben.github.io/overture-maps/) ![PMTiles](./data/images/pmtiles.jpg) ## Download overture-maps data For the notebook and scripts to create extracts, geoparquet and PMTiles we need all the data locally. Run `scripts/download_overture_data.sh` to download all overture parquet files from AWS without needing to login. This will take some time to run since this is around 200GB. This script will install AWS cli if not found on the system. ```sh ./scripts/download_overture_data.sh ``` ## Playing around with the overture data in a notebook Notebook to have a closer look at the data and see if we can show something on a map. ### Install miniconda Install miniconda if not installed yet. ```sh ./scripts/install_miniconda.sh ``` ### Create environment Create a conda environment and install some dependencies. ```sh conda create -n overture python=3.10 conda activate overture conda install pip pip install -r requirements.txt ``` ### Open notebook Open ./notebooks/hello_overture.ipynb and select kernel overture from our conda environment. ## Extract data, convert to geoparquet and create PMTiles Make sure DuckDB, gpq, tippecanoe and pmtiles are installed ```sh sudo ./scripts/install_duckdb.sh sudo ./scripts/install_gpq.sh sudo ./scripts/install_pmtiles.sh sudo ./scripts/install_tippecanoe.sh ``` ### Create bounds In our test we don't want to do the whole world so we create some bounds, in this case country bounds of The Netherlands, supply the country code to the script. In the next example we create bounds for The Netherlands. ```sh ./scripts/create_country_bounds.sh NL ``` ### Extract data and convert to geoparquet The following script will create geoparquet files for all overture-maps themes with only data inside our given bounds, for pmtiles we don't need geoparquet but it's nice to have anyways. This can take some time, no fancy things are done such as spatial partitioning/indexing. ```sh ./scripts/convert/overture/to_geoparquet.sh ``` ### Create GeoJSON For the PMTiles creation we need GeoJSON files, the script `parquet_to_geojson.sh` creates geojson files for each theme from our geoparquet files which than can feeded into tippecanoe. Not every field is added to the GeoJSON feature properties at the moment. ```sh ./scripts/convert/overture/parquet_to_geojson.sh ``` ### Create PMTiles When we have the GeoJSON files we can create our PMTiles using tippecanoe and pmtiles. ```sh ./scripts/convert/overture/geojson_to_pmtiles.sh ``` This will create mbtiles for each theme, merge them and convert to PMTiles. Directly creating pmtiles with tippecanoe resulted in a PMTiles V2 file which could not be converted to v3, therefore mbtiles are created and later converted into PMTiles using `pmtiles convert` ### Run viewer to view PMTiles In the folder `viewer` a maplibre-gl viewer can be found which loads the PMTiles file locally. ```sh cd viewer npm install npm run dev ```

近期下载者

相关文件


收藏者