20 package org.sleuthkit.autopsy.geolocation.datamodel;
22 import java.util.ArrayList;
23 import java.util.Collections;
24 import java.util.List;
26 import org.openide.util.NbBundle.Messages;
57 List<BlackboardArtifact> artifacts = null;
59 artifacts = skCase.getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE);
60 }
catch (TskCoreException ex) {
64 List<Route> routes =
new ArrayList<>();
65 for (BlackboardArtifact artifact : artifacts) {
78 points =
new ArrayList<>();
80 Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap =
Waypoint.getAttributesFromArtifactAsMap(artifact);
82 points.add(getRouteEndPoint(artifact, attributeMap));
84 BlackboardAttribute attribute = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME);
85 timestamp = attribute != null ? attribute.getValueLong() : null;
96 return Collections.unmodifiableList(points);
115 "Route_Label=As-the-crow-flies Route"
118 return Bundle.Route_Label();
138 "Route_Start_Label=Start"
142 BlackboardAttribute latitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_START);
143 BlackboardAttribute longitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_START);
144 BlackboardAttribute altitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE);
145 BlackboardAttribute pointTimestamp = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME);
147 if (latitude != null && longitude != null) {
149 Bundle.Route_Start_Label(),
150 pointTimestamp != null ? pointTimestamp.getValueLong() : null,
151 latitude.getValueDouble(),
152 longitude.getValueDouble(),
153 altitude != null ? altitude.getValueDouble() : null,
154 null, attributeMap,
this);
172 "Route_End_Label=End"
174 Waypoint getRouteEndPoint(BlackboardArtifact artifact, Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attributeMap)
throws GeoLocationDataException {
175 BlackboardAttribute latitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_END);
176 BlackboardAttribute longitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END);
177 BlackboardAttribute altitude = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE);
178 BlackboardAttribute pointTimestamp = attributeMap.get(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME);
180 if (latitude != null && longitude != null) {
183 Bundle.Route_End_Label(),
184 pointTimestamp != null ? pointTimestamp.getValueLong() : null,
185 latitude.getValueDouble(),
186 longitude.getValueDouble(),
187 altitude != null ? altitude.getValueDouble() : null,
188 null, attributeMap,
this);
190 throw new GeoLocationDataException(
"Unable to create route end point, invalid longitude and/or latitude");
static List< Route > getRoutes(SleuthkitCase skCase)
List< Waypoint > getRoute()
final List< Waypoint.Property > immutablePropertiesList
final List< Waypoint > points
static List< Waypoint.Property > createGeolocationProperties(Map< BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute > attributeMap)
List< Waypoint.Property > getOtherProperties()
Waypoint getRouteStartPoint(BlackboardArtifact artifact, Map< BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute > attributeMap)