Wiki » History » Version 24
« Previous -
Version 24/46
(diff) -
Next » -
Current version
Philippe May, 06/08/2018 15:31
Software¶
Gisaf (for, eg, GIS Auroville Front-end) is a web application that is under development.
Database¶
Gisaf uses a Postgis database.
Creation¶
To create an appropriate database, run these commands:
createuser avgis -P createdb avgis -O avgis psql avgis -c "CREATE EXTENSION postgis;"
Notes¶
The geometry features' metadata MUST be set with the proper SRID, which can be tricky. See below.
Import files¶
Shapefiles
Rules of Map making - What all Maps should have!
Survey Database
Field to finish
Survey Data Post-Processing
Data (measurements, auxiliary tables)
Wells Documentation
Civil 3D useful commands
Online references for Civil 3D
connections in QGIS- using browser panel and Add postGIS
Development¶
See the README file
Configuration¶
TODO: more about parameters of the conf file
Map¶
The default view of the map can be configured in the gisaf yaml config, eg:
map: openMapTilesKey: cS3lrAfYXoM4MDooT6aS zoom: 14 pitch: 45 lat: 12.0000 lng: 79.8106 bearing: 0 style: OSM (vector) opacity: 0.3 tilesUrl: /tiles/data/india-vector.json
Production¶
Gisaf reads the file /etc/gisaf/prod.yml
at boot.
Development¶
Gisaf reads the ~/.gisaf/prod.yml
file at boot.
Third party¶
TileServer¶
TileServer-gl is a small node application that can serve vector tiles (mbtiles) for mapbox without the need for an external provider.
The maps Gisaf base layers (the definition file being located in gisaf-app/src/app/map/base_styles.ts
) in can be parametered such that a base layer is hosted locally (see the gisaf config file).
Download the mbtiles¶
From: https://openmaptiles.com/downloads/planet/ , and store the relevant one on the server's filesystem (eg. /usr/local/2017-07-03_asia_india.mbtiles
)
Service¶
A systemd service configuration file, in /etc/systemd/system/tileserver-gl-light.service
:
[Service] ExecStart=/usr/bin/node /usr/lib/node_modules/tileserver-gl-light/src/main.js --cors true -c /etc/tileserver/config.json Restart=always User=www-data Group=www-data Environment=NODE_ENV=production [Install] WantedBy=multi-user.target
Configuration¶
Eg, in /etc/tileserver/conf.json
:
{ "options": { "paths": { "root": "", "fonts": "fonts", "styles": "styles", "mbtiles": "" }, "domains": [ "gis.auroville.org.in" ], "styles": {} }, "data": { "india-vector": { "mbtiles": "/usr/local/2017-07-03_asia_india.mbtiles" } } }
Run the service¶
systemctl enable --now tileserver-gl-light.service
nginx proxy¶
In order the mbtiles to be served by tileserver, add in the nginx conf (adjust eventually):
location /tiles/ { proxy_pass http://127.0.0.1:8080/; }