Project

General

Profile

Wiki » History » Version 37

Philippe May, 30/03/2019 02:52

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 37 Philippe May
[[Performance]]
11 3 Philippe May
12 7 Philippe May
h2. Database
13 7 Philippe May
14 7 Philippe May
Gisaf uses a Postgis database.
15 1 Philippe May
16 9 Philippe May
h3. Creation
17 9 Philippe May
18 9 Philippe May
To create an appropriate database, run these commands:
19 9 Philippe May
<pre>
20 9 Philippe May
createuser avgis -P
21 9 Philippe May
createdb avgis -O avgis
22 9 Philippe May
psql avgis -c "CREATE EXTENSION postgis;"
23 9 Philippe May
</pre>
24 9 Philippe May
25 9 Philippe May
h3. Notes
26 9 Philippe May
27 7 Philippe May
The geometry features' metadata MUST be set with the proper SRID, which can be tricky. See below.
28 7 Philippe May
29 3 Philippe May
h3. Import files
30 5 Philippe May
31 16 Philippe May
32 8 Philippe May
h2. Development
33 8 Philippe May
34 8 Philippe May
See the README file
35 22 Philippe May
36 35 Philippe May
h2. Build frontend (Angular)
37 35 Philippe May
38 36 Philippe May
Until a bug in (Angular build or plotly) is fixed (https://github.com/plotly/angular-plotly.js/issues/15), build the web application (browser side) with:
39 35 Philippe May
40 35 Philippe May
<pre>
41 35 Philippe May
cd gisaf-app
42 1 Philippe May
ng build --prod --build-optimizer=false --vendor-chunk
43 36 Philippe May
</pre>
44 36 Philippe May
45 36 Philippe May
Otherwise, this is the standard command for generating the build:
46 36 Philippe May
47 36 Philippe May
<pre>
48 36 Philippe May
cd gisaf-app
49 36 Philippe May
ng build --prod
50 35 Philippe May
</pre>
51 35 Philippe May
52 34 Philippe May
h2. Plugins
53 34 Philippe May
54 34 Philippe May
Gisaf can load models in external plugins. See [[plugins]].
55 34 Philippe May
56 22 Philippe May
h2. Configuration
57 22 Philippe May
58 22 Philippe May
TODO: more about parameters of the conf file
59 22 Philippe May
60 22 Philippe May
h3. Map
61 22 Philippe May
62 22 Philippe May
The default view of the map can be configured in the gisaf yaml config, eg:
63 22 Philippe May
64 22 Philippe May
<pre>
65 22 Philippe May
map:
66 22 Philippe May
  openMapTilesKey: cS3lrAfYXoM4MDooT6aS
67 22 Philippe May
  zoom: 14
68 22 Philippe May
  pitch: 45
69 22 Philippe May
  lat: 12.0000
70 22 Philippe May
  lng: 79.8106
71 22 Philippe May
  bearing: 0
72 22 Philippe May
  style: OSM (vector)
73 22 Philippe May
  opacity: 0.3
74 22 Philippe May
  tilesUrl: /tiles/data/india-vector.json
75 22 Philippe May
</pre>
76 22 Philippe May
77 22 Philippe May
h3. Production
78 22 Philippe May
79 22 Philippe May
Gisaf reads the file @/etc/gisaf/prod.yml@ at boot.
80 22 Philippe May
81 22 Philippe May
82 22 Philippe May
h3. Development
83 22 Philippe May
84 22 Philippe May
Gisaf reads the @~/.gisaf/prod.yml@ file at boot.
85 22 Philippe May
86 22 Philippe May
87 22 Philippe May
h2. Third party
88 22 Philippe May
89 22 Philippe May
h3. TileServer
90 22 Philippe May
91 32 Philippe May
Serve the vector tiles for mapbox-gl locally: [[ TileServer ]]
92 33 Philippe May
93 33 Philippe May
Alternative: see #6907