Class VectorLayer

VectorLayer class

Represents a vector layer. A vector layer is a collection of geographic features, stored in a file.

public abstract class VectorLayer : FeaturesSequence, IDisposable

Properties

NameDescription
override Attributes { get; }Gets the collection of custom attributes for features in this VectorLayer.
virtual Count { get; }Gets the number of features in this layer.
abstract Driver { get; }Gets the Driver that instantiated this layer.
abstract GeometryType { get; }Gets the type of the geometry for the layer.
virtual Item { get; }Gets the Feature at the specified index.
abstract SpatialReferenceSystem { get; }Gets spatial reference system of this features sequence.

Methods

NameDescription
static Create(AbstractPath, FileDriver)Creates the layer and opens it for adding new features.
static Create(string, FileDriver)Creates the layer and opens it for adding new features.
static Create(AbstractPath, FileDriver, DriverOptions)Creates the layer and opens it for adding new features.
static Create(AbstractPath, FileDriver, SpatialReferenceSystem)Creates the layer and opens it for appending.
static Create(string, FileDriver, DriverOptions)Creates the layer and opens it for adding new features.
static Create(string, FileDriver, SpatialReferenceSystem)Creates the layer and opens it for appending.
static Create(AbstractPath, FileDriver, DriverOptions, SpatialReferenceSystem)Creates the layer and opens it for appending.
static Create(string, FileDriver, DriverOptions, SpatialReferenceSystem)Creates the layer and opens it for appending.
static Open(AbstractPath, FileDriver)Open the layer for reading.
static Open(string, FileDriver)Open the layer for reading.
static Open(AbstractPath, FileDriver, DriverOptions)Open the layer for reading.
static Open(string, FileDriver, DriverOptions)Open the layer for reading.
Add(Feature)Adds a new feature to the layer, if supported by the VectorLayer’s Driver.
virtual Add(Feature, IFeatureStyle)Adds a new feature with the specified style to the layer, if supported by the VectorLayer’s Driver.
AsInMemory()Create a layer clon as the InMemory format.
ConstructFeature()Creates (but does not add to the layer) a new feature with attributes matching the collection of attributes of this layer. When done with setting data for the feature, use Add to add the feature to the layer.
CopyAttributes(FeaturesSequence)Copies attributes of other VectorLayer to this one.
CopyAttributes(FeaturesSequence, IAttributesConverter)Copies attributes of other VectorLayer to this one.
Dispose()Releases the resources used by the VectorLayer.
override Equals(object)Determines whether the specified object is equal to the current object.
abstract GetEnumerator()Returns an enumerator that iterates through the collection.
virtual GetExtent()Gets a spatial extent of this layer.
Join(VectorLayer, JoinOptions)Joins a layer to the current layer.
JoinByGeometry(VectorLayer, JoinByGeometryOptions)Joins a layer to the current layer by geometry.
NearestTo(IPoint)Gets the nearest feature to the provided point.
NearestTo(double, double)Gets the nearest feature to the provided coordinate.
virtual RemoveAt(int)Remove the Feature at the specified index.
virtual ReplaceAt(int, Feature)Replace the Feature at the specified index.
SaveTo(AbstractPath, FileDriver)Saves features sequence to layer.
SaveTo(string, FileDriver)Saves features sequence to layer.
SaveTo(AbstractPath, FileDriver, SavingOptions)Saves features sequence to layer.
SaveTo(string, FileDriver, SavingOptions)Saves features sequence to layer.
SplitTo()Split features by geometry type.
virtual UseAttributesIndex(AbstractPath, string, bool)Loads attribute index to speed up filtering by attributes value in filter methods like WhereGreater. If index does not exist creates it first. Use forceRebuild to force index recreation.
UseAttributesIndex(string, string, bool)Loads attribute index to speed up filtering by attributes value in filter methods like WhereGreater. If index does not exist creates it first. Use forceRebuild to force index recreation.
virtual UseSpatialIndex(AbstractPath, bool)Loads spatial index to speed up filtering by attributes value in filter methods like WhereIntersects and NearestTo. If index does not exist creates it first. Use forceRebuild to force index recreation.
UseSpatialIndex(string, bool)Loads spatial index to speed up filtering by attributes value in filter methods like WhereIntersects and NearestTo. If index does not exist creates it first. Use forceRebuild to force index recreation.
virtual WhereEqual<T>(string, T)Selects features with attribute value equal to the provided value.
virtual WhereGreater<T>(string, T)Selects features with attribute value greater than the provided value.
virtual WhereGreaterOrEqual<T>(string, T)Selects features with attribute value greater or equal to the provided value.
virtual WhereIntersects(Extent)Filters features based on the extent.
WhereIntersects(FeaturesSequence)Filters features based on the union of all geometries in other features sequence.
virtual WhereIntersects(IGeometry)Filters features based on the provided geometry.
virtual WhereNotEqual<T>(string, T)Selects features with attribute value not equal to the provided value.
virtual WhereNotNull(string)Selects features with attribute not equal to null.
virtual WhereNull(string)Selects features with attribute equal to null.
virtual WhereSet(string)Selects features with attribute set.
virtual WhereSmaller<T>(string, T)Selects features with attribute value smaller than the provided value.
virtual WhereSmallerOrEqual<T>(string, T)Selects features with attribute value smaller or equal to the provided value.
virtual WhereUnset(string)Selects features where specified attribute is not set.
static Convert(AbstractPath, FileDriver, AbstractPath, FileDriver)Convert a layer to a different format.
static Convert(string, FileDriver, string, FileDriver)Convert a layer to a different format.
static Convert(AbstractPath, FileDriver, AbstractPath, FileDriver, ConversionOptions)Convert a layer to a different format.
static Convert(string, FileDriver, string, FileDriver, ConversionOptions)Convert a layer to a different format.

See Also