Skip to content

Commit 8c00e2b

Browse files
committed
add new project attributes #112
1 parent a43db13 commit 8c00e2b

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

mapswipe_workers/mapswipe_workers/base/base_project.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ def __init__(self, project_draft):
6767
self.projectType = int(project_draft['projectType'])
6868
self.verificationNumber = project_draft['verificationNumber']
6969
self.status = 'new'
70+
self.projectTopic = project_draft.get('projectTopic', None)
71+
self.projectRegion = project_draft.get('projectRegion', None)
72+
self.projectNumber = project_draft.get('projectNumber', None)
73+
self.requestingOrganisation = project_draft.get('requestingOrganisation', None)
7074

7175
# TODO: Implement resultRequiredCounter as property.
7276
# Does not work because for some reason project['group'] = vars()

mapswipe_workers/sample_data/build_area_project_drafts.json

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"image": "http://www.redcrosseth.org/media/k2/items/cache/5a05a447acfdf6fcc40548cc4c1cea8d_L.jpg",
2323
"lookFor": "VEGETATION",
2424
"name": "BuildArea Sentinel Sample Project",
25+
"projectTopic": "Economic Development",
26+
"projectRegion": "Test Region",
27+
"projectNumber": "1",
28+
"requestingOrganisation": "Benni",
2529
"projectDetails": "This project uses tiles based on Sentinel data provided by sinergise. We need to define a layer name for the WMTS, zoom level is set to 14",
2630
"verificationNumber": 3,
2731
"groupSize": 40,
@@ -32,27 +36,5 @@
3236
"wmtsLayerName": "FALSE_COLOR"
3337
},
3438
"zoomLevel": 14
35-
},
36-
"build_area_big": {
37-
"createdBy": "Sample Manager",
38-
"geometry": {
39-
"type": "FeatureCollection",
40-
"name": "Bukindon_South",
41-
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
42-
"features": [
43-
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 124.552337022305508, 8.013183564718995 ], [ 125.377278964821471, 8.029047832844302 ], [ 125.37539673, 8.02042961000001 ], [ 125.38337708, 8.00566959 ], [ 125.38165283, 7.98554993 ], [ 125.40270996, 7.96005011 ], [ 125.40054321, 7.93393993 ], [ 125.42089081, 7.91193008 ], [ 125.41744232, 7.81731987000001 ], [ 125.44413757, 7.75562 ], [ 125.44290924, 7.71647978 ], [ 125.42626953, 7.68472004 ], [ 125.43073273, 7.65559006 ], [ 125.42360687, 7.64100981 ], [ 125.39592743, 7.62140989 ], [ 125.37480164, 7.63410997 ], [ 125.35057831, 7.63816023 ], [ 125.32256317, 7.62744999 ], [ 125.30198669, 7.63472986 ], [ 125.30090332, 7.64885998 ], [ 125.28074646, 7.64744997 ], [ 125.28038025, 7.64074993 ], [ 125.25241089, 7.64373016000002 ], [ 125.25203705, 7.57984018000001 ], [ 125.21894073, 7.59195995 ], [ 125.21656799, 7.57053995 ], [ 125.19329834, 7.57212019 ], [ 125.16586304, 7.5229702 ], [ 125.15531921, 7.46537018 ], [ 125.13262939, 7.46412992 ], [ 125.11971283, 7.45313978000001 ], [ 125.06778717, 7.45175982000001 ], [ 125.05996704, 7.41956997 ], [ 125.04620361, 7.40458012000001 ], [ 124.97190857, 7.40071011000001 ], [ 124.94645691, 7.41130018 ], [ 124.92875671, 7.43205023 ], [ 124.89972687, 7.41360998 ], [ 124.88018036, 7.41554022 ], [ 124.87835693, 7.43260002 ], [ 124.86456299, 7.4320302 ], [ 124.84023285, 7.45099020000001 ], [ 124.84063721, 7.47724009 ], [ 124.82692719, 7.48998022000001 ], [ 124.81472015, 7.49597979000001 ], [ 124.7882309, 7.48022985 ], [ 124.79981232, 7.51733017 ], [ 124.82507324, 7.54148006 ], [ 124.82501221, 7.55834007 ], [ 124.81430054, 7.56812 ], [ 124.82051086, 7.57296991 ], [ 124.81165314, 7.57566977 ], [ 124.81788635, 7.59229994 ], [ 124.80444336, 7.5985198 ], [ 124.8025589, 7.62318993 ], [ 124.75379944, 7.65322018000001 ], [ 124.75311279, 7.67986012 ], [ 124.74120331, 7.68281984 ], [ 124.74056244, 7.69629002000001 ], [ 124.72891235, 7.70124006 ], [ 124.72543335, 7.7186799 ], [ 124.73486328, 7.73115015 ], [ 124.70761108, 7.75507021 ], [ 124.70349884, 7.77635002 ], [ 124.68052673, 7.79621983 ], [ 124.66120911, 7.83530998000002 ], [ 124.63118744, 7.84638977 ], [ 124.62483215, 7.87036991 ], [ 124.61730957, 7.87075996 ], [ 124.62412262, 7.89082003 ], [ 124.59819794, 7.90516996000001 ], [ 124.60048676, 7.9162302 ], [ 124.55732727, 7.9840498 ], [ 124.56124115, 7.99703979000002 ], [ 124.552337022305508, 8.013183564718995 ] ] ] ] } }
44-
]
45-
},
46-
"image": "http://www.redcrosseth.org/media/k2/items/cache/5a05a447acfdf6fcc40548cc4c1cea8d_L.jpg",
47-
"lookFor": "BUILDINGS",
48-
"name": "BuildArea Big",
49-
"projectDetails": "This project uses Bing as the tile server and zoom level 18. This is the setup most MapSwipe projects used so far.",
50-
"verificationNumber": 3,
51-
"groupSize": 120,
52-
"tileServer": {
53-
"name": "bing",
54-
"credits": "© 2019 Microsoft Corporation, Earthstar Geographics SIO"
55-
},
56-
"projectType": 1
5739
}
5840
}

0 commit comments

Comments
 (0)