Wiki » History » Version 22
Philippe May, 04/08/2018 11:41
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 | 2 | Philippe May | [[Server]] |
6 | 2 | Philippe May | [[Client]] |
7 | 1 | Philippe May | [[Stack]] |
8 | 15 | Philippe May | [[Mapbox]] |
9 | 3 | Philippe May | |
10 | 7 | Philippe May | h2. Database |
11 | 7 | Philippe May | |
12 | 7 | Philippe May | Gisaf uses a Postgis database. |
13 | 1 | Philippe May | |
14 | 9 | Philippe May | h3. Creation |
15 | 9 | Philippe May | |
16 | 9 | Philippe May | To create an appropriate database, run these commands: |
17 | 9 | Philippe May | <pre> |
18 | 9 | Philippe May | createuser avgis -P |
19 | 9 | Philippe May | createdb avgis -O avgis |
20 | 9 | Philippe May | psql avgis -c "CREATE EXTENSION postgis;" |
21 | 9 | Philippe May | </pre> |
22 | 9 | Philippe May | |
23 | 9 | Philippe May | h3. Notes |
24 | 9 | Philippe May | |
25 | 7 | Philippe May | The geometry features' metadata MUST be set with the proper SRID, which can be tricky. See below. |
26 | 7 | Philippe May | |
27 | 3 | Philippe May | h3. Import files |
28 | 5 | Philippe May | |
29 | 8 | Philippe May | [[Shapefiles]] |
30 | 21 | Pavneet Kaur | [[Rules of Map making - What all Maps should have!]] |
31 | 19 | Pavneet Kaur | [[Survey Database]] |
32 | 18 | Pavneet Kaur | [[Field to finish]] |
33 | 11 | Pavneet Kaur | [[Survey Data Post-Processing]] |
34 | 10 | Philippe May | [[Data (measurements, auxiliary tables)]] |
35 | 12 | Pavneet Kaur | [[Wells Documentation]] |
36 | 13 | Pavneet Kaur | [[Civil 3D useful commands]] |
37 | 17 | Pavneet Kaur | [[Online references for Civil 3D]] |
38 | 14 | Pavneet Kaur | [[connections in QGIS- using browser panel and Add postGIS]] |
39 | 16 | Philippe May | |
40 | 8 | Philippe May | h2. Development |
41 | 8 | Philippe May | |
42 | 8 | Philippe May | See the README file |
43 | 22 | Philippe May | |
44 | 22 | Philippe May | h2. Configuration |
45 | 22 | Philippe May | |
46 | 22 | Philippe May | TODO: more about parameters of the conf file |
47 | 22 | Philippe May | |
48 | 22 | Philippe May | h3. Map |
49 | 22 | Philippe May | |
50 | 22 | Philippe May | The default view of the map can be configured in the gisaf yaml config, eg: |
51 | 22 | Philippe May | |
52 | 22 | Philippe May | <pre> |
53 | 22 | Philippe May | map: |
54 | 22 | Philippe May | openMapTilesKey: cS3lrAfYXoM4MDooT6aS |
55 | 22 | Philippe May | zoom: 14 |
56 | 22 | Philippe May | pitch: 45 |
57 | 22 | Philippe May | lat: 12.0000 |
58 | 22 | Philippe May | lng: 79.8106 |
59 | 22 | Philippe May | bearing: 0 |
60 | 22 | Philippe May | style: OSM (vector) |
61 | 22 | Philippe May | opacity: 0.3 |
62 | 22 | Philippe May | tilesUrl: /tiles/data/india-vector.json |
63 | 22 | Philippe May | </pre> |
64 | 22 | Philippe May | |
65 | 22 | Philippe May | h3. Production |
66 | 22 | Philippe May | |
67 | 22 | Philippe May | Gisaf reads the file @/etc/gisaf/prod.yml@ at boot. |
68 | 22 | Philippe May | |
69 | 22 | Philippe May | |
70 | 22 | Philippe May | h3. Development |
71 | 22 | Philippe May | |
72 | 22 | Philippe May | Gisaf reads the @~/.gisaf/prod.yml@ file at boot. |
73 | 22 | Philippe May | |
74 | 22 | Philippe May | |
75 | 22 | Philippe May | h2. Third party |
76 | 22 | Philippe May | |
77 | 22 | Philippe May | h3. TileServer |
78 | 22 | Philippe May | |
79 | 22 | Philippe May | "TileServer-gl":https://github.com/klokantech/tileserver-gl is a small node application that can serve vector tiles (mbtiles) for mapbox without the need for an external provider. |
80 | 22 | Philippe May | |
81 | 22 | Philippe May | 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). |
82 | 22 | Philippe May | |
83 | 22 | Philippe May | |
84 | 22 | Philippe May | h4. Service |
85 | 22 | Philippe May | |
86 | 22 | Philippe May | A systemd service configuration file, in @/etc/systemd/system/tileserver-gl-light.service@: |
87 | 22 | Philippe May | |
88 | 22 | Philippe May | <pre> |
89 | 22 | Philippe May | cat /etc/systemd/system/tileserver-gl-light.service |
90 | 22 | Philippe May | [Service] |
91 | 22 | Philippe May | ExecStart=/usr/bin/node /usr/lib/node_modules/tileserver-gl-light/src/main.js --cors true -c /etc/tileserver/config.json |
92 | 22 | Philippe May | Restart=always |
93 | 22 | Philippe May | User=www-data |
94 | 22 | Philippe May | Group=www-data |
95 | 22 | Philippe May | Environment=NODE_ENV=production |
96 | 22 | Philippe May | |
97 | 22 | Philippe May | [Install] |
98 | 22 | Philippe May | WantedBy=multi-user.target |
99 | 22 | Philippe May | </pre> |
100 | 22 | Philippe May | |
101 | 22 | Philippe May | h4. Configuration |
102 | 22 | Philippe May | |
103 | 22 | Philippe May | Eg, in @/etc/tileserver/conf.json@: |
104 | 22 | Philippe May | |
105 | 22 | Philippe May | <pre> |
106 | 22 | Philippe May | { |
107 | 22 | Philippe May | "options": { |
108 | 22 | Philippe May | "paths": { |
109 | 22 | Philippe May | "root": "", |
110 | 22 | Philippe May | "fonts": "fonts", |
111 | 22 | Philippe May | "styles": "styles", |
112 | 22 | Philippe May | "mbtiles": "" |
113 | 22 | Philippe May | }, |
114 | 22 | Philippe May | "domains": [ |
115 | 22 | Philippe May | "gis.auroville.org.in" |
116 | 22 | Philippe May | ], |
117 | 22 | Philippe May | "styles": {} |
118 | 22 | Philippe May | }, |
119 | 22 | Philippe May | "data": { |
120 | 22 | Philippe May | "india-vector": { |
121 | 22 | Philippe May | "mbtiles": "/usr/local/2017-07-03_asia_india.mbtiles" |
122 | 22 | Philippe May | } |
123 | 22 | Philippe May | } |
124 | 22 | Philippe May | } |
125 | 22 | Philippe May | </pre> |
126 | 22 | Philippe May | |
127 | 22 | Philippe May | h4. nginx proxy |
128 | 22 | Philippe May | |
129 | 22 | Philippe May | In order the mbtiles to be served by tileserver, add in the nginx conf (adjust eventually): |
130 | 22 | Philippe May | |
131 | 22 | Philippe May | <pre> |
132 | 22 | Philippe May | location /tiles/ { |
133 | 22 | Philippe May | proxy_pass http://127.0.0.1:8080/; |
134 | 22 | Philippe May | } |
135 | 22 | Philippe May | </pre> |