Class TreeBasedTrackIndexer

    • Constructor Detail

      • TreeBasedTrackIndexer

        public TreeBasedTrackIndexer​(ArrayList<ISTTrackingTrajectory> regionalList,
                                     int regionDivisor)
                              throws IllegalArgumentException
        Constructor, constructs a new TreeBasedTrackIndexer.
        Parameters:
        regionalList - The list of tracks to index.
        regionDivisor - The divisor used to down size each of the ISTTrackingTrajectory objects to fit inside the spatial domain specified by the regionDimension parameter.
        Throws:
        IllegalArgumentException - When any of the passed in arguments are null, or if the regionDivisor is less than 1.
    • Method Detail

      • getFirstTime

        public org.joda.time.DateTime getFirstTime()
        Description copied from interface: IIndexer
        Gets the earliest start time in the index. That way you can check before you waste time querying the index for objects that don't exist.
        Specified by:
        getFirstTime in interface IIndexer<ISTTrackingTrajectory>
        Returns:
        The earliest start time in the index.
      • getLastTime

        public org.joda.time.DateTime getLastTime()
        Description copied from interface: IIndexer
        Gets the latest end time in the index. That way you can check before you waste time querying the index for objects that don't exist.
        Specified by:
        getLastTime in interface IIndexer<ISTTrackingTrajectory>
        Returns:
        The latest end time in the index.
      • search

        public ArrayList<ISTTrackingTrajectory> search​(org.joda.time.Interval timePeriod,
                                                       org.locationtech.jts.geom.Geometry searchArea)
        Description copied from interface: IIndexer
        Searches the index for any objects that intersect the query time and the query search area. This method is intended to look forward in time for these objects as is done to find the next possible detection for a given detection.
        Specified by:
        search in interface IIndexer<ISTTrackingTrajectory>
        Parameters:
        timePeriod - The time period to query the index with.
        searchArea - The search area to search for intersections with.
        Returns:
        A list of the objects in the index that intersect the query time and the query search area.