-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
42,445 additions
and
38,982 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,10 +1,11 @@ | ||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
temp/ | ||
geojson-vt/ | ||
.vscode | ||
*.qgs* | ||
*.qgd | ||
*.mbtiles | ||
*.log | ||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
temp/ | ||
geojson-vt/ | ||
.vscode | ||
*.qgs* | ||
*.qgd | ||
*.mbtiles | ||
*.log | ||
token.txt |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,21 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 ICGC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
MIT License | ||
Copyright (c) 2018 ICGC | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,70 +1,72 @@ | ||
# Tile Stitch | ||
Tile Stitch is a tool aimed at replacing tiles inside a given mbttiles file with tiles from another set of tiles, using a polygon to mask the stitching area and merge if needed contents from both sets of boundary tiles. | ||
|
||
## Getting Started | ||
|
||
|
||
### Prerequisites | ||
|
||
This project in based on [NodeJs](https://nodejs.org/en/) | ||
|
||
### Installation | ||
|
||
``` | ||
git clone https://github.com/gencat/ICGC-tile-stitch.git | ||
cd ICGC-tile-stitch | ||
npm install | ||
``` | ||
|
||
|
||
### Configuration | ||
|
||
Edit *config.js* | ||
|
||
``` | ||
f.mbtiles_ori = './icgc.mbtiles'; // your local tiles | ||
_f.mbtiles_dest = './europe_spain.mbtiles'; // Country Mbtiles from OpenMaptiles | ||
_f.pol_cat = './CAT_plus_box.geojson'; //clipping polygon | ||
_f.mbtiles_planet = './planet.mbtiles'; //full planet from OpenMaptiles | ||
_f.zoom_levels = [7,8,9,10,11,12,13,14]; //replace zoom levels | ||
``` | ||
|
||
### Running | ||
|
||
#### To create stitched tiles | ||
|
||
``` | ||
./stitch.sh | ||
``` | ||
#### To replace your local stitched tiles into country tiles | ||
|
||
|
||
``` | ||
node mergeMbtiles.js | ||
``` | ||
|
||
#### To replace your country tiles into planet tiles | ||
|
||
|
||
``` | ||
node mergePlanet.js | ||
``` | ||
|
||
## Authors | ||
|
||
* [Institut Cartogràfic i Geològic de Catalunya](https://www.icgc.cat/) | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details | ||
|
||
|
||
# Tile Stitch | ||
Tile Stitch is a tool aimed at replacing tiles inside a given mbttiles file with tiles from another set of tiles, using a polygon to mask the stitching area and merge if needed contents from both sets of boundary tiles. | ||
|
||
## Getting Started | ||
|
||
|
||
### Prerequisites | ||
|
||
This project in based on [NodeJs](https://nodejs.org/en/) | ||
|
||
This project use [Tippecanoe](https://github.com/mapbox/tippecanoe) and [GDAL](https://gdal.org/) | ||
|
||
### Installation | ||
|
||
``` | ||
git clone https://github.com/gencat/ICGC-tile-stitch.git | ||
cd ICGC-tile-stitch | ||
npm install | ||
``` | ||
|
||
|
||
### Configuration | ||
|
||
Edit *config.js* | ||
|
||
``` | ||
f.mbtiles_ori = './icgc.mbtiles'; // your local tiles | ||
_f.mbtiles_dest = './europe_spain.mbtiles'; // Country Mbtiles from OpenMaptiles | ||
_f.pol_cat = './CAT_plus_box.geojson'; //clipping polygon | ||
_f.mbtiles_planet = './planet.mbtiles'; //full planet from OpenMaptiles | ||
_f.zoom_levels = [7,8,9,10,11,12,13,14]; //replace zoom levels | ||
``` | ||
|
||
### Running | ||
|
||
#### To create stitched tiles | ||
|
||
``` | ||
./stitch.sh | ||
``` | ||
#### To replace your local stitched tiles into country tiles | ||
|
||
|
||
``` | ||
node mergeMbtiles.js | ||
``` | ||
|
||
#### To replace your country tiles into planet tiles | ||
|
||
|
||
``` | ||
node mergePlanet.js | ||
``` | ||
|
||
## Authors | ||
|
||
* [Institut Cartogràfic i Geològic de Catalunya](https://www.icgc.cat/) | ||
|
||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details | ||
|
||
|
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 +1 @@ | ||
tippecanoe -o 12_2055_1508.mbtiles --one-tile=12/2055/1508 -L landcover:landcover.geojson -L park:park.geojson -L landuse:landuse.geojson -L building:building.geojson -L waterway:waterway.geojson -L transportation:transportation.geojson -L boundary:boundary.geojson -L mountain_peak:mountain_peak.geojson -L place:place.geojson | ||
tippecanoe -o 12_2055_1508.mbtiles --one-tile=12/2055/1508 -L landcover:landcover.geojson -L park:park.geojson -L landuse:landuse.geojson -L building:building.geojson -L waterway:waterway.geojson -L transportation:transportation.geojson -L boundary:boundary.geojson -L mountain_peak:mountain_peak.geojson -L place:place.geojson |
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
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,13 +1,13 @@ | ||
const fs = require('fs'); | ||
|
||
fs.createReadStream('2017-07-03_europe_spain - Copy.mbtiles').pipe(fs.createWriteStream('2017-07-03_europe_spain.mbtiles')); | ||
|
||
/* | ||
function copyDestino(){ | ||
return new Promise(function(resolve, reject) { | ||
fs.writeFileSync('2017-07-03_europe_spain.mbtiles', fs.readFileSync('2017-07-03_europe_spain - Copy.mbtiles')); | ||
//fs.createReadStream('2017-07-03_europe_spain - Copy.mbtiles').pipe(fs.createWriteStream('2017-07-03_europe_spain.mbtiles')); | ||
resolve(); | ||
}); | ||
} | ||
const fs = require('fs'); | ||
|
||
fs.createReadStream('2017-07-03_europe_spain - Copy.mbtiles').pipe(fs.createWriteStream('2017-07-03_europe_spain.mbtiles')); | ||
|
||
/* | ||
function copyDestino(){ | ||
return new Promise(function(resolve, reject) { | ||
fs.writeFileSync('2017-07-03_europe_spain.mbtiles', fs.readFileSync('2017-07-03_europe_spain - Copy.mbtiles')); | ||
//fs.createReadStream('2017-07-03_europe_spain - Copy.mbtiles').pipe(fs.createWriteStream('2017-07-03_europe_spain.mbtiles')); | ||
resolve(); | ||
}); | ||
} | ||
*/ |
Oops, something went wrong.