Skip to content

Commit 16b0254

Browse files
authored
Merge pull request #488 from mapswipe/dev
Dev
2 parents a7c769a + 8b8db84 commit 16b0254

File tree

4 files changed

+194
-5
lines changed

4 files changed

+194
-5
lines changed

manager_dashboard/manager_dashboard/js/forms.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ function openFile(event) {
233233

234234
// check project size, based on zoom level
235235
var zoomLevel = parseInt(document.getElementById('zoomLevel').value);
236-
maxArea = (23 - zoomLevel) * (23 - zoomLevel) * 200
236+
// 20,480 sqkm for zoom 17
237+
// 5,120 sqkm for zooom 18
238+
// 1,280 sqkm for zoom 19
239+
maxArea = 5 * (4 ** (23 - zoomLevel))
237240
console.log('project size: ' + sumArea + ' sqkm')
238241

239242
if (sumArea > maxArea) {

mapswipe_workers/mapswipe_workers/project_types/tile_map_service_grid/project.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,9 @@ def validate_geometries(self):
154154
# We calculate the max area based on zoom level.
155155
# This is an approximation to restrict the project size
156156
# in respect to the number of tasks.
157-
# At zoom level 22 the max area is set to 200 square kilometers.
158-
# For zoom level 18 this will result in an max area of 5000 square kilometers.
159-
# (23-18) * (23-18) * 200 = 5000
160-
max_area = (23 - int(self.zoomLevel)) * (23 - int(self.zoomLevel)) * 200
157+
# At zoom level 22 the max area is set to 20 square kilometers.
158+
# For zoom level 18 this will result in an max area of 5,120 square kilometers.
159+
max_area = 5 * 4 ** (23 - self.zoomLevel)
161160

162161
if project_area > max_area:
163162
logger.warning(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{ "1": {
2+
"hint" : {
3+
"description" : "The difference in contrast makes it harder to assess.",
4+
"icon" : "swipe-left",
5+
"title" : "There is NO change between the two periods."
6+
},
7+
"instructions" : {
8+
"description" : "No need to tap. Just swipe to the next screen.",
9+
"icon" : "swipe-left",
10+
"title" : "There are no new settlements here."
11+
},
12+
"success" : {
13+
"description" : "Swipe to the next screen to look for more.",
14+
"icon" : "check",
15+
"title" : "You correctly mapped this task!"
16+
}
17+
},
18+
"2": {
19+
"hint" : {
20+
"description" : "Tap once whenever you spot new settlements. Swipe to learn more.",
21+
"icon" : "swipe-left",
22+
"title" : "Green indicates that settlements have emerged or expanded."
23+
},
24+
"instructions" : {
25+
"description" : "Tap the square once to mark it green indicating there are new settlements.",
26+
"icon" : "tap-1",
27+
"title" : "Here we easily find new small settlements."
28+
},
29+
"success" : {
30+
"description" : "Swipe to the next screen to learn more.",
31+
"icon" : "check",
32+
"title" : "Nice. Use this whenever you spot new settlements."
33+
}
34+
},
35+
"3": {
36+
"hint" : {
37+
"description" : "The new refugee reception settlement developed over the last three years is clearly visible in the post image.",
38+
"icon" : "swipe-left",
39+
"title" : "We've marked the task green indicating change."
40+
},
41+
"instructions" : {
42+
"description" : "Tap once mark the tile green.",
43+
"icon" : "tap-1",
44+
"title" : "Look at this new large settlement."
45+
},
46+
"success" : {
47+
"description" : "Swipe to keep on going",
48+
"icon" : "check",
49+
"title" : "Great work!"
50+
}
51+
},
52+
"4": {
53+
"hint" : {
54+
"description" : "It is a difficult to see because of size and low contrast with vegetation.",
55+
"icon" : "swipe-left",
56+
"title" : "Take a closer look."
57+
},
58+
"instructions" : {
59+
"description" : "Again, just tap once.",
60+
"icon" : "swipe-left",
61+
"title" : "There are some small new settlements here."
62+
},
63+
"success" : {
64+
"description" : "Swipe to the next screen to learn more.",
65+
"icon" : "check",
66+
"title" : "Correct!"
67+
}
68+
},
69+
"5": {
70+
"hint" : {
71+
"description" : "The settlements is visible in both images that have grown in size over the course of 3 years.",
72+
"icon" : "swipe-left",
73+
"title" : "We’ve marked the correct answers"
74+
},
75+
"instructions" : {
76+
"description" : "Also in this case tap once.",
77+
"icon" : "tap-1",
78+
"title" : "The existing settlement expanded."
79+
},
80+
"success" : {
81+
"description" : "Swipe to practice some more.",
82+
"icon" : "check",
83+
"title" : "Well done, you found all the waste!"
84+
}
85+
},
86+
"6": {
87+
"hint" : {
88+
"description" : "The imagery details and size of built-up features are not enough to make a confident assessment.",
89+
"icon" : "swipe-left",
90+
"title" : "We've marked the tile yellow."
91+
},
92+
"instructions" : {
93+
"description" : "You can tap twice to indicate that settlements might have changed.",
94+
"icon" : "tap-2",
95+
"title" : "This is an example where we can't decide."
96+
},
97+
"success" : {
98+
"description" : "Swipe for the next example.",
99+
"icon" : "check",
100+
"title" : "Well done, you got it right!"
101+
}
102+
},
103+
"7": {
104+
"hint" : {
105+
"description" : "It is not clear whether there may be more land (and potentially new settlements) under the cloud-covered area",
106+
"icon" : "swipe-left",
107+
"title" : "The square should be marked red."
108+
},
109+
"instructions" : {
110+
"description" : "Tap three times to indicate bad imagery.",
111+
"icon" : "tap-3",
112+
"title" : "There are so many clouds here."
113+
},
114+
"success" : {
115+
"description" : "Swipe to practice some more.",
116+
"icon" : "check",
117+
"title" : "Good work."
118+
}
119+
},
120+
"8": {
121+
"hint" : {
122+
"description" : "There may be new built-up areas, but they are not easy to identify.",
123+
"icon" : "swipe-left",
124+
"title" : "We've marked the task yellow for you."
125+
},
126+
"instructions" : {
127+
"description" : "Use the 'maybe' option for such an example.",
128+
"icon" : "tap-2",
129+
"title" : "This one is hard to tell."
130+
},
131+
"success" : {
132+
"description" : "Swipe to learn more.",
133+
"icon" : "check",
134+
"title" : "Great."
135+
}
136+
},
137+
"9": {
138+
"hint" : {
139+
"description" : "New settlements are hard to identify with imagery at this resolution.",
140+
"icon" : "swipe-left",
141+
"title" : "You can use the 'maybe' option."
142+
},
143+
"instructions" : {
144+
"description" : "Again, we are not really sure about it and use 'maybe'.",
145+
"icon" : "tap-2",
146+
"title" : "We can't really tell."
147+
},
148+
"success" : {
149+
"description" : "You got it correct.",
150+
"icon" : "check",
151+
"title" : "Perfect."
152+
}
153+
},
154+
"10": {
155+
"hint" : {
156+
"description" : "Some land clearing is visible in the before image, which is then covered with more vegetation/crops in the post image.",
157+
"icon" : "swipe-left",
158+
"title" : "No settlements in pre/post images."
159+
},
160+
"instructions" : {
161+
"description" : "Always remember, if there is no change just swipe left.",
162+
"icon" : "swipe-left",
163+
"title" : "No settlements are visible in either image."
164+
},
165+
"success" : {
166+
"description" : "You've reached the end of the tutorial swipe to finish.",
167+
"icon" : "check",
168+
"title" : "Done."
169+
}
170+
} }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"type": "FeatureCollection",
3+
"name": "uganda_change_detection_tutorial_tasks",
4+
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
5+
"features": [
6+
{ "type": "Feature", "properties": { "groupId": "g119", "taskId": "14-9601-8024", "tile_x": 9601, "tile_y": 8024, "tile_z": 14, "screen": 5, "reference": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 30.95947265625, 3.68885514314704, 0.0 ], [ 30.9814453125, 3.68885514314704, 0.0 ], [ 30.9814453125, 3.66692774092871, 0.0 ], [ 30.95947265625, 3.66692774092871, 0.0 ], [ 30.95947265625, 3.68885514314704, 0.0 ] ] ] } },
7+
{ "type": "Feature", "properties": { "groupId": "g121", "taskId": "14-9723-8025", "tile_x": 9723, "tile_y": 8025, "tile_z": 14, "screen": 6, "reference": 2 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 33.64013671875, 3.66692774092871, 0.0 ], [ 33.662109375, 3.66692774092871, 0.0 ], [ 33.662109375, 3.64499980089204, 0.0 ], [ 33.64013671875, 3.64499980089204, 0.0 ], [ 33.64013671875, 3.66692774092871, 0.0 ] ] ] } },
8+
{ "type": "Feature", "properties": { "groupId": "g125", "taskId": "14-9603-8031", "tile_x": 9603, "tile_y": 8031, "tile_z": 14, "screen": 9, "reference": 2 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 31.00341796875, 3.53535214540086, 0.0 ], [ 31.025390625, 3.53535214540086, 0.0 ], [ 31.025390625, 3.51342104564003, 0.0 ], [ 31.00341796875, 3.51342104564003, 0.0 ], [ 31.00341796875, 3.53535214540086, 0.0 ] ] ] } },
9+
{ "type": "Feature", "properties": { "groupId": "g125", "taskId": "14-9634-8031", "tile_x": 9634, "tile_y": 8031, "tile_z": 14, "screen": 4, "reference": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 31.6845703125, 3.53535214540086, 0.0 ], [ 31.70654296875, 3.53535214540086, 0.0 ], [ 31.70654296875, 3.51342104564003, 0.0 ], [ 31.6845703125, 3.51342104564003, 0.0 ], [ 31.6845703125, 3.53535214540086, 0.0 ] ] ] } },
10+
{ "type": "Feature", "properties": { "groupId": "g129", "taskId": "14-9648-8037", "tile_x": 9648, "tile_y": 8037, "tile_z": 14, "screen": 3, "reference": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 31.9921875, 3.40375787957757, 0.0 ], [ 32.01416015625, 3.40375787957757, 0.0 ], [ 32.01416015625, 3.38182373532828, 0.0 ], [ 31.9921875, 3.38182373532828, 0.0 ], [ 31.9921875, 3.40375787957757, 0.0 ] ] ] } },
11+
{ "type": "Feature", "properties": { "groupId": "g131", "taskId": "14-9668-8038", "tile_x": 9668, "tile_y": 8038, "tile_z": 14, "screen": 2, "reference": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 32.431640625, 3.38182373532828, 0.0 ], [ 32.45361328125, 3.38182373532828, 0.0 ], [ 32.45361328125, 3.35988909487338, 0.0 ], [ 32.431640625, 3.35988909487338, 0.0 ], [ 32.431640625, 3.38182373532828, 0.0 ] ] ] } },
12+
{ "type": "Feature", "properties": { "groupId": "g134", "taskId": "14-9688-8041", "tile_x": 9688, "tile_y": 8041, "tile_z": 14, "screen": 1, "reference": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 32.87109375, 3.31601833816151, 0.0 ], [ 32.89306640625, 3.31601833816151, 0.0 ], [ 32.89306640625, 3.2940822283128, 0.0 ], [ 32.87109375, 3.2940822283128, 0.0 ], [ 32.87109375, 3.31601833816151, 0.0 ] ] ] } },
13+
{ "type": "Feature", "properties": { "groupId": "g146", "taskId": "14-9741-8059", "tile_x": 9741, "tile_y": 8059, "tile_z": 14, "screen": 10, "reference": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 34.03564453125, 2.92109701870845, 0.0 ], [ 34.0576171875, 2.92109701870845, 0.0 ], [ 34.0576171875, 2.8991526985043, 0.0 ], [ 34.03564453125, 2.8991526985043, 0.0 ], [ 34.03564453125, 2.92109701870845, 0.0 ] ] ] } },
14+
{ "type": "Feature", "properties": { "groupId": "g149", "taskId": "14-9661-8065", "tile_x": 9661, "tile_y": 8065, "tile_z": 14, "screen": 8, "reference": 2 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 32.27783203125, 2.78942477700599, 0.0 ], [ 32.2998046875, 2.78942477700599, 0.0 ], [ 32.2998046875, 2.76747795109208, 0.0 ], [ 32.27783203125, 2.76747795109208, 0.0 ], [ 32.27783203125, 2.78942477700599, 0.0 ] ] ] } },
15+
{ "type": "Feature", "properties": { "groupId": "g168", "taskId": "14-9615-8092", "tile_x": 9615, "tile_y": 8092, "tile_z": 14, "screen": 7, "reference": 3 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 31.26708984375, 2.19672724176165, 0.0 ], [ 31.2890625, 2.19672724176165, 0.0 ], [ 31.2890625, 2.1747705722119, 0.0 ], [ 31.26708984375, 2.1747705722119, 0.0 ], [ 31.26708984375, 2.19672724176165, 0.0 ] ] ] } }
16+
]
17+
}

0 commit comments

Comments
 (0)