-
Notifications
You must be signed in to change notification settings - Fork 41
Open with Kosmtik
Only Kosmtik dependency is NodeJS.
Follow the instructions in the NodeJS wiki.
Install instructions are available on the Github README.
Once in the kosmtik root, run:
node index.js plugins --install kosmtik-tiles-export
node index.js plugins --install kosmtik-mbtiles-export
node index.js plugins --install kosmtik-fetch-remote
git clone https://github.com/hotosm/HDM-CartoCSS.git
We need to override some of the project's configurations to match our working
environment, for example for the database credentials. For this, create a
localconfig.js
file in the root of the hdm project, with this content (adapt
it to your needs):
exports.LocalConfig = function (localizer, project) {
localizer.where('Layer').if({'Datasource.type': 'postgis'}).then({
'Datasource.dbname': 'yourdbname',
'Datasource.password': '',
'Datasource.user': 'youruser',
'Datasource.host': ''
});
};
You will need to configure your Local Config file for any hard-coded paths, especially contour and hillshade files. See Kosmtik local configuration for an example localconfig.js
Follow the instruction here
Follow the instruction here
If you don't want DEM, you can add those lines in your localconfig.js file:
localizer.where('Layer').if({id: 'hillshade'}).then({'status': 'off'});
localizer.where('Layer').if({id: 'contour_line'}).then({'status': 'off'});
From the root of your kosmtik instance, run:
node index.js serve path/to/hdm/project.yml
Then browse to http://localhost:6789
Export a tiles tree:
node index.js export path/to/hdm/project.yml --format tiles --output path/to/output/ --minZoom 10 --maxZoom 14
Export a MBTiles file:
node index.js export path/to/hdm/project.yml --format mbtiles --output path/to/output.mbtiles --minZoom 10 --maxZoom 14