public static interface

CoreApi.Utilities

com.mapsted.positioning.CoreApi.Utilities

Class Overview

Utilities for various common functions

Summary

Public Methods
abstract List<? extends ISearchable> filterAndSortSearchables(String input, List<? extends ISearchable> fullList)
Filter and Sort searchable list based on an input string.
abstract IZone findPropertyAndBuilding(IPoint point)
Returns a Zone object with property and building populated (if possible).
abstract double getDistFromPointToPolygon(IPoint point, MercatorVector polygon)
Get distance between a IPoint to a MercatorVector
abstract double getDistance(LatLng l1, LatLng l2)
Get distance between two LatLng points.
abstract double getDistance(IMercator m1, IMercator m2)
Get distance between two IMercator points.
abstract double getTimestampMs()
Get the current internal timestamp in ms.
abstract boolean isPointInPolygon(IPoint point, MercatorVector polygon)
Determines if a point is located within the polygon
abstract boolean isPointWithinFloorBoundary(IPoint point, int floorId)
Checks if the given point is within the boundaries of the floor id.

Public Methods

public abstract List<? extends ISearchable> filterAndSortSearchables (String input, List<? extends ISearchable> fullList)

Filter and Sort searchable list based on an input string.

Parameters
input Inputted string by the user
fullList List to filter/sort
Returns
  • filtered and sorted result
See Also

public abstract IZone findPropertyAndBuilding (IPoint point)

Returns a Zone object with property and building populated (if possible). Note that floorId will not be populated.

public abstract double getDistFromPointToPolygon (IPoint point, MercatorVector polygon)

Get distance between a IPoint to a MercatorVector

Parameters
point Origin point. See IPoint
polygon Destination point. See MercatorVector
Returns
  • The distance from the point to the polygon

public abstract double getDistance (LatLng l1, LatLng l2)

Get distance between two LatLng points.

Parameters
l1 First location in latitude and longitude. See LatLng
l2 Second location in latitude and longitude. See LatLng
Returns
  • Distance between two points in meters.

public abstract double getDistance (IMercator m1, IMercator m2)

Get distance between two IMercator points.

Parameters
m1 First mercator point. See IMercator
m2 Second mercator point. See IMercator
Returns
  • Distance between two points in meters.

public abstract double getTimestampMs ()

Get the current internal timestamp in ms.

Returns
  • Timestamp in ms

public abstract boolean isPointInPolygon (IPoint point, MercatorVector polygon)

Determines if a point is located within the polygon

Parameters
point point to consider
polygon polygon to consider
Returns
  • whether or not the point is inside the polygon

public abstract boolean isPointWithinFloorBoundary (IPoint point, int floorId)

Checks if the given point is within the boundaries of the floor id.