@@ -134,7 +134,14 @@ class ParatooProtocolConfigSpec extends Specification {
134
134
then :
135
135
config. getStartDate(observation) == " 2022-09-21T01:55:44Z"
136
136
config. getEndDate(observation) == " 2022-09-21T01:55:44Z"
137
- config. getGeoJson(observation) == [type : " Feature" , geometry : [type : " Polygon" , coordinates : [[[152.880694 , -27.388252 ], [152.880651 , -27.388336 ], [152.880518 , -27.388483 ], [152.880389 , -27.388611 ], [152.88028 , -27.388749 ], [152.880154 , -27.388903 ], [152.880835 , -27.389463 ], [152.880644 , -27.389366 ], [152.880525 , -27.389248 ], [152.88035 , -27.389158 ], [152.880195 , -27.389021 ], [152.880195 , -27.389373 ], [152.880797 , -27.388316 ], [152.881448 , -27.388909 ], [152.881503 , -27.388821 ], [152.881422 , -27.388766 ], [152.881263 , -27.388644 ], [152.881107 , -27.388549 ], [152.880939 , -27.388445 ], [152.881314 , -27.389035 ], [152.88122 , -27.389208 ], [152.881089 , -27.389343 ], [152.880973 , -27.389472 ], [152.880916 , -27.389553 ], [152.880694 , -27.388252 ]]]], properties : [name : " QDASEQ0001 - Control (100 x 100)" , externalId : 1 , description : " QDASEQ0001 - Control (100 x 100)" , notes : " some comment" ]]
137
+ config. getGeoJson(observation) == [
138
+ type : " Feature" ,
139
+ geometry : [
140
+ type : " Polygon" ,
141
+ coordinates : [[[152.880694 , -27.388252 ], [152.880651 , -27.388336 ], [152.880518 , -27.388483 ], [152.880389 , -27.388611 ], [152.88028 , -27.388749 ], [152.880154 , -27.388903 ], [152.880835 , -27.389463 ], [152.880644 , -27.389366 ], [152.880525 , -27.389248 ], [152.88035 , -27.389158 ], [152.880195 , -27.389021 ], [152.880195 , -27.389373 ], [152.880797 , -27.388316 ], [152.881448 , -27.388909 ], [152.881503 , -27.388821 ], [152.881422 , -27.388766 ], [152.881263 , -27.388644 ], [152.881107 , -27.388549 ], [152.880939 , -27.388445 ], [152.881314 , -27.389035 ], [152.88122 , -27.389208 ], [152.881089 , -27.389343 ], [152.880973 , -27.389472 ], [152.880916 , -27.389553 ], [152.880694 , -27.388252 ]]]
142
+ ],
143
+ properties : [name : " QDASEQ0001 - Control (100 x 100)" , externalId : " 1" , description : " QDASEQ0001 - Control (100 x 100)" , notes : " Core monitoring plot some comment" ]
144
+ ]
138
145
}
139
146
140
147
def " The basal-area-dbh-measure-survey can be used with this config" () {
@@ -184,20 +191,72 @@ class ParatooProtocolConfigSpec extends Specification {
184
191
config. getStartDate(observation) == " 2023-09-22T00:59:47Z"
185
192
config. getEndDate(observation) == " 2023-09-23T00:59:47Z"
186
193
config. getGeoJson(observation) == [
187
- type : " Feature" ,
188
- geometry : [
189
- type : " Polygon" ,
190
- coordinates: [[[138.63720760798054, -34.97222197296049], [138.63720760798054, -34.97204230990367], [138.63720760798054, -34.971862646846844], [138.63720760798054, -34.97168298379002], [138.63720760798054, -34.9715033207332], [138.63720760798054, -34.971413489204785], [138.63731723494544, -34.971413489204785], [138.6375364888752, -34.971413489204785], [138.63775574280498, -34.971413489204785], [138.63797499673475, -34.971413489204785], [138.63819425066453, -34.971413489204785], [138.63830387762943, -34.971413489204785], [138.63830387762943, -34.9715033207332], [138.63830387762943, -34.97168298379002], [138.63830387762943, -34.971862646846844], [138.63830387762943, -34.97204230990367], [138.63830387762943, -34.97222197296049], [138.63830387762943, -34.9723118044889], [138.63819425066453, -34.9723118044889], [138.63797499673475, -34.9723118044889], [138.63775574280498, -34.9723118044889], [138.6375364888752, -34.9723118044889], [138.63731723494544, -34.9723118044889], [138.63720760798054, -34.9723118044889], [138.63720760798054, -34.97222197296049]]]],
191
- properties : [" name" : " SATFLB0001 - Control (100 x 100)" , externalId : 2 , description : " SATFLB0001 - Control (100 x 100)" , notes : " some comment" ]
194
+ type :" Feature" ,
195
+ geometry :[
196
+ coordinates :[[[138.6372 , -34.9723 ], [138.6371 , -34.9723 ], [138.6371 , -34.9714 ], [138.6382 , -34.9714 ], [138.6383 , -34.9714 ], [138.6383 , -34.9723 ], [138.6372 , -34.9723 ]]],
197
+ type :" Polygon"
198
+ ],
199
+ properties :[name :" SATFLB0001 - Control (100 x 100)" , externalId :" 2" , notes :" Core monitoring plot some comment" , description :" SATFLB0001 - Control (100 x 100) (convex hull of all features)" ],
200
+ features :[
201
+ [
202
+ type :" Feature" ,
203
+ geometry :[
204
+ type :" Polygon" ,
205
+ coordinates:[[[138.63720760798054, -34.97222197296049], [138.63720760798054, -34.97204230990367], [138.63720760798054, -34.971862646846844], [138.63720760798054, -34.97168298379002], [138.63720760798054, -34.9715033207332], [138.63720760798054, -34.971413489204785], [138.63731723494544, -34.971413489204785], [138.6375364888752, -34.971413489204785], [138.63775574280498, -34.971413489204785], [138.63797499673475, -34.971413489204785], [138.63819425066453, -34.971413489204785], [138.63830387762943, -34.971413489204785], [138.63830387762943, -34.9715033207332], [138.63830387762943, -34.97168298379002], [138.63830387762943, -34.971862646846844], [138.63830387762943, -34.97204230990367], [138.63830387762943, -34.97222197296049], [138.63830387762943, -34.9723118044889], [138.63819425066453, -34.9723118044889], [138.63797499673475, -34.9723118044889], [138.63775574280498, -34.9723118044889], [138.6375364888752, -34.9723118044889], [138.63731723494544, -34.9723118044889], [138.63720760798054, -34.9723118044889], [138.63720760798054, -34.97222197296049]]]
206
+ ],
207
+ properties :[name :" SATFLB0001 - Control (100 x 100)" , externalId :" 2" , description :" SATFLB0001 - Control (100 x 100)" , notes :" Core monitoring plot some comment" ]],
208
+ [
209
+ type :" Feature" ,
210
+ geometry :[
211
+ type :" Polygon" ,
212
+ coordinates :[[[138.6371026907952 , -34.971403261821905 ], [138.63709732396242 , -34.972304399720215 ], [138.6381916652405 , -34.972304399720215 ], [138.63819166764344 , -34.9714076576406 ], [138.6371026907952 , -34.971403261821905 ]]]
213
+ ],
214
+ properties :[
215
+ name :" SATFLB0001 - Control (100 x 100)" , externalId :" 2" , description :" SATFLB0001 - Control (100 x 100)" , notes :" Fauna plot some comment"
216
+ ]
217
+ ]
218
+ ]
192
219
]
193
- config. getGeoJson(observation, activityForm). features == [[
194
- type : " Feature" ,
195
- geometry : [
196
- type : " Point" ,
197
- coordinates : [149.0651491 , -35.2592444 ]
220
+ config. getGeoJson(observation, activityForm). features == [
221
+ [
222
+ type :" Feature" ,
223
+ geometry :[
224
+ type :" Point" ,
225
+ coordinates :[149.0651491 , -35.2592444 ]
226
+ ],
227
+ properties :[
228
+ name :" Point aParatooForm 2-1" ,
229
+ externalId :37 ,
230
+ id :" aParatooForm 2-1"
231
+ ]
198
232
],
199
- properties : [" name" : " Point aParatooForm 2-1" , externalId : 37 , id : " aParatooForm 2-1" ]
200
- ]]
233
+ [
234
+ type :" Feature" ,
235
+ geometry :[
236
+ type :" Polygon" ,
237
+ coordinates:[[[138.63720760798054, -34.97222197296049], [138.63720760798054, -34.97204230990367], [138.63720760798054, -34.971862646846844], [138.63720760798054, -34.97168298379002], [138.63720760798054, -34.9715033207332], [138.63720760798054, -34.971413489204785], [138.63731723494544, -34.971413489204785], [138.6375364888752, -34.971413489204785], [138.63775574280498, -34.971413489204785], [138.63797499673475, -34.971413489204785], [138.63819425066453, -34.971413489204785], [138.63830387762943, -34.971413489204785], [138.63830387762943, -34.9715033207332], [138.63830387762943, -34.97168298379002], [138.63830387762943, -34.971862646846844], [138.63830387762943, -34.97204230990367], [138.63830387762943, -34.97222197296049], [138.63830387762943, -34.9723118044889], [138.63819425066453, -34.9723118044889], [138.63797499673475, -34.9723118044889], [138.63775574280498, -34.9723118044889], [138.6375364888752, -34.9723118044889], [138.63731723494544, -34.9723118044889], [138.63720760798054, -34.9723118044889], [138.63720760798054, -34.97222197296049]]]
238
+ ],
239
+ properties :[
240
+ name :" SATFLB0001 - Control (100 x 100)" ,
241
+ externalId :" 2" ,
242
+ description :" SATFLB0001 - Control (100 x 100)" ,
243
+ notes :" Core monitoring plot some comment"
244
+ ]
245
+ ],
246
+ [
247
+ type :" Feature" ,
248
+ geometry :[
249
+ type :" Polygon" ,
250
+ coordinates :[[[138.6371026907952 , -34.971403261821905 ], [138.63709732396242 , -34.972304399720215 ], [138.6381916652405 , -34.972304399720215 ], [138.63819166764344 , -34.9714076576406 ], [138.6371026907952 , -34.971403261821905 ]]]
251
+ ],
252
+ properties :[
253
+ name :" SATFLB0001 - Control (100 x 100)" ,
254
+ externalId :" 2" ,
255
+ description :" SATFLB0001 - Control (100 x 100)" ,
256
+ notes :" Fauna plot some comment"
257
+ ]
258
+ ]
259
+ ]
201
260
}
202
261
203
262
def " The observations from opportunistic-survey can be filtered" () {
@@ -265,7 +324,9 @@ class ParatooProtocolConfigSpec extends Specification {
265
324
features : [[type : " Feature" , geometry : [type : " Point" , coordinates : [138.63 , -35.0005 ]], properties :[name :" Point aParatooForm 1-1" , externalId :40 , id :" aParatooForm 1-1" ]]],
266
325
properties : [
267
326
name : " aParatooForm 1 site - ${ startDateInDefaultTimeZone} " ,
268
- description : " aParatooForm 1 site - ${ startDateInDefaultTimeZone} (convex hull of all features)"
327
+ description : " aParatooForm 1 site - ${ startDateInDefaultTimeZone} (convex hull of all features)" ,
328
+ externalId : " " ,
329
+ notes : " " ,
269
330
]
270
331
]
271
332
}
@@ -281,7 +342,7 @@ class ParatooProtocolConfigSpec extends Specification {
281
342
]
282
343
283
344
when :
284
- result = ParatooProtocolConfig . createLineStringFeatureFromGeoJSON([[lat : 1 , lng : 2 ], [lat : 3 , lng : 4 ], [lat : 5 , lng : 6 ]], " test name" , 1 , " test notes" )
345
+ result = ParatooProtocolConfig . createLineStringFeatureFromGeoJSON([[lat : 1 , lng : 2 ], [lat : 3 , lng : 4 ], [lat : 5 , lng : 6 ]], " test name" , " 1 " , " test notes" )
285
346
286
347
then :
287
348
result == [
@@ -292,7 +353,7 @@ class ParatooProtocolConfigSpec extends Specification {
292
353
],
293
354
" properties" : [
294
355
" name" : " test name" ,
295
- " externalId" : 1 ,
356
+ " externalId" : " 1 " ,
296
357
" description" : " test name" ,
297
358
" notes" : " test notes"
298
359
]
0 commit comments