Skip to content

Commit 6ff775e

Browse files
committed
add tutorial for change detection type using bing imagery
1 parent d3beb0a commit 6ff775e

File tree

4 files changed

+79
-24
lines changed

4 files changed

+79
-24
lines changed

mapswipe_workers/mapswipe_workers/project_types/build_area/build_area_tutorial.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,8 @@ def generate_tutorial_data(tutorial):
5252
task_y = int(row[0].split("-")[2])
5353
grouped_tasks[category][row[3]]["task_x_list"].append(task_x)
5454
grouped_tasks[category][row[3]]["task_y_list"].append(task_y)
55-
url = t.tile_coords_zoom_and_tileserver_to_URL(
56-
task_x,
57-
task_y,
58-
zoom,
59-
tutorial["tileServer"]["name"],
60-
auth.get_api_key(tutorial["tileServer"]["name"]),
61-
None,
62-
None,
55+
url = t.tile_coords_zoom_and_tileserver_to_url(
56+
task_x, task_y, zoom, tutorial["tileServer"]
6357
)
6458
grouped_tasks[category][row[3]]["url_list"].append(url)
6559
grouped_tasks[category][row[3]]["reference_answer_list"].append(row[1])

mapswipe_workers/mapswipe_workers/project_types/change_detection/change_detection_tutorial.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,11 @@ def generate_tutorial_data(tutorial):
4545
task_y = feature["properties"]["TileY"]
4646
task_id_real = "{}-{}-{}".format(zoom, task_x, task_y)
4747

48-
urlA = t.tile_coords_zoom_and_tileserver_to_URL(
49-
task_x,
50-
task_y,
51-
zoom,
52-
tutorial["tileServerA"]["name"],
53-
tutorial["tileServerA"]["apiKey"],
54-
tutorial["tileServerA"]["url"],
55-
None,
48+
urlA = t.tile_coords_zoom_and_tileserver_to_url(
49+
task_x, task_y, zoom, tutorial["tileServerA"]
5650
)
57-
urlB = t.tile_coords_zoom_and_tileserver_to_URL(
58-
task_x,
59-
task_y,
60-
zoom,
61-
tutorial["tileServerB"]["name"],
62-
tutorial["tileServerB"]["apiKey"],
63-
tutorial["tileServerB"]["url"],
64-
None,
51+
urlB = t.tile_coords_zoom_and_tileserver_to_url(
52+
task_x, task_y, zoom, tutorial["tileServerB"]
6553
)
6654

6755
if group_id not in tasks_dict.keys():
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "Change Detection Tutorial",
3+
"projectType": 3,
4+
"projectId": "change_detection_tutorial",
5+
"zoomLevel": 16,
6+
"lookFor": "CHANGES IN BUILDINGS",
7+
"status": "change_detection_tutorial",
8+
"projectDetails": "This is a tutorial",
9+
"progress": 0,
10+
"contributorCount": 0,
11+
"tileServerA" : {
12+
"apiKey" : "AopsdXjtTu-IwNoCTiZBtgRJ1g7yPkzAi65nXplc-eLJwZHYlAIf2yuSY_Kjg3Wn",
13+
"captions" : "",
14+
"date" : "",
15+
"name" : "bing",
16+
"url" : "https://ecn.t0.tiles.virtualearth.net/tiles/a{quad_key}.jpeg?g=7505&mkt=en-US&token={key}",
17+
"credits": "© 2019 Microsoft Corporation, Earthstar Geographics SIO"
18+
},
19+
"tileServerB" : {
20+
"apiKey" : "91e57457-aa2d-41ad-a42b-3b63a123f54a",
21+
"captions" : "",
22+
"date" : "",
23+
"name" : "maxar_premium",
24+
"url" : "https://services.digitalglobe.com/earthservice/tmsaccess/tms/1.0.0/DigitalGlobe%3AImageryTileService@EPSG%3A3857@jpg/{z}/{x}/{y}.jpg?connectId={key}",
25+
"credits": "© 2019 Maxar"
26+
},
27+
"examplesFile": "sample_data/change_detection_tutorial_tasks_bing.geojson",
28+
"categories": {
29+
"changes_1": {
30+
"pre": "For this project we are looking for new settlements. Compare the upper (before) and lower (after) image and *SWIPE RIGHT* (not tap) to indicate that new settlements have been built.",
31+
"post_correct": "Yes, that looks like a new settlement being developed. Plenty of new houses and huts have been built in this area. Swipe left to continue the tutorial.",
32+
"post_wrong": "Oh no. Make sure to spot all the new settlements and swipe right. New roads can also function as an indicator sometimes."
33+
},
34+
"changes_2": {
35+
"pre": "And again: If new settlements have been built, *SWIPE* to the right side.",
36+
"post_correct": "Correct. We can spot new settlements in the upper right part of the satellite image. Swipe left to go on with some more examples.",
37+
"post_wrong": "Take a closer look. There are new settlements here in the upper right part of the satellite image."
38+
},
39+
"no_changes_1": {
40+
"pre": "In this example, there are many buildings but *NO NEW SETTLEMENTS* emerged. *SWIPE* left to indicate no changes.",
41+
"post_correct": "Nice. Just watch out for changes referring to settlements. Swipe left to continue.",
42+
"post_wrong": "Oh no. Not all changes refer to new settlements, some are just related to agriculture or vegetation."
43+
},
44+
"no_changes_2": {
45+
"pre": "We might spot changes in the vegetation for this imagery pair, but no changes related to settlements. Again, *SWIPE LEFT*.",
46+
"post_correct": "Cool. You got it. Just look out for changes concerning settlements.",
47+
"post_wrong": "Sorry, try again. Don't be distracted by changes in vegetation, just look out for settlements."
48+
},
49+
"maybe_1": {
50+
"pre": "Sometimes it might be unclear if settlements emerged. Swipe down if you are not sure.",
51+
"post_correct": "Great. We cannot really tell if the building at the bottom left is a new settlement. This is a 'maybe'.",
52+
"post_wrong": "Are you really sure? Sometimes it's better to mark the imagery as 'not sure'."
53+
},
54+
"bad_imagery_1": {
55+
"pre": "Swipe up to indicate if there is no imagery or if there are clouds.",
56+
"post_correct": "That's right, that image was way too cloudy to make a good assessment!",
57+
"post_wrong": "It there is no imagery or clouds, we cannot tell the right answer. Make sure to mark this as well by swiping up."
58+
}
59+
}
60+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "FeatureCollection",
3+
"name": "change_detection_tutorial_tasks_18",
4+
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
5+
"features": [
6+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 1, "id": 1, "category": "changes_1", "TileX": 146136, "TileY": 126866 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.687255859375, 5.76630318845997 ], [ 20.6886291503906, 5.76630318845997 ], [ 20.6886291503906, 5.76493684469301 ], [ 20.687255859375, 5.76493684469301 ], [ 20.687255859375, 5.76630318845997 ] ] ] ] } },
7+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 1, "id": 1, "category": "changes_2", "TileX": 146138, "TileY": 126875 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.6900024414062, 5.75400597619731 ], [ 20.6913757324219, 5.75400597619731 ], [ 20.6913757324219, 5.75263960285187 ], [ 20.6900024414062, 5.75263960285187 ], [ 20.6900024414062, 5.75400597619731 ] ] ] ] } },
8+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 0, "id": 1, "category": "no_changes_1", "TileX": 146116, "TileY": 126871 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.6597900390625, 5.75947143673713 ], [ 20.6611633300781, 5.75947143673713 ], [ 20.6611633300781, 5.75810507652999 ], [ 20.6597900390625, 5.75810507652999 ], [ 20.6597900390625, 5.75947143673713 ] ] ] ] } },
9+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 0, "id": 1, "category": "no_changes_2", "TileX": 146121, "TileY": 126886 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.6666564941406, 5.73897568897884 ], [ 20.6680297851562, 5.73897568897884 ], [ 20.6680297851562, 5.7376092795666 ], [ 20.6666564941406, 5.7376092795666 ], [ 20.6666564941406, 5.73897568897884 ] ] ] ] } },
10+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 2, "id": 1, "category": "maybe_1", "TileX": 146127, "TileY": 126886 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.6748962402344, 5.73897568897884 ], [ 20.67626953125, 5.73897568897884 ], [ 20.67626953125, 5.7376092795666 ], [ 20.6748962402344, 5.7376092795666 ], [ 20.6748962402344, 5.73897568897884 ] ] ] ] } },
11+
{ "type": "Feature", "properties": { "TileZ": 18, "reference": 3, "id": 1, "category": "bad_imagery_1", "TileX": 146127, "TileY": 126888 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 20.6748962402344, 5.73624286688015 ], [ 20.67626953125, 5.73624286688015 ], [ 20.67626953125, 5.73487645092028 ], [ 20.6748962402344, 5.73487645092028 ], [ 20.6748962402344, 5.73624286688015 ] ] ] ] } }
12+
]
13+
}

0 commit comments

Comments
 (0)