forked from evyatark/prcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructions.txt
277 lines (206 loc) · 15.1 KB
/
instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
on my work machine:
cd /home/evyatar/work/prcc/angular/demo03
nvm version (should yield: v20.5.0)
nvm use v20.5.0
npm install
npm run build (<== this is optional)
ng serve
then browse to
http://localhost:4200/
On Windows:
1. install git (including git bash)
2. install npm
then:
npm --version (to make sure you have npm installed)
3. clone git repo:
cd /c/Users/Evyatar/work
git clone https://github.com/evyatark/prcc.git
4. run:
cd /c/Users/Evyatar/work/prcc
npm install
npm run start
then browse to http://localhost:4200/
browse to this to see the Figma:
https://www.figma.com/file/Ty4mQXA9tULeEIHd53Q7cC/Digital-Forest?type=design&node-id=845-18699&mode=design&t=UNnTzTZ5aGZeuXz8-0
to deploy
---------
First, MAKE SURE everything is committed and pushed to git (otherwise you will loose your work!!!)
then, before running deploy.sh, make sure npm is available.
if not, do again:
nvm use v20.5.0
in console run:
./deploy.sh
(currently it deploys to github of evyatark, so all links are to that project)
- it will ask for the username and password (token) for github, which you MUST enter manually.
- if completed correctly, github will now deploy to gh-pages, you can see this task progress in https://github.com/evyatark/prcc/actions
- when action is completed, access https://evyatark.github.io/prcc/ (anyone can access from anywhere!)
ToDo
----
1. implement layers for selecting the "בחר שכבות" - Gush-Chelka, Yaad trees, Bus stations, Pishtey-Hazafa
done: Gush-Chelka, Yaad trees, Yaad canopies
2. implement display view of "לווין" (sattelite raster tiles)
done: tiles zoom levels 8-16
3. HILA? - Fix formulas of view displays (temperature, vegetation, maybe also clusters)
4. HILA? - improve the region right pane (smaller gaps?)
5. add slider functionality calculate correct values in the region display
DONE!
6. add pages of "external" links ("מתודולוגיה", "צור קשר", "אודות")
7. add flyTo efect when selecting a region
8. improve display of values in drop-down of filters (colored circles)
9. in layers selection, implement selecting multiple layers
DONE!
10. add legend floating pane/panes
DONE!
11. combined RGB - use formula from Shilo
DONE!
Hila says
V header looks bigger, should be 90%
add gray color for out of polygons!! - how to do it
V map with labels in Hebrew
V when entering first time, zoom should be on Israel (but as a consequence, statistical areas are not displayed, until you zoom in!)
gaps between the text line in the right panel
V color of header should be gray not green
add favicon
gushChelka layer should be only in stat-areas and Sattelite display (not in Munis!!)
colors and layers of map behind our polygons
upload via Uploads API to mapbox:
https://docs.mapbox.com/help/tutorials/upload-curl/#stage-your-file-on-amazon-s3
(create an access token in the mapbox studio, with permission upload:write)
curl -X POST "https://api.mapbox.com/uploads/v1/evyatark/credentials?access_token=sk.eyJ1I..."
{
"bucket":"tilestream-tilesets-production",
"key":"6f/_pending/l8x3yv3ujmo2bxq06iad0zllc/evyatark",
"accessKeyId":"ASIATNLV",
"secretAccessKey":"zmKR",
"sessionToken":"FwoGZXI ",
"url":"https://tilestream-tilesets-production.s3.amazonaws.com/6f/_pending/l8x3yv3ujmo2bxq06iad0zllc/evyatark"
}
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=...
aws s3 cp /home/evyatar/work/prcc/LST8bit.tif s3://tilestream-tilesets-production/{key} --region us-east-1
upload: ./LST8bit.tif to s3://tilestream-tilesets-production/{key}
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "url": "http://tilestream-tilesets-production.s3.amazonaws.com/20/_pending/muv8fzfj9so24yn5i7eb1zllc/evyatark", "tileset": "evyatark.lst-image-30", "name": "LST 30"}' 'https://api.mapbox.com/uploads/v1/evyatark?access_token=sk.eyJ1Ijo...'
This endpoint requires a token with uploads:write scope.
{
"id":"cllz1hk220y4f2bo48gnr6dcg",
"name":"LST 30",
"complete":false,
"error":null,
"created":"2023-08-31T10:44:50.012Z",
"modified":"2023-08-31T10:44:50.012Z",
"tileset":"evyatark.lst-image-30",
"owner":"evyatark",
"progress":0
}
curl "https://api.mapbox.com/uploads/v1/evyatark/cllz1hk220y4f2bo48gnr6dcg?access_token=sk.eyJ1I..."
{"bucket":"tilestream-tilesets-production",
"key":"64/_pending/slnkn4vd0op2rae2ujkw2zllc/evyatark",
"accessKeyId":"ASIATNL...",
"secretAccessKey":"KkVRbo6..",
"sessionToken":"FwoGZXIvYXd...",
"url":"https://tilestream-tilesets-production.s3.amazonaws.com/64/_pending/slnkn4vd0op2rae2ujkw2zllc/evyatark"}
export AWS_ACCESS_KEY_ID=ASIATNLV...
export AWS_SECRET_ACCESS_KEY=KkVRbo6...
export AWS_SESSION_TOKEN=FwoGZXIvYXdzEB...
aws s3 cp /home/evyatar/work/prcc/NDV8bit.tif s3://tilestream-tilesets-production/64/_pending/slnkn4vd0op2rae2ujkw2zllc/evyatark --region us-east-1
upload: ./NDV8bit.tif to s3://tilestream-tilesets-production/64/_pending/slnkn4vd0op2rae2ujkw2zllc/evyatark
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "url": "http://tilestream-tilesets-production.s3.amazonaws.com/64/_pending/slnkn4vd0op2rae2ujkw2zllc/evyatark", "tileset": "evyatark.ndv-image-30", "name": "NDV 30"}' 'https://api.mapbox.com/uploads/v1/evyatark?access_token=sk.eyJ1I...'
{
"id":"cllz33r9x0r5a2as3re4bwtd1",
"name":"NDV 30",
"complete":false,
"error":null,
"created":"2023-08-31T11:30:05.410Z",
"modified":"2023-08-31T11:30:05.410Z",
"tileset":"evyatark.ndv-image-30",
"owner":"evyatark",
"progress":0}
check status with this request:
curl "https://api.mapbox.com/uploads/v1/evyatark/cllz33r9x0r5a2as3re4bwtd1?access_token=sk.eyJ1I..."
{
"id":"cllz33r9x0r5a2as3re4bwtd1","name":"NDV 30",
"complete":true,
"error":null,"created":"2023-08-31T11:30:05.410Z","modified":"2023-08-31T11:30:05.410Z","tileset":"evyatark.ndv-image-30","owner":"evyatark","progress":1}
upload: ./LST_Tiles.mbtiles to s3://tilestream-tilesets-production/1c/_pending/3jlhwbddtmh2d1w0zeh2uimlc/evyatark
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "url": "http://tilestream-tilesets-production.s3.amazonaws.com/1c/_pending/3jlhwbddtmh2d1w0zeh2uimlc/evyatark", "tileset": "evyatark.lst-tiles", "name": "LST Tiles 30"}' 'https://api.mapbox.com/uploads/v1/evyatark?access_token=sk.eyJ1I...'
{"id":"clmiuksur07kl2lo6rkwlf5zv","name":"LST Tiles 30","complete":false,"error":null,"created":"2023-09-14T07:26:47.587Z","modified":"2023-09-14T07:26:47.587Z","tileset":"evyatark.lst-tiles","own..
https://api.mapbox.com/uploads/v1/evyatark?access_token=sk.eyJ1I...
check status with:
evyatar@dell-precision-3551:~/work/prcc/data$ curl "https://api.mapbox.com/uploads/v1/evyatark/clmiuksur07kl2lo6rkwlf5zv?access_token=sk.eyJ1I..."
response:
{"id":"clmiuksur07kl2lo6rkwlf5zv","name":"LST Tiles 30","complete":false,"error":"Maxzoom exceeded for mbtiles file. There is a max zoom limit of 16 but tiles up to zoom level 17 were found. If you need support for 1cm tilesets please reach out to support.","created":"2023-09-14T07:26:47.587Z","modified":"2023-09-14T07:26:47.587Z","tileset":"evyatark.lst-tiles","owner":"evyatark","progress":0}
evyatar@dell-precision-3551:~/work/prcc/data$
public layers from Adam
-----------------------
treebase.parcels_labels
treebase.parcels
treebase.trees
treebase.canopies
mushon.cl1ozb8t603ie28kreec96kcg-8dowa
comments
1. change opacity of cluster and vegFrac (from 0.3 to 0.9?) to see better colors.
temperature is 0.9 colors are OK
2. put layer of city names and street names above the colors of polygons
3. popup on a stat area - איזור סטטיסטי
customer should say what data to include in the pop-up
color of text VegFrac in color green??
4. content for the about - customer should supply
5. from about, link to מדיניות שימוש like YAAD
6. bg layers - customer will supply Pishtey Hazafa
7. bg layer trees - legend explaining vadai against meshoar?
show only vadai?
display Chupot instead of trees?? V chupot displayed!
display smaller circles V done smaller circles for trees
legend should say that trees are Meshoar
uploading from evyatark3108:
- in Mapbox Studio, in your account, create access token with permissions Upload:*
ACCESS_TOKEN=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ...
curl -X POST "https://api.mapbox.com/uploads/v1/evyatark3108/credentials?access_token=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ."
response is:
{
"bucket":"tilestream-tilesets-production",
"key":"1a/_pending/910p6um95sh2le20t6qszmnlc/evyatark3108",
"accessKeyId":"ASIATNLVGLR2MV3TGWFR",
"secretAccessKey":"OOvr2qBxx/Hg6V4huZzkubqYvcsu3U/BO8F72phJ",
"sessionToken":"FwoGZXIvYXdzEAsaDEt6BkjygzIsq5DqmCKeAn6/9s4UO3hWkgdCf3idUpCOAtKw3hteQQ4A1HVSmiXzADBAwFwyCsn8iVevJJtXaFpgcF3ty4PPfngHX4RwFir8bHJWrfqGDb/8c8iH8nZzW7wNz8lLkILjwEX+D8HB9zBdzFxnSrR5xOUPhtwgRaPfQ32Y+FQxFRoK0XywA3NbLCIkeryz+f78pgypd34/XMW5kK5M0jK4JkY1k66L/bCGYEMIG8yQg2y0iT4CuzvpIw5eKlAfmynJPZjadV5RGw8S7VdASRy8KwiHX64YCwBXSmGEHTPPzJrOwKJAAY07pfxTJpP4yHQy1qERd49KFFwlJ/Bd3J0z+AHKoPCHVfdLF8VRo/7lCA1EfJa54iwNDO+WnhTzXcB1Z11Fp2Aozv+eqQYyKWrXlJqxC08IfM59EBAfO7fhFbLOjbAesRZZyEcRx3g5rpLEieLP4J1b",
"url":"https://tilestream-tilesets-production.s3.amazonaws.com/1a/_pending/910p6um95sh2le20t6qszmnlc/evyatark3108"
}
- copy from the response the relevant parts to these terminal commands.
- for the 4th command (aws s3 ...) you need to install aws command line if you don't already have it.
- paste the commands in terminal:
export AWS_ACCESS_KEY_ID=ASIATNLVGLR2MV3TGWFR
export AWS_SECRET_ACCESS_KEY=OOvr2qBxx/Hg6V4huZzkubqYvcsu3U/BO8F72phJ
export AWS_SESSION_TOKEN=FwoGZXIvYXdzEAsaDEt6BkjygzIsq5DqmCKeAn6/9s4UO3hWkgdCf3idUpCOAtKw3hteQQ4A1HVSmiXzADBAwFwyCsn8iVevJJtXaFpgcF3ty4PPfngHX4RwFir8bHJWrfqGDb/8c8iH8nZzW7wNz8lLkILjwEX+D8HB9zBdzFxnSrR5xOUPhtwgRaPfQ32Y+FQxFRoK0XywA3NbLCIkeryz+f78pgypd34/XMW5kK5M0jK4JkY1k66L/bCGYEMIG8yQg2y0iT4CuzvpIw5eKlAfmynJPZjadV5RGw8S7VdASRy8KwiHX64YCwBXSmGEHTPPzJrOwKJAAY07pfxTJpP4yHQy1qERd49KFFwlJ/Bd3J0z+AHKoPCHVfdLF8VRo/7lCA1EfJa54iwNDO+WnhTzXcB1Z11Fp2Aozv+eqQYyKWrXlJqxC08IfM59EBAfO7fhFbLOjbAesRZZyEcRx3g5rpLEieLP4J1b
aws s3 cp /home/evyatar/work/prcc/data/new/LST_Tiles_8_16.mbtiles s3://tilestream-tilesets-production/1a/_pending/910p6um95sh2le20t6qszmnlc/evyatark3108 --region us-east-1
after the 4th command, the terminal will display an updating status line while the upload is hapenning
(might take a long time, depending on the file size and your internet connection.
for large files, you should prefer a symmetric internet connection with high upload, like in University or Hi-Tech company)
the 4th command completes, you will get this response:
upload: work/prcc/data/new/LST_Tiles_8_16.mbtiles to s3://tilestream-tilesets-production/1a/_pending/910p6um95sh2le20t6qszmnlc/evyatark3108
after upload is complete, create the following request
(paste correct "key" and "access token" and change "tileset" and "name" to have meaningful values because you will use them later as layer name in the mapbox style)
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "url": "http://tilestream-tilesets-production.s3.amazonaws.com/1a/_pending/910p6um95sh2le20t6qszmnlc/evyatark3108", "tileset": "evyatark3108.lst-image-30", "name": "LST 30"}' 'https://api.mapbox.com/uploads/v1/evyatark3108?access_token=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ.'
you are supposed to get an immediate response like this:
{"id":"clnn0foio2wtn2opfbyo7nbw5","name":"LST 30","complete":false,"error":null,"created":"2023-10-12T10:01:33.423Z","modified":"2023-10-12T10:01:33.423Z","tileset":"evyatark3108.lst-image-30","owner":"evyatark3108","progress":0}
(if you get {"message":"Not Found"} it means that something is wrong with how you created the request text. check again all parts, especially the user name and the key and the access token)
now you should use the id from the response to check progress of the processing:
curl "https://api.mapbox.com/uploads/v1/evyatark3108/clnn0foio2wtn2opfbyo7nbw5?access_token=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ."
run this url until you get a response like this with a progress=1 !! (progress=0 means it is still processing!!)
{"id":"clnn0foio2wtn2opfbyo7nbw5","name":"LST 30","complete":true,"error":null,"created":"2023-10-12T10:01:33.423Z","modified":"2023-10-12T10:01:33.423Z","tileset":"evyatark3108.lst-image-30","owner":"evyatark3108","progress":1}
after that, in Mapbox Studio, add a layer with this source (LST 30), set opacity to 0.69.
rest of parameters are controled by code.
{"bucket":"tilestream-tilesets-production","key":"0f/_pending/w8246xa62ta2ajo2cxcj1nnlc/evyatark3108",
"accessKeyId":"ASIATNLVGLR2F2TKTDMF","secretAccessKey":"aO4TgS7xIcImhrUPXexBOKzrs9SRjXC7Bg1ZU1Lm","sessionToken":"FwoGZXIvYXdzEAwaDP8Or+pBfEi00MU2miKeAiEusMGI+RGAToAUFyGTIox2PoXjZc97Xi6H8WUybN7++hwjREtmvZK+uQhX/QQdbyB1mGB79es/DsW0J0hWnX1LZ784ShXcK3o09lgJ8bidNAdf+MaScX4wM4sYHdUq5bYL5bgCc3FepCiYqgEqlmIcMMmHNFPlIPI/ZoMwj7SvrbhWj5rjJY6uDuT08P9LdXujzbs0g9Dml9YtRY9G4yM9B6YUn04I6b5X68UlnxmGA1mWonZCJkKtA4pUitcTgua7eiVqJIkJ7xlAfiqUIs4rMem5kTaBlXUJgbgQvCS+ild257oWELt6or8PFRshwmJUgsfRawTLN21IedSS/NBfjOO3+d8/0fopHg0chtF4CmZERQZKvhaCfMxXBJ4ouJafqQYyKf5KpXvYpc025xghFt84Qfx1XKKR+Kg/NzqmvhNBeOmvr8cDf034oViB",
"url":"https://tilestream-tilesets-production.s3.amazonaws.com/0f/_pending/w8246xa62ta2ajo2cxcj1nnlc/evyatark3108"}
export AWS_ACCESS_KEY_ID=ASIATNLVGLR2F2TKTDMF
export AWS_SECRET_ACCESS_KEY=aO4TgS7xIcImhrUPXexBOKzrs9SRjXC7Bg1ZU1Lm
export AWS_SESSION_TOKEN=FwoGZXIvYXdzEAwaDP8Or+pBfEi00MU2miKeAiEusMGI+RGAToAUFyGTIox2PoXjZc97Xi6H8WUybN7++hwjREtmvZK+uQhX/QQdbyB1mGB79es/DsW0J0hWnX1LZ784ShXcK3o09lgJ8bidNAdf+MaScX4wM4sYHdUq5bYL5bgCc3FepCiYqgEqlmIcMMmHNFPlIPI/ZoMwj7SvrbhWj5rjJY6uDuT08P9LdXujzbs0g9Dml9YtRY9G4yM9B6YUn04I6b5X68UlnxmGA1mWonZCJkKtA4pUitcTgua7eiVqJIkJ7xlAfiqUIs4rMem5kTaBlXUJgbgQvCS+ild257oWELt6or8PFRshwmJUgsfRawTLN21IedSS/NBfjOO3+d8/0fopHg0chtF4CmZERQZKvhaCfMxXBJ4ouJafqQYyKf5KpXvYpc025xghFt84Qfx1XKKR+Kg/NzqmvhNBeOmvr8cDf034oViB
aws s3 cp /home/evyatar/work/prcc/data/new/NDVI_Tiles_8_16.mbtiles s3://tilestream-tilesets-production/0f/_pending/w8246xa62ta2ajo2cxcj1nnlc/evyatark3108 --region us-east-1
response:
upload: work/prcc/data/new/NDVI_Tiles_8_16.mbtiles to s3://tilestream-tilesets-production/0f/_pending/w8246xa62ta2ajo2cxcj1nnlc/evyatark3108
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "url": "http://tilestream-tilesets-production.s3.amazonaws.com/0f/_pending/w8246xa62ta2ajo2cxcj1nnlc/evyatark3108", "tileset": "evyatark3108.ndvi-image-30", "name": "NDVI 30"}' 'https://api.mapbox.com/uploads/v1/evyatark3108?access_token=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ.'
response:
{"id":"clnn1z2eg15ko2coqosz21gv2","name":"NDVI 30","complete":false,"error":null,"created":"2023-10-12T10:44:37.493Z","modified":"2023-10-12T10:44:37.493Z","tileset":"evyatark3108.ndvi-image-30","owner":"evyatark3108","progress":0}
check status:
curl "https://api.mapbox.com/uploads/v1/evyatark3108/clnn1z2eg15ko2coqosz21gv2?access_token=sk.eyJ1IjoiZXZ5YXRhcmszMTA4IiwiYSI6ImNsbm16ZHZ3YzAxOHUya2xqanV0OTQzZG8ifQ."