• Documentation
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Search Results for

    Show / Hide Table of Contents
    • Mars.Components
      • DependencyRegistrationModelling
    • Mars.Components.Agents
      • AbstractAgent
      • AbstractEntity
      • Agent
    • Mars.Components.Environments
      • AbstractEnvironment
      • AbstractGraphElement
      • AlwaysPassingNodeGuard
      • EntityLane<TEntity>
      • GeoEnvironment
      • GeoHashEnvironment<T>
      • IEnvironmentMediator
      • IModalChoiceResolver
      • PathHeuristics
      • SpatialEdge
      • SpatialGraphEntityExtensions
      • SpatialGraphEnvironment
      • SpatialGraphHelper
      • SpatialHashEnvironment<TEntity>
      • SpatialLane
      • SpatialNode
    • Mars.Components.Environments.Cartesian
      • CartesianEnvironment<TEntity>
      • CollisionEnvironment<TCharacter, TObstacle>
      • CollisionKind
      • ConeExplorationView
      • ExplorationView
      • GeometryFactory
      • ICartesianEnvironment<TEntity>
      • ICharacter
      • ICollidable
      • ICollisionEnvironment<TCharacter, TObstacle>
      • IObstacle
      • IVisible
      • RayExplorationView
      • TrapezoidExploration
      • VisibilityKind
    • Mars.Components.Environments.Cartesian.Routing
      • CartesianRoutingService<TObstacle>
      • GeometryCoordinatesRoutingPointsGenerator
      • HomogenousRoutingPointsGenerator
      • IRoutingPointsGenerator
      • RandomRoutingPointsGenerator
      • SectionalRandomRoutingPointsGenerator
    • Mars.Components.Layers
      • AbstractActiveLayer
      • AbstractDataLayer
      • AbstractLayer
      • AgentSchedulerLayer<TAgent, TLayer>
      • BoundDataSet
      • DisposeBase
      • MatrixRaster
      • QuerySourceLoader
      • Raster
      • Raster<TValue>
      • RasterLayer
      • SchedulerEntry
      • SchedulerLayer
      • VectorFeature
      • VectorLayer
      • VectorLayer<T>
      • VectorLayerHelper
    • Mars.Components.Layers.Temporal
      • IQueryFieldProvider
      • ITemporalObjectCatalog
      • ITemporalObjectIterator
      • TemporalCatalogFeature<TKey>
      • TemporalFeatureKind
      • TemporalMetadataLoader
    • Mars.Components.Services
      • AgentManager
    • Mars.Components.Services.Explorations
      • BoltzmannExploration
      • EpsilonGreedyExploration
      • IExplorationPolicy
      • RouletteWheelExploration
      • TabuSearchExploration
    • Mars.Components.Services.Learning
      • InfiniteQLearning
      • QLearning
      • Sarsa
    • Mars.Components.Services.Planning
      • ActionPlanResult
      • GoapAction
      • GoapAgentStates
      • GoapGoal
      • GoapPlanner
      • GoapStateKey<T>
      • GoapStateProperty
      • GoapStateProperty<TElement>
      • IGoapAction
      • IGoapAgentStates
      • IGoapGoal
      • IGoapPlanner
      • IGoapStateKey
      • StatesCommons
    • Mars.Components.Services.Planning.ActionCommons
      • AllGoalsSatisfiedAction
      • NoGoalReachableAction
    • Mars.Components.Starter
      • Command
      • CommandArgumentContainer
      • CommandParser
      • CommandSet
      • HelpCommand
      • Option
      • OptionContext
      • OptionException
      • OptionSet
      • OptionValueCollection
      • OptionValueType
      • SimulationStarter
    • Mars.Components.Starter.Exceptions
      • SimulationStartupException
    • Mars.Interfaces
      • IModelObject
      • ISimulationContainer
      • ISimulationContext
      • ISimulationModule
      • ISimulationState
      • IStepExecutionContext
      • SimulationContext
      • SimulationContext.WorkflowStateType
      • StepExecutionContext
    • Mars.Interfaces.Agents
      • IAgent
      • IAgent<TLayer>
      • IEntity
      • IMarsDslAgent
      • IModalCapabilitiesAgent
      • ISpatialGraphEntity
      • ITickClient
    • Mars.Interfaces.Annotations
      • ActiveConstructor
      • PropertyDescription
    • Mars.Interfaces.Data
      • AbstractDomainData
      • GeometryData
      • IDomainData
      • IGeometryData
      • IIdentifiableData
      • IMarsFeature
      • IRasterBandData
      • ISource
      • IStringData
      • IStringStructuredData
      • IStructuredData
      • IStructuredDataGeometry
      • IValueData
      • LayerInitData
      • RasterBandData
      • StringDataDto
      • StructuredData
      • VectorStructuredData
    • Mars.Interfaces.Environments
      • BoundingBox
      • DirectionType
      • EdgeExploreResult
      • EdgeStop
      • ExploreDirection
      • GeoPositionExtension
      • HighwayType
      • IEdge<TEdge, TNode>
      • IEntityLane<TEntity>
      • IEnvironment
      • IEnvironment<TEntity>
      • IGeoGridEnvironment<T>
      • IGraphEntity
      • IGraphEnvironment<TEdge, TNode>
      • INode<TEdge, TNode>
      • INodeGuard
      • IPositionable
      • IRoutePlanner
      • ISpatialEdge
      • ISpatialGraphEnvironment
      • ISpatialLane
      • ISpatialNode
      • LaneExploreResult
      • ModalChoice
      • MultimodalRoute
      • NodeIntegrationKind
      • Position
      • Route
      • RouteStop
      • Size
      • SpatialGraphExploreResult
      • SpatialModalityType
      • TrafficLightPhase
    • Mars.Interfaces.Layers
      • FinallySimulationStep
      • IBoundedDataLayer
      • IChangingLayer
      • IDataContainer
      • IDataLayer
      • IDataSet
      • ILayer
      • IMarsDslLayer
      • IModalChoiceConsumer
      • InitSimulationStep
      • INotifyChangedSource<T>
      • IRaster
      • IRaster<TValue>
      • IRasterLayer
      • ISteppedActiveLayer
      • IVectorFeature
      • IVectorLayer
      • IVectorLayer<T>
      • IVectorNode<TEntity>
      • RegisterAgent
      • UnregisterAgent
    • Mars.Interfaces.Model
      • ActiveTypeMapping
      • AgentMapping
      • AgentType
      • ConstructorType
      • ContainsOperator
      • DataContainer
      • DataType
      • EntityMapping
      • EntityType
      • Execution
      • FeatureType
      • Globals
      • IdentifiableElement
      • IndividualMapping
      • Input
      • InputConfiguration
      • LayerMapping
      • LayerType
      • ModelDescription
      • ModelElement
      • ObjectType
      • Output
      • OutputConfiguration
      • OutputFilter
      • OutputKind
      • OutputTargetType
      • ParameterMapping
      • Processing
      • ProcessingConfiguration
      • ProcessingTargetType
      • PropertyType
      • SimulationConfig
      • TimeSpanUnit
      • TimeSpanUnitExtensions
      • TypeElement
      • TypeMapping
    • Mars.Interfaces.Model.Converters
      • CultureConverter
      • SerializationTypeConverter
      • TimeSpanUnitConverter
    • Mars.Interfaces.Model.Exceptions
      • InvalidTypeException
      • MissingTypeException
    • Mars.Interfaces.Model.Options
      • AbstractEndpointOptions
      • AbstractFileOptions
      • AbstractOptions
      • AscOptions
      • CsvOptions
      • GeoJsonOptions
      • MongoOptions
      • MqttOptions
      • PostgresSqlOptions
      • RedisOptions
      • RelationalEndpointOptions
      • SerializationType
      • SocketOutputOptions
      • SpatialGraphOptions
      • SqLiteOptions
      • TripsOptions

    Class RasterLayer

    Represents a generic raster implementation which provides functionality to explore for nearest cells and saved objects, to pass a "metadata.csv" with a file-mapping to enable a time-series dimension and a concurrency control to be used by multiple concurrent threads.
    Inheritance
    System.Object
    DisposeBase
    BoundDataSet
    Raster<System.Double>
    Raster
    MatrixRaster
    RasterLayer
    Implements
    IRasterLayer
    IDataLayer
    IRaster
    IRaster<System.Double>
    IBoundedDataLayer
    IDataSet
    System.IDisposable
    IChangingLayer
    ILayer
    IModelObject
    Inherited Members
    MatrixRaster.DenseMatrix
    MatrixRaster.Count
    MatrixRaster.IsChanged
    MatrixRaster.Item[Position]
    MatrixRaster.Item[Double, Double]
    MatrixRaster.Item[Int32, Int32]
    MatrixRaster.Increase(Int32, Int32, Double)
    MatrixRaster.Increase(Double, Double, Double)
    MatrixRaster.Reduce(Int32, Int32, Double)
    MatrixRaster.Reduce(Double, Double, Double)
    Raster.CalculateStatistics()
    Raster<Double>.Bands
    Raster<Double>.CurrentBand
    Raster<Double>.NumBands
    Raster<Double>.Width
    Raster<Double>.Height
    Raster<Double>.LowerLeft
    Raster<Double>.UpperRight
    Raster<Double>.CellHeight
    Raster<Double>.CellWidth
    Raster<Double>.NoDataValue
    Raster<Double>.Maximum
    Raster<Double>.Mean
    Raster<Double>.Minimum
    Raster<Double>.StartColumn
    Raster<Double>.StartRow
    Raster<Double>.EndColumn
    Raster<Double>.EndRow
    Raster<Double>.ReadBlock(Int32, Int32, Int32, Int32)
    Raster<Double>.WriteBlock(IRaster<Double>, Int32, Int32, Int32, Int32)
    Raster<Double>.IsInRaster(Position)
    Raster<Double>.IsInRaster(Double, Double)
    Raster<Double>.IsInRaster(Int32, Int32)
    Raster<Double>.ConvertToGridCoordinate(Double, Double, Int32)
    BoundDataSet.MinLon
    BoundDataSet.MinLat
    BoundDataSet.MaxLon
    BoundDataSet.MaxLat
    BoundDataSet.Extent
    BoundDataSet.Dispose(Boolean)
    DisposeBase.IsDisposed
    DisposeBase.Dispose()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Mars.Components.Layers
    Assembly: Mars.Components.dll
    Syntax
    public abstract class RasterLayer : MatrixRaster, IRasterLayer, IDataLayer, IRaster, IRaster<double>, IBoundedDataLayer, IDataSet, IDisposable, IChangingLayer, ILayer, IModelObject

    Fields

    Context

    Declaration
    protected ISimulationContext Context
    Field Value
    Type Description
    ISimulationContext

    Properties

    AllowDiagonalMove

    Indicates if the path contains diagonal movement. If false, then only Manhattan movement is permitted.
    Declaration
    protected bool AllowDiagonalMove { get; set; }
    Property Value
    Type Description
    System.Boolean

    DistanceMetric

    Defines the heuristic metric for exploration
    Declaration
    protected IMetric<double[]> DistanceMetric { get; set; }
    Property Value
    Type Description
    IMetric<System.Double[]>

    Mapping

    Gets the input mapping for this vector-layer.
    Declaration
    public LayerMapping Mapping { get; }
    Property Value
    Type Description
    LayerMapping

    Methods

    Explore(Position, Double, Int32, Func<Double, Boolean>)

    Executes a point query at the specified position to get all features inside radius, filtered by an optional predicate and limited
    Declaration
    public ICollection<NodeDistance<K2dTreeNode<double>>> Explore(Position position, double radius = -1, int count = -1, Func<double, bool> predicate = null)
    Parameters
    Type Name Description
    Position position The outgoing position from which to start the query.
    System.Double radius The exploration radius.
    System.Int32 count The limit of queried features
    System.Func<System.Double, System.Boolean> predicate The optional predicate to filter out specific features
    Returns
    Type Description
    System.Collections.Generic.ICollection<NodeDistance<K2dTreeNode<System.Double>>> A collection with distance based order of the explored features.

    FindPath(Position, Position)

    Tries to find a route from a start cell to a goal cell.
    Declaration
    public List<Position> FindPath(Position start, Position goal)
    Parameters
    Type Name Description
    Position start Position that identifies the starting cell
    Position goal Position that identifies the ending cell
    Returns
    Type Description
    System.Collections.Generic.List<Position> A list of positions that describe the path from start to end; an empty list of no path could be found

    FindPath(Int32, Int32, Int32, Int32)

    Tries to find a route from a start cell to a goal cell.
    Declaration
    public List<Position> FindPath(int startX, int startY, int goalX, int goalY)
    Parameters
    Type Name Description
    System.Int32 startX Describes the x coordinate of the starting cell.
    System.Int32 startY Describes the y coordinate of the starting cell.
    System.Int32 goalX Describes the x coordinate of the ending cell.
    System.Int32 goalY Describes the y coordinate of the ending cell.
    Returns
    Type Description
    System.Collections.Generic.List<Position> A list of positions that describe the path from start to end; an empty list of no path could be found

    GetCurrentTick()

    Declaration
    public override long GetCurrentTick()
    Returns
    Type Description
    System.Int64
    Overrides
    MatrixRaster.GetCurrentTick()

    GetNeighbourCellWithMaxValue(Position)

    Declaration
    [Obsolete("This method should not be used anymore. Please use Explore(..) instead")]
    public Position GetNeighbourCellWithMaxValue(Position coordinate)
    Parameters
    Type Name Description
    Position coordinate
    Returns
    Type Description
    Position

    GetValue(Position)

    Declaration
    public double GetValue(Position coordinate)
    Parameters
    Type Name Description
    Position coordinate
    Returns
    Type Description
    System.Double

    GetValueByGeoPosition(Position)

    Declaration
    public double GetValueByGeoPosition(Position coordinate)
    Parameters
    Type Name Description
    Position coordinate
    Returns
    Type Description
    System.Double

    GetValueByGridPosition(Position)

    Declaration
    public double GetValueByGridPosition(Position coordinate)
    Parameters
    Type Name Description
    Position coordinate
    Returns
    Type Description
    System.Double

    InitLayer(LayerInitData, RegisterAgent, UnregisterAgent)

    Declaration
    public override bool InitLayer(LayerInitData layerInitData, RegisterAgent registerAgentHandle, UnregisterAgent unregisterAgent)
    Parameters
    Type Name Description
    LayerInitData layerInitData
    RegisterAgent registerAgentHandle
    UnregisterAgent unregisterAgent
    Returns
    Type Description
    System.Boolean
    Overrides
    MatrixRaster.InitLayer(LayerInitData, RegisterAgent, UnregisterAgent)

    IsRoutable(Position)

    Indicates if a cell is routable, so can be used for movement, or not. This is the overload for usability purposes: the logic is defined in
    IsRoutable(int, int)
    .
    Declaration
    public bool IsRoutable(Position cellPosition)
    Parameters
    Type Name Description
    Position cellPosition Identifies the cell by index.
    Returns
    Type Description
    System.Boolean True, if routing is possible on this cell, false otherwise

    IsRoutable(Double, Double)

    Indicates if a cell is routable, so can be used for movement, or not. This is the overload for usability purposes: the logic is defined in
    IsRoutable(int, int)
    .
    Declaration
    public bool IsRoutable(double x, double y)
    Parameters
    Type Name Description
    System.Double x Identifies the cell on the x-axis.
    System.Double y Identifies the cell on the y-axis.
    Returns
    Type Description
    System.Boolean True, if routing is possible on this cell, false otherwise

    IsRoutable(Int32, Int32)

    Indicates if a cell is routable, so can be used for movement, or not.
    Declaration
    public virtual bool IsRoutable(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x Identifies the cell on the x-axis.
    System.Int32 y Identifies the cell on the y-axis.
    Returns
    Type Description
    System.Boolean True, if routing is possible on this cell, false otherwise

    ParseData(String)

    Declaration
    protected void ParseData(string file)
    Parameters
    Type Name Description
    System.String file

    SerializeValueCells()

    Declaration
    public IEnumerable<string> SerializeValueCells()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    SetCurrentTick(Int64)

    Declaration
    public override void SetCurrentTick(long currentTick)
    Parameters
    Type Name Description
    System.Int64 currentTick
    Overrides
    MatrixRaster.SetCurrentTick(Int64)

    Implements

    IRasterLayer
    IDataLayer
    IRaster
    IRaster<TValue>
    IBoundedDataLayer
    IDataSet
    System.IDisposable
    IChangingLayer
    ILayer
    IModelObject
    In This Article
    Back to top © 2022 MARS GROUP