Project

General

Profile

Wiki » History » Version 44

Giulio Di Anastasio, 14/09/2020 15:29

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 42 Giulio Di Anastasio
h2. Connection to server directly from CSR
15 43 Giulio Di Anastasio
16 42 Giulio Di Anastasio
To connect to the server directly without going through Aurinoco server, the correct url is
17 42 Giulio Di Anastasio
http://gis.csr.av
18 42 Giulio Di Anastasio
19 44 Giulio Di Anastasio
h2. Connection to Gisaf via QGis through WFS / OGC API
20 44 Giulio Di Anastasio
21 44 Giulio Di Anastasio
This works only on QGis from version 3.14.15 onward
22 44 Giulio Di Anastasio
23 44 Giulio Di Anastasio
In the browser, click on WFS/OGC API, then right-click to create a new connection
24 44 Giulio Di Anastasio
Give a name (e.g. OGC API Qgis Gisaf)
25 44 Giulio Di Anastasio
Give the url https://gis.auroville.org.in/ogcapi
26 44 Giulio Di Anastasio
27 44 Giulio Di Anastasio
Under the WFS Options box, on Version dropdown, the default option "Maximum" works just fine
28 44 Giulio Di Anastasio
Click on OK
29 44 Giulio Di Anastasio
The list of layers will appear in the Browser under WFS/OGC API.
30 44 Giulio Di Anastasio
31 44 Giulio Di Anastasio
32 7 Philippe May
h2. Database
33 7 Philippe May
34 7 Philippe May
Gisaf uses a Postgis database.
35 1 Philippe May
36 9 Philippe May
h3. Creation
37 9 Philippe May
38 9 Philippe May
To create an appropriate database, run these commands:
39 9 Philippe May
<pre>
40 9 Philippe May
createuser avgis -P
41 9 Philippe May
createdb avgis -O avgis
42 9 Philippe May
psql avgis -c "CREATE EXTENSION postgis;"
43 9 Philippe May
</pre>
44 9 Philippe May
45 9 Philippe May
h3. Notes
46 9 Philippe May
47 7 Philippe May
The geometry features' metadata MUST be set with the proper SRID, which can be tricky. See below.
48 7 Philippe May
49 3 Philippe May
h3. Import files
50 5 Philippe May
51 16 Philippe May
52 8 Philippe May
h2. Development
53 8 Philippe May
54 8 Philippe May
See the README file
55 22 Philippe May
56 35 Philippe May
h2. Build frontend (Angular)
57 35 Philippe May
58 1 Philippe May
59 39 Philippe May
Generating the build is straightforward:
60 39 Philippe May
61 1 Philippe May
<pre>
62 35 Philippe May
cd gisaf-app
63 39 Philippe May
ng build --prod
64 36 Philippe May
</pre>
65 36 Philippe May
66 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:
67 36 Philippe May
68 1 Philippe May
<pre>
69 1 Philippe May
cd gisaf-app
70 39 Philippe May
ng build --prod --build-optimizer=false --vendor-chunk
71 36 Philippe May
</pre>
72 39 Philippe May
73 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.
74 35 Philippe May
75 34 Philippe May
h2. Plugins
76 34 Philippe May
77 34 Philippe May
Gisaf can load models in external plugins. See [[plugins]].
78 34 Philippe May
79 22 Philippe May
h2. Configuration
80 22 Philippe May
81 40 Philippe May
Short version: when the server starts, it reads the configuration from @/etc/gisaf/prod.yml@.
82 1 Philippe May
83 40 Philippe May
Longer version:
84 40 Philippe May
85 40 Philippe May
The configuration is found from (in order):
86 40 Philippe May
87 40 Philippe May
* @$HOME/.local/gisaf/prod.yml@
88 40 Philippe May
* @/etc/gisaf/prod.yml@
89 40 Philippe May
* @<gisaf_source_dir>/gisaf/default.yml@
90 40 Philippe May
91 40 Philippe May
The configuration files are relatively easy to understand, and grow with the development and list of features supported by Gisaf. 
92 40 Philippe May
 
93 40 Philippe May
94 22 Philippe May
h3. Map
95 22 Philippe May
96 22 Philippe May
The default view of the map can be configured in the gisaf yaml config, eg:
97 22 Philippe May
98 22 Philippe May
<pre>
99 22 Philippe May
map:
100 22 Philippe May
  openMapTilesKey: cS3lrAfYXoM4MDooT6aS
101 22 Philippe May
  zoom: 14
102 22 Philippe May
  pitch: 45
103 22 Philippe May
  lat: 12.0000
104 22 Philippe May
  lng: 79.8106
105 22 Philippe May
  bearing: 0
106 22 Philippe May
  style: OSM (vector)
107 22 Philippe May
  opacity: 0.3
108 22 Philippe May
  tilesUrl: /tiles/data/india-vector.json
109 22 Philippe May
</pre>
110 22 Philippe May
111 22 Philippe May
h3. Production
112 22 Philippe May
113 22 Philippe May
Gisaf reads the file @/etc/gisaf/prod.yml@ at boot.
114 22 Philippe May
115 22 Philippe May
116 22 Philippe May
h3. Development
117 22 Philippe May
118 22 Philippe May
Gisaf reads the @~/.gisaf/prod.yml@ file at boot.
119 22 Philippe May
120 22 Philippe May
h2. Third party
121 22 Philippe May
122 22 Philippe May
h3. TileServer
123 22 Philippe May
124 32 Philippe May
Serve the vector tiles for mapbox-gl locally: [[ TileServer ]]
125 33 Philippe May
126 33 Philippe May
Alternative: see #6907