kopia lustrzana https://github.com/openmaptiles/openmaptiles
Merge branch 'master' into doc_cleanup
commit
fa945f673f
|
@ -15,7 +15,7 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: Checkout the changes
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run quickstart for a small area
|
||||
env:
|
||||
|
@ -27,7 +27,7 @@ jobs:
|
|||
./quickstart.sh $area
|
||||
|
||||
- name: Save quickstart.log
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: quickstart.log
|
||||
path: quickstart.log
|
||||
|
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
|
||||
- name: Cache test data download
|
||||
id: cache-testdata
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ci_cache
|
||||
key: "v2-${{ env.TEST_DATA_URL }}"
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
curl --silent --show-error --location --output ci_cache/perf-test-areas-latest.osm.pbf "$TEST_DATA_URL"
|
||||
|
||||
- name: Get code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Fetch the last two commits in case this is a PR,
|
||||
# and we need to profile the base branch first
|
||||
|
@ -76,10 +76,10 @@ jobs:
|
|||
# Take the first parent of the grafted commit (cannot use HEAD^1 with shallow clones)
|
||||
REV_HASH=$(git cat-file -p $REV_HASH | awk 'NR > 1 {if(/^parent/){print $2; exit}}')
|
||||
fi
|
||||
echo "::set-output name=hash::$REV_HASH"
|
||||
echo "hash=$REV_HASH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up caching for the performance results
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: perf_cache
|
||||
# If profiling result cache has incompatible format, increase this "v" number
|
||||
|
@ -287,14 +287,14 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Save performance artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: performance_results
|
||||
path: artifacts
|
||||
|
||||
- name: Save PR message artifact
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr_message
|
||||
path: pr_message
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
steps:
|
||||
|
||||
- name: Checkout the changes
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
|
|
|
@ -160,7 +160,7 @@ make build-style
|
|||
Now you are ready to **generate the vector tiles**. By default, `./.env` specifies the entire planet BBOX for zooms 0-7, but running `generate-bbox-file` will analyze the data file and set the `BBOX` param to limit tile generation.
|
||||
|
||||
```
|
||||
make generate-bbox-file # compute data bbox -- not needed for the whole planet
|
||||
make generate-bbox-file # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`
|
||||
make generate-tiles-pg # generate tiles
|
||||
```
|
||||
|
||||
|
@ -175,11 +175,13 @@ make download area=albania # download albania .osm.pbf file -- can be skipped i
|
|||
make import-osm # import data into postgres
|
||||
make import-wikidata # import Wikidata
|
||||
make import-sql # create / import sql functions
|
||||
make generate-bbox-file # compute data bbox -- not needed for the whole planet
|
||||
make generate-bbox-file # compute data bbox -- not needed for the whole planet or for downloaded area by `make download`
|
||||
make generate-tiles-pg # generate tiles
|
||||
```
|
||||
Instead of calling `make download area=albania` you can add a .osm.pbf file in the `data` folder `openmaptiles/data/your_area_file.osm.pbf`
|
||||
|
||||
To change the name of the output filename, you can modify the variable `MBTILES_FILE` in the `.env` file or set up the environment variable `MBTILES_FILE` before running `./quickstart.sh` or `make generate-tiles-pg` (e.g., `MBTILES_FILENAME=monaco.mbtiles ./quickstart.sh monaco`).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -163,12 +163,7 @@ else
|
|||
echo " "
|
||||
fi
|
||||
|
||||
# override the output filename based on the area if the default `tiles.mbtiles` is found
|
||||
if [[ "$(source .env ; echo "$MBTILES_FILE")" = "tiles.mbtiles" ]]; then
|
||||
MBTILES_FILENAME=${area}.mbtiles
|
||||
else
|
||||
MBTILES_FILENAME=$(source .env ; echo "$MBTILES_FILE")
|
||||
fi
|
||||
MBTILES_FILE=${MBTILES_FILE:-$(source .env ; echo "$MBTILES_FILE")}
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
|
@ -187,8 +182,8 @@ make init-dirs
|
|||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILENAME ) "
|
||||
rm -f "./data/$MBTILES_FILENAME"
|
||||
echo "====> : Removing old MBTILES if exists ( ./data/$MBTILES_FILE ) "
|
||||
rm -f "./data/$MBTILES_FILE"
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
|
@ -299,9 +294,9 @@ fi
|
|||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : Start generating MBTiles (containing gzipped MVT PBF) using PostGIS. "
|
||||
echo " : Output MBTiles: $MBTILES_FILENAME "
|
||||
echo " : Output MBTiles: $MBTILES_FILE "
|
||||
echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/generate-tiles "
|
||||
MBTILES_FILE=$MBTILES_FILENAME make generate-tiles-pg
|
||||
make generate-tiles-pg
|
||||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
|
@ -332,7 +327,7 @@ docker images | grep openmaptiles
|
|||
|
||||
echo " "
|
||||
echo "-------------------------------------------------------------------------------------"
|
||||
echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILENAME ) "
|
||||
echo "====> : (disk space) We have created the new vectortiles ( ./data/$MBTILES_FILE ) "
|
||||
echo " : Please respect the licenses (OdBL for OSM data) of the sources when distributing the MBTiles file."
|
||||
echo " : Data directory content:"
|
||||
ls -la ./data
|
||||
|
|
Ładowanie…
Reference in New Issue