use of eu.europa.ec.fisheries.uvms.docker.validation.movement.LatLong in project UVMS-Docker by UnionVMS.
the class SpatialJmsIT method createSpatialEnrichmentRequestTest.
/**
* Creates the spatial enrichment request test.
*
* @throws Exception the exception
*/
@Test(timeout = 10000)
public void createSpatialEnrichmentRequestTest() throws Exception {
LatLong position = movementHelper.createRutt(1).get(0);
SpatialEnrichmentRQ spatialEnrichmentRQ = new SpatialEnrichmentRQ();
AreaTypes areaTypes = new AreaTypes();
areaTypes.getAreaTypes().add(AreaType.COUNTRY);
areaTypes.getAreaTypes().add(AreaType.PORT);
areaTypes.getAreaTypes().add(AreaType.FMZ);
spatialEnrichmentRQ.setAreaTypes(areaTypes);
LocationTypes locationTypes = new LocationTypes();
locationTypes.getLocationTypes().add(LocationType.PORT);
spatialEnrichmentRQ.setLocationTypes(locationTypes);
spatialEnrichmentRQ.setMethod(SpatialModuleMethod.GET_ENRICHMENT);
spatialEnrichmentRQ.setUnit(UnitType.NAUTICAL_MILES);
PointType pointType = new PointType();
spatialEnrichmentRQ.setPoint(pointType);
pointType.setLatitude(position.latitude);
pointType.setLongitude(position.longitude);
pointType.setCrs(4326);
SpatialEnrichmentRS spatialEnrichmentRS = spatialHelper.createSpatialEnrichment(spatialEnrichmentRQ);
assertNotNull(spatialEnrichmentRS);
}
Aggregations