Wiki » History » Version 41
  Philippe May, 15/07/2019 15:04 
  
| 1 | 3 | Philippe May | h1. Software | 
|---|---|---|---|
| 2 | 1 | Philippe May | |
| 3 | 15 | Philippe May | Gisaf (for, eg, GIS Auroville Front-end) is a web application that is under development. | 
| 4 | 1 | Philippe May | |
| 5 | 27 | Philippe May | [[User manual]] | 
| 6 | 2 | Philippe May | [[Server]] | 
| 7 | 2 | Philippe May | [[Client]] | 
| 8 | 1 | Philippe May | [[Stack]] | 
| 9 | 15 | Philippe May | [[Mapbox]] | 
| 10 | 41 | Philippe May | [[Font]] | 
| 11 | 38 | Philippe May | [[Live]] | 
| 12 | 37 | Philippe May | [[Performance]] | 
| 13 | 3 | Philippe May | |
| 14 | 7 | Philippe May | h2. Database | 
| 15 | 7 | Philippe May | |
| 16 | 7 | Philippe May | Gisaf uses a Postgis database. | 
| 17 | 1 | Philippe May | |
| 18 | 9 | Philippe May | h3. Creation | 
| 19 | 9 | Philippe May | |
| 20 | 9 | Philippe May | To create an appropriate database, run these commands: | 
| 21 | 9 | Philippe May | <pre> | 
| 22 | 9 | Philippe May | createuser avgis -P | 
| 23 | 9 | Philippe May | createdb avgis -O avgis | 
| 24 | 9 | Philippe May | psql avgis -c "CREATE EXTENSION postgis;" | 
| 25 | 9 | Philippe May | </pre> | 
| 26 | 9 | Philippe May | |
| 27 | 9 | Philippe May | h3. Notes | 
| 28 | 9 | Philippe May | |
| 29 | 7 | Philippe May | The geometry features' metadata MUST be set with the proper SRID, which can be tricky. See below. | 
| 30 | 7 | Philippe May | |
| 31 | 3 | Philippe May | h3. Import files | 
| 32 | 5 | Philippe May | |
| 33 | 16 | Philippe May | |
| 34 | 8 | Philippe May | h2. Development | 
| 35 | 8 | Philippe May | |
| 36 | 8 | Philippe May | See the README file | 
| 37 | 22 | Philippe May | |
| 38 | 35 | Philippe May | h2. Build frontend (Angular) | 
| 39 | 35 | Philippe May | |
| 40 | 1 | Philippe May | |
| 41 | 39 | Philippe May | Generating the build is straightforward: | 
| 42 | 39 | Philippe May | |
| 43 | 1 | Philippe May | <pre> | 
| 44 | 35 | Philippe May | cd gisaf-app | 
| 45 | 39 | Philippe May | ng build --prod | 
| 46 | 36 | Philippe May | </pre> | 
| 47 | 36 | Philippe May | |
| 48 | 39 | Philippe May | For the record, there was a bug (Angular build or plotly), now fixed (https://github.com/plotly/angular-plotly.js/issues/15), that forced to build the web application (browser side) with: | 
| 49 | 36 | Philippe May | |
| 50 | 1 | Philippe May | <pre> | 
| 51 | 1 | Philippe May | cd gisaf-app | 
| 52 | 39 | Philippe May | ng build --prod --build-optimizer=false --vendor-chunk | 
| 53 | 36 | Philippe May | </pre> | 
| 54 | 39 | Philippe May | |
| 55 | 39 | Philippe May | In practice, because the resources on the VM of the server are limited (memory), one might just build on the development machine (eg. my laptop) and rsync the @build@ directory. | 
| 56 | 35 | Philippe May | |
| 57 | 34 | Philippe May | h2. Plugins | 
| 58 | 34 | Philippe May | |
| 59 | 34 | Philippe May | Gisaf can load models in external plugins. See [[plugins]]. | 
| 60 | 34 | Philippe May | |
| 61 | 22 | Philippe May | h2. Configuration | 
| 62 | 22 | Philippe May | |
| 63 | 40 | Philippe May | Short version: when the server starts, it reads the configuration from @/etc/gisaf/prod.yml@. | 
| 64 | 1 | Philippe May | |
| 65 | 40 | Philippe May | Longer version: | 
| 66 | 40 | Philippe May | |
| 67 | 40 | Philippe May | The configuration is found from (in order): | 
| 68 | 40 | Philippe May | |
| 69 | 40 | Philippe May | * @$HOME/.local/gisaf/prod.yml@ | 
| 70 | 40 | Philippe May | * @/etc/gisaf/prod.yml@ | 
| 71 | 40 | Philippe May | * @<gisaf_source_dir>/gisaf/default.yml@ | 
| 72 | 40 | Philippe May | |
| 73 | 40 | Philippe May | The configuration files are relatively easy to understand, and grow with the development and list of features supported by Gisaf. | 
| 74 | 40 | Philippe May | |
| 75 | 40 | Philippe May | |
| 76 | 22 | Philippe May | h3. Map | 
| 77 | 22 | Philippe May | |
| 78 | 22 | Philippe May | The default view of the map can be configured in the gisaf yaml config, eg: | 
| 79 | 22 | Philippe May | |
| 80 | 22 | Philippe May | <pre> | 
| 81 | 22 | Philippe May | map: | 
| 82 | 22 | Philippe May | openMapTilesKey: cS3lrAfYXoM4MDooT6aS | 
| 83 | 22 | Philippe May | zoom: 14 | 
| 84 | 22 | Philippe May | pitch: 45 | 
| 85 | 22 | Philippe May | lat: 12.0000 | 
| 86 | 22 | Philippe May | lng: 79.8106 | 
| 87 | 22 | Philippe May | bearing: 0 | 
| 88 | 22 | Philippe May | style: OSM (vector) | 
| 89 | 22 | Philippe May | opacity: 0.3 | 
| 90 | 22 | Philippe May | tilesUrl: /tiles/data/india-vector.json | 
| 91 | 22 | Philippe May | </pre> | 
| 92 | 22 | Philippe May | |
| 93 | 22 | Philippe May | h3. Production | 
| 94 | 22 | Philippe May | |
| 95 | 22 | Philippe May | Gisaf reads the file @/etc/gisaf/prod.yml@ at boot. | 
| 96 | 22 | Philippe May | |
| 97 | 22 | Philippe May | |
| 98 | 22 | Philippe May | h3. Development | 
| 99 | 22 | Philippe May | |
| 100 | 22 | Philippe May | Gisaf reads the @~/.gisaf/prod.yml@ file at boot. | 
| 101 | 22 | Philippe May | |
| 102 | 22 | Philippe May | h2. Third party | 
| 103 | 22 | Philippe May | |
| 104 | 22 | Philippe May | h3. TileServer | 
| 105 | 22 | Philippe May | |
| 106 | 32 | Philippe May | Serve the vector tiles for mapbox-gl locally: [[ TileServer ]] | 
| 107 | 33 | Philippe May | |
| 108 | 33 | Philippe May | Alternative: see #6907 |