Interface IGeoGridEnvironment<T>
Assembly: Mars.Interfaces.dll
Syntax
public interface IGeoGridEnvironment<T> : IEnvironment<T>, IEnvironment, IModelObject where T : IEntity, IPositionable
Type Parameters
Methods
|
Improve this Doc
View Source
Explore(Double, Double, Double, Int32, Func<T, Boolean>)
Gets all items within an exploration circle around the
longitude
and
latitude
coordinate..
Given the
radius
in meters and an optional
predicate
, all entities within this
range and passing the filter are collected.
Declaration
IEnumerable<T> Explore(double latitude, double longitude, double maxDistanceInM = -1, int maxNumberOfResults = -1, Func<T, bool> predicate = null)
Parameters
Type |
Name |
Description |
System.Double |
latitude |
Latitude of search point |
System.Double |
longitude |
Longitude of search point |
System.Double |
maxDistanceInM |
Maximum distance to search to in meters. |
System.Int32 |
maxNumberOfResults |
Define the maximum results wanted. -1 equals all results found |
System.Func<T, System.Boolean> |
predicate |
An optional predicate. Will be evaluated
for every found item. Only those items returning true, are returned
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
List with found items, empty list if none were found. |
|
Improve this Doc
View Source
GetNearest(Position, Double, Func<T, Boolean>)
Declaration
T GetNearest(Position gpsCoordinate, double maxDistanceInM = -1, Func<T, bool> predicate = null)
Parameters
Type |
Name |
Description |
Position |
gpsCoordinate |
|
System.Double |
maxDistanceInM |
|
System.Func<T, System.Boolean> |
predicate |
|
Returns
|
Improve this Doc
View Source
GetNearest(Double, Double, Double, Func<T, Boolean>)
Declaration
T GetNearest(double latitude, double longitude, double maxDistanceInM = -1, Func<T, bool> predicate = null)
Parameters
Type |
Name |
Description |
System.Double |
latitude |
Latitude of search point |
System.Double |
longitude |
Longitude of search point |
System.Double |
maxDistanceInM |
Maximum distance to search to in meters. |
System.Func<T, System.Boolean> |
predicate |
An optional predicate. Will be evaluated for the found items.
The nearest item returning true will be returned.
|
Returns
Type |
Description |
T |
The nearest item or default(T) if not found |
|
Improve this Doc
View Source
MoveToPosition(T, Double, Double)
Declaration
Position MoveToPosition(T objectToMove, double latitudeDestination, double longitudeDestination)
Parameters
Type |
Name |
Description |
T |
objectToMove |
the object to move |
System.Double |
latitudeDestination |
Latitude of destination |
System.Double |
longitudeDestination |
Longitude of destination |
Returns
Type |
Description |
Position |
The new position to set in the agent. |
Extension Methods