Commit 09b8cebb authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade filtro por destino

De esta manera se procesan datos fuera de la zona de canarias, si el
destino es un puerto canario
parent a8f0fbfe
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ public class AISService {
	@Value("${bboxFilter.topLeftLon}")
	private double topLeftLon; // = -21;

	@Value("#{'${destFilter}'.split(',')}")
	private List<String> destFilter;

	Envelope envelopeJts;

	@PostConstruct
@@ -210,7 +213,8 @@ public class AISService {
		aisTemplate.send(AIS_TOPIC, vesselId, aisTracking).addCallback(new SendListener());

		// Si el punto está en la zona de interés
		if (pointInBbox(aisTracking.getLongitude(), aisTracking.getLatitude())) {
		if (destFilter.contains(aisTracking.getDest())
				|| pointInBbox(aisTracking.getLongitude(), aisTracking.getLatitude())) {

			VesselTrackingDTO tracking = VesselTrackingUtil.convertTrackToVesselTracking(aisTracking, QFLAG_DEFAULT,
					VFLAG_DEFAULT, activityId);
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ bboxFilter.bottomRightLon=-10
bboxFilter.topLeftLat=30
bboxFilter.topLeftLon=-21

destFilter=TENERIFE,SANTA CRUZ TENERIFE,LAS PALMAS,S/C TENERIFE,TCI-AGA-TCI,GRANADILLA,PUERTO GRANADILLA,STA CRUZ DE TENERIFE,ES SCT,ESSCT

aishub.service.username=aishub.service.username
aishub.service.url=${aishub.service.url}

+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class AISServiceTest extends KafkaBaseIntegrationTest {
		// @formatter:off

		int numOfItems = 41998, // Debería procesar 41976 pero repite 36 elementos que llegan en el segundo
				numOfItemsInBbox = 86; 
				numOfItemsInBbox = 91; 
		// @formatter:on

		// fichero con el mismo tstamp