Class VectorLayer<T>
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
IVectorLayer<T>
System.IDisposable
Inherited Members
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 VectorLayer<T> : AbstractEnvelopedLayer, IEnumerable<T>, IEnumerable, IVectorLayer<T>, IVectorLayer, IEnvelopDataLayer, IDataSet, IDisposable, IDataLayer, IChangingLayer, ILayer, IModelObject, INotifyChangedSource<IVectorFeature> where T : IVectorFeature, new()
Type Parameters
Name | Description |
---|---|
T | The concrete type implementing the IVectorFeature contract |
Constructors
| Improve this Doc View SourceVectorLayer()
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
protected VectorLayer()
Properties
| Improve this Doc View SourceExtent
Gets the bounding box of this vector-layer.
Declaration
public override BoundingBox Extent { get; set; }
Property Value
Type | Description |
---|---|
BoundingBox |
Overrides
| Improve this Doc View SourceFeatures
Feature collection of each vector
Declaration
public ICollection<IVectorFeature> Features { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<IVectorFeature> |
Filter
Gets or sets the selector filter function to define domain-specific conditions
to only load only a subset of IMarsFeatures passing this predicate.
Declaration
public Func<IMarsFeature, bool> Filter { get; set; }
Property Value
Type | Description |
---|---|
System.Func<IMarsFeature, System.Boolean> |
Returns true when the feature shall be loaded into the vector,
otherwise its is skipped.
|
IsChanged
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public bool IsChanged { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
NearestOperationPlatform
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public INearestOperation NearestOperationPlatform { get; }
Property Value
Type | Description |
---|---|
INearestOperation |
Methods
| Improve this Doc View SourceExplore(Double[], Double, Func<T, Boolean>)
Executes a point query at the specified position to get all limited order of features
inside the radius in kilometre. Optional it can be filtered by a predicate over attribute table
Declaration
public IEnumerable<T> Explore(double[] position, double radius = -1, Func<T, bool> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | position | The outgoing position (lat, lon) from which to start the query. |
System.Double | radius | The exploration radius in meter or -1 for infinite. |
System.Func<T, System.Boolean> | predicate | The optional predicate to filter out specific features |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | A collection with distance based order of the explored features. |
GetEnumerator()
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> |
InitLayer(LayerInitData, RegisterAgent, UnregisterAgent)
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public virtual bool InitLayer(LayerInitData layerInitData, RegisterAgent registerAgentHandle = null, UnregisterAgent unregisterAgent = null)
Parameters
Type | Name | Description |
---|---|---|
LayerInitData | layerInitData | |
RegisterAgent | registerAgentHandle | |
UnregisterAgent | unregisterAgent |
Returns
Type | Description |
---|---|
System.Boolean |
Insert(IDomainData)
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public T Insert(IDomainData data)
Parameters
Type | Name | Description |
---|---|---|
IDomainData | data |
Returns
Type | Description |
---|---|
T |
Nearest(Double[], Func<T, Boolean>)
Tries to find the nearest domain object for given parameters.
Declaration
public T Nearest(double[] position, Func<T, bool> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | position | The outgoing position (lat, lon) from which to start the query. |
System.Func<T, System.Boolean> | predicate | The optional predicate to filter out specific features |
Returns
Type | Description |
---|---|
T | The found T or null if none could be found. |
Nearest(Double[], Int32, Func<T, Boolean>)
Tries to find the k-nearest domain object for given parameters.
Declaration
public IEnumerable<T> Nearest(double[] position, int k, Func<T, bool> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | position | The outgoing position (lat, lon) from which to start the query. |
System.Int32 | k | The k-limitation of objects to retrieve. |
System.Func<T, System.Boolean> | predicate | The optional predicate to filter out specific features |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | The found T or null if none could be found. |
Read(Double[])
Reads the value .
exactly
at the specified coordinate;
otherwise returns the default
of Declaration
public T Read(double[] position)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | position | The coordinate to read from. |
Returns
Type | Description |
---|---|
T | Returns the data object at the specified coordinate; otherwise null. |
Region(Double[], Double, Func<T, Boolean>)
Finds a randomly selected entity within region, given by the
radius
and position
.
Declaration
public IEnumerable<T> Region(double[] position, double radius, Func<T, bool> predicate = null)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | position | Source position from where to explore. |
System.Double | radius | The maximum distance in to this position (For GIS based data often in meter ). |
System.Func<T, System.Boolean> | predicate | An optional predicate used filter out a specific data object. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Returns true, when any |
Remove(T)
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
public void Remove(T entity)
Parameters
Type | Name | Description |
---|---|---|
T | entity |
SetCurrentTick(Int64)
Sets the current simulation step of the layer.
This will be called by the Executor to
deliver the current logical simulation step into the layer.
Declaration
public virtual void SetCurrentTick(long currentStep)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | currentStep | A positive number |
Events
| Improve this Doc View SourceCollectionChanged
Occurs when items were added, replaced or removed.
Declaration
public event EventHandler<CollectionChangedEventArgs<IVectorFeature>> CollectionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<Mars.Common.Core.Collections.ObservableCollection.CollectionChangedEventArgs<IVectorFeature>> |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Provides a generic vector layer implementation where an input type
T
is expected to represent features
within the layer
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IDisposable