2424import org .sensorhub .api .feature .FeatureId ;
2525import org .vast .ogc .geopose .Pose ;
2626import org .vast .ogc .geopose .PoseImpl ;
27+ import org .vast .ogc .gml .GMLBuilders ;
2728import org .vast .ogc .gml .IFeature ;
2829import org .vast .sensorML .SMLHelper ;
2930import org .vast .sensorML .SMLMetadataBuilders .CIResponsiblePartyBuilder ;
@@ -121,11 +122,17 @@ static void addResources() throws IOException
121122 .getJson ();
122123
123124 //Api.addOrUpdateObs(navDsId, cgSfId, Instant.parse("2023-09-25T00:00:00Z"), result, true);
124-
125- // add deployment
126- var deploy1 = createDeployment ("2025" , TimeExtent .parse ("2017-07-17T00:00:00Z/2017-09-29T00:00:00Z" ));
127- Api .addOrUpdateDeployment (deploy1 , true );
128125 }
126+
127+ addDeployments ();
128+ }
129+
130+
131+ static void addDeployments () throws IOException
132+ {
133+ // add deployment
134+ var deploy1 = createDeployment ("2025" , TimeExtent .parse ("2017-07-17T00:00:00Z/2017-09-29T00:00:00Z" ));
135+ Api .addOrUpdateDeployment (deploy1 , true );
129136 }
130137
131138
@@ -467,10 +474,27 @@ static IDataStreamInfo createCtdDataStream(AbstractProcess platform, AbstractPro
467474
468475 static Deployment createDeployment (String num , TimeExtent validTime )
469476 {
470- var fac = new GMLFactory ();
471- var geom = fac .newPolygon ();
472-
473- //geom.getExterior().setPosList(null);
477+ var geom = new GMLBuilders ().createPolygon ()
478+ .exterior (
479+ -77.50360200631752 , 38.02943319838295 ,
480+ -67.29305117943943 , 37.63123853466662 ,
481+ -35.5779127920903 , 46.163710997288206 ,
482+ -13.233471413098925 , 51.09823960404833 ,
483+ -0.40690824730884856 , 49.599286176111065 ,
484+ 5.31501281468681 , 55.350226060597834 ,
485+ -10.23505423685964 , 65.89504520511503 ,
486+ 46.797915594611936 , 77.29325637565395 ,
487+ 19.956540677885215 , 82.37102337230422 ,
488+ -20.580256972585005 , 69.32540270488252 ,
489+ -44.882040321164595 , 57.8173172002532 ,
490+ -62.533256002424395 , 75.10099709520935 ,
491+ -75.20519962420502 , 73.55845204009353 ,
492+ -58.520395213924814 , 65.86405325645057 ,
493+ -63.826590160149635 , 61.40189834709315 ,
494+ -54.33831799872459 , 52.6435899140682 ,
495+ -77.50360200631752 , 38.02943319838295
496+ )
497+ .build ();
474498
475499 return sml .createDeployment ()
476500 .uniqueID ("urn:x-osh:saildrone:mission:" + num )
@@ -480,7 +504,8 @@ static Deployment createDeployment(String num, TimeExtent validTime)
480504 .validTimePeriod (
481505 validTime .begin ().atOffset (ZoneOffset .UTC ),
482506 validTime .end ().atOffset (ZoneOffset .UTC ))
483- .location (null )
507+ .location (geom )
508+ .addSystem ("explorer01" , "urn:x-osh:saildrone:1001" , null )
484509 .build ();
485510 }
486511
0 commit comments