Skip to content

Feature

Namespace: ThinkGeo.Core

The class Feature is the basic unit of which a FeatureSource is composed. A FeatureSource can be taken from a collection of Features stored in a ShapeFile, SQL Server 2008, Oracle, etc. A Feature is the basic data unit structure which is comprised of IDs that mark the identification of the Feature, a shape and a collection of data.

public class Feature

Inheritance Object → Feature

Properties

Id

This property gets the Id for the Feature.

public string Id { get; set; }

Property Value

String

Remarks:

The Id is a string that represents the unique identifier for this Feature. If the feature is returned from a FeatureSource, the Id will be the unique field descriptor used by the FeatureSource. For Shape Files this may be an integer, but for spatial databases the Id may be a GUID.

Tag

The tag of the Feature.

public object Tag { get; set; }

Property Value

Object

ColumnValues

This property gets a dictionary of values to represent the column data related to this Feature.

public Dictionary<string, string> ColumnValues { get; }

Property Value

Dictionary<String, String>

Remarks:

This property holds the column data related to this Feature. You can find the values in the dictionary using the column name as the key. Most methods that query and return InternalFeatures allow you to specify which columns of data you want returned with the results. You can also freely add and modify the data, as it is simply an in-memory dictionary. Any values added, deleted or updated will have no effect unless the Feature is part of a transaction.

Constructors

Feature()

Initializes a new instance of the Feature class.

public Feature()

Feature(BaseShape)

This method is the constructor for the Feature.

public Feature(BaseShape baseShape)

Parameters

baseShape BaseShape
This parameter represents the base shape you wish to use as the basis of the new Feature.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape that has no points, it will throw an InvalidOperationException.

Remarks:

When you create the Feature, specify the ID of the BaseShape you want to use as a basis.

Feature(Byte[])

This method is the constructor for the Feature.

public Feature(Byte[] wellKnownBinary)

Parameters

wellKnownBinary Byte[]
This parameter is the well-known binary used to create the feature.

Remarks:

This overload allows you to create a feature using well-known binary. The Id for this Feature will be a random GUID.

Feature(Byte[], String)

This method is the constructor for the Feature.

public Feature(Byte[] wellKnownBinary, string id)

Parameters

wellKnownBinary Byte[]
This parameter is the well-known binary used to create the Feature.

id String
This parameter is the Id used for the Feature.

Remarks:

Feature(String)

This method is the constructor for the Feature.

public Feature(string wellKnownText)

Parameters

wellKnownText String
This parameter is the well-known text used to create the Feature.

Remarks:

This overload allows you to create a feature using well-known text. The Id for the Feature will be a random GUID.

Feature(String, String)

This method is the constructor for the Feature.

public Feature(string wellKnownText, string id)

Parameters

wellKnownText String
This parameter is the well-known text used to create the Feature.

id String
This parameter is the Id used in the Feature.

Remarks:

Feature(BaseShape, IDictionary<String, String>)

This method is the constructor for the Feature.

public Feature(BaseShape baseShape, IDictionary<string, string> columnValues)

Parameters

baseShape BaseShape
This parameter is the baseShape used to create the Feature.

columnValues IDictionary<String, String>
This parameter is the columnValues used in the Feature.

Remarks:

Feature(BaseShape, IEnumerable<String>)

Initializes a new instance of the Feature class.

public Feature(BaseShape baseShape, IEnumerable<string> columnValues)

Parameters

baseShape BaseShape

columnValues IEnumerable<String>

Feature(String, String, IDictionary<String, String>)

This method is the constructor for the Feature.

public Feature(string wellKnownText, string id, IDictionary<string, string> columnValues)

Parameters

wellKnownText String
This parameter is the well-known text used to create the Feature.

id String
This parameter is the Id used in the Feature.

columnValues IDictionary<String, String>
This parameter is the columnValues used in the Feature.

Remarks:

Feature(String, String, IEnumerable<String>)

Initializes a new instance of the Feature class.

public Feature(string wellKnownText, string id, IEnumerable<string> columnValues)

Parameters

wellKnownText String

id String

columnValues IEnumerable<String>

Feature(Byte[], String, IEnumerable<String>)

This method is the constructor for the Feature.

public Feature(Byte[] wellKnownBinary, string id, IEnumerable<string> columnValues)

Parameters

wellKnownBinary Byte[]
This parameter is the well-known binary used to create the Feature.

id String
This parameter is the Id used in the Feature.

columnValues IEnumerable<String>
This parameter is the columnValues used in the Feature.

Remarks:

Feature(Byte[], String, IDictionary<String, String>)

This method is the constructor for the Feature.

public Feature(Byte[] wellKnownBinary, string id, IDictionary<string, string> columnValues)

Parameters

wellKnownBinary Byte[]
This parameter is the well-known binary used to create the Feature.

id String
This parameter is the Id used in the Feature.

columnValues IDictionary<String, String>
This parameter is the columnValues used in the Feature.

Remarks:

Feature(Vertex)

This method is the constructor for the Feature.

public Feature(Vertex vertex)

Parameters

vertex Vertex
This parameter is the x & y decimalDegreesValue pair used to make the point. The Id for the Feature will be a random GUID.

Remarks:

You can use this constructor to create a point Feature easily.

Feature(Vertex, String)

This method is the constructor for the Feature.

public Feature(Vertex vertex, string id)

Parameters

vertex Vertex
This parameter is the x & y decimalDegreesValue pair used to make the point. The Id for the Feature will be the value you pass in through the id parameter.

id String
This parameter is the Id used in the Feature.

Remarks:

You can use this constructor to create a point Feature and specify the Id.

Feature(Vertex, String, IEnumerable<String>)

This method is the constructor for the Feature.

public Feature(Vertex vertex, string id, IEnumerable<string> columnValues)

Parameters

vertex Vertex
This parameter is the x & y decimalDegreesValue pair used to make the point. The Id for the Feature will be the value you pass in through the id parameter.

id String
This parameter is the Id used in the Feature.

columnValues IEnumerable<String>
This parameter is the columnValues used in the Feature.

Remarks:

You can use this constructor to create a point Feature and specify the Id as well as the column values.

Feature(Vertex, String, IDictionary<String, String>)

Initializes a new instance of the Feature class.

public Feature(Vertex vertex, string id, IDictionary<string, string> columnValues)

Parameters

vertex Vertex

id String

columnValues IDictionary<String, String>

Feature(Double, Double)

This method is the constructor for the Feature.

public Feature(double x, double y)

Parameters

x Double
This parameter is the x decimalDegreesValue pair used to make the point. The Id for the Feature will be a random GUID.

y Double
This parameter is the y decimalDegreesValue pair used to make the point. The Id for the

Remarks:

You can use this constructor to create a point Feature based on x and y coordinates.

Feature(Double, Double, String)

This method is the constructor for the Feature.

public Feature(double x, double y, string id)

Parameters

x Double
This parameter is the x decimalDegreesValue pair used to make the point.

y Double
This parameter is the y decimalDegreesValue pair used to make the point.

id String
This parameter is the Id used in the Feature.

Remarks:

You can use this constructor to create a point Feature based on x and y coordinates and specify the Id.

Feature(Double, Double, String, IEnumerable<String>)

This method is the constructor for the Feature.

public Feature(double x, double y, string id, IEnumerable<string> columnValues)

Parameters

x Double
This parameter is the x decimalDegreesValue pair used to make the point.

y Double
This parameter is the y decimalDegreesValue pair used to make the point.

id String
This parameter is the Id used in the Feature.

columnValues IEnumerable<String>
This parameter is the columnValues used in the Feature. Each string

Remarks:

You can use this constructor to create a point Feature based on x and y coordinates and specify both the Id and the column values.

Feature(Double, Double, String, IDictionary<String, String>)

Initializes a new instance of the Feature class.

public Feature(double x, double y, string id, IDictionary<string, string> columnValues)

Parameters

x Double

y Double

id String

columnValues IDictionary<String, String>

Methods

GetWellKnownBinary()

This method returns the well-known binary that represents the Feature.

public Byte[] GetWellKnownBinary()

Returns

Byte[]
This method returns the well-known binary that represents the Feature.

Remarks:

This will return a copy of the well-known binary that represents the Feature.

GetWellKnownBinary(WkbByteOrder)

Returns well known binary for .

public Byte[] GetWellKnownBinary(WkbByteOrder byteOrder)

Parameters

byteOrder WkbByteOrder
The byte order.

Returns

Byte[]
An array containing the requested values.

GetWellKnownBinary(RingOrder)

Returns well known binary for .

public Byte[] GetWellKnownBinary(RingOrder outerRingOrder)

Parameters

outerRingOrder RingOrder
The outer ring order.

Returns

Byte[]
An array containing the requested values.

GetWellKnownBinary(RingOrder, WkbByteOrder)

Returns well known binary for the specified parameters.

public Byte[] GetWellKnownBinary(RingOrder outerRingOrder, WkbByteOrder byteOrder)

Parameters

outerRingOrder RingOrder
The outer ring order.

byteOrder WkbByteOrder
The byte order.

Returns

Byte[]
An array containing the requested values.

GetWellKnownBinaryCore(RingOrder, WkbByteOrder)

This method returns a byte array that represents the feature in well-known binary.

protected Byte[] GetWellKnownBinaryCore(RingOrder outerRingOrder, WkbByteOrder byteOrder)

Parameters

outerRingOrder RingOrder
Specifies the outerRingOrder.

byteOrder WkbByteOrder
This parameter specifies if the byte order is big- or little-endian.

Returns

Byte[]

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentOutOfRangeException
If you pass in a ByteOrder that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

Remarks:

This method returns a byte array that represents the feature in well-known binary. Well-known binary allows you to describe geometries as a binary array. Well-known binary is useful when you want to save a geometry in an efficient format using as little space as possible. An alternative to well-known binary is well-known text, which is a textual representation of a geometry object. We have methods that work with well known text as well.

Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.

ToString()

Returns a string that represents the current instance.

public string ToString()

Returns

String
A string result.

GetWellKnownType()

This method returns the well known type that represents the Feature.

public WellKnownType GetWellKnownType()

Returns

WellKnownType
This method returns the well known type that represents the Feature.

Remarks:

None

GetWellKnownTypeCore()

Provides the overridable implementation that returns well known type.

protected WellKnownType GetWellKnownTypeCore()

Returns

WellKnownType
The result of the operation.

GetShape()

This method returns the shape class that represents the Feature.

public BaseShape GetShape()

Returns

BaseShape
This method returns the shape class that represents the Feature.

Remarks:

This method allows you to get a shape class from a Feature. Because the Feature stores the geometry for itself in well-known binary, it may take some time to generate a shape class if the geometry is complex.

GetWellKnownText()

This method returns the well-known text that represents the Feature.

public string GetWellKnownText()

Returns

String
This method returns the well-known text that represents the Feature.

Remarks:

This method allows you to get the well-known text from a Feature. Because the Feature stores the geometry for itself in well-known binary, it may take some time to generate the text if the geometry is complex.

GetWellKnownText(RingOrder)

This method returns the well-known text representation of this feature.

public string GetWellKnownText(RingOrder outerRingOrder)

Parameters

outerRingOrder RingOrder

Returns

String
This method returns a string that represents the shape in well-known text.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

Remarks:

This method returns a stringthat represents the shape in well-known text. Well-known text allows you to describe geometries as a string of text. Well-known text is useful when you want to save a geometry in a format such as a text file, or when you simply want to cut and paste the text between other applications. An alternative to well-known text is well-known binary, which is a binary representation of a geometry object. We have methods that work with well-known binary as well. Below are some samples of what well-known text might look like for various kinds of geometries. POINT(5 17) LINESTRING(4 5,10 50,25 80) POLYGON((2 2,6 2,6 6,2 6,2 2),(3 3,4 3,4 4,3 4,3 3)) MULTIPOINT(3.7 9.7,4.9 11.6) MULTILINESTRING((4 5,11 51,21 26),(-4 -7,-9 -7,-14 -3)) MULTIPOLYGON(((2 2,6 2,6 6,2 6,2 2),(3 3,4 3,4 4,3 4,3 3)),((4 4,7 3,7 5,4 4)))

Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.

GetWellKnownTextCore(RingOrder)

Provides the overridable implementation that returns well known text for .

protected string GetWellKnownTextCore(RingOrder outerRingOrder)

Parameters

outerRingOrder RingOrder
The outer ring order.

Returns

String
A string result.

GetGeoJson()

Returns geo JSON.

public string GetGeoJson()

Returns

String
A string result.

GetGeoJsonCore()

Provides the overridable implementation that returns geo JSON.

protected string GetGeoJsonCore()

Returns

String
A string result.

CreateFeatureFromGeoJson(String)

Creates feature from geo JSON.

public static Feature CreateFeatureFromGeoJson(string geoJson)

Parameters

geoJson String
The geo JSON.

Returns

Feature
The result of the operation.

CreateFeaturesFromGeoJson(String)

Creates features from geo JSON.

public static Collection<Feature> CreateFeaturesFromGeoJson(string geoJson)

Parameters

geoJson String
The geo JSON.

Returns

Collection<Feature>
The result of the operation.

CreateFeatureFromWellKnownData(Byte[])

Creates feature from well known data.

public static Feature CreateFeatureFromWellKnownData(Byte[] wellKnownBinary)

Parameters

wellKnownBinary Byte[]
The well known binary.

Returns

Feature
The result of the operation.

CreateFeatureFromWellKnownData(String)

Creates feature from well known data.

public static Feature CreateFeatureFromWellKnownData(string wellKnownText)

Parameters

wellKnownText String
The well known text.

Returns

Feature
The result of the operation.

GetBoundingBox()

This method returns the bounding box of the Feature.

public RectangleShape GetBoundingBox()

Returns

RectangleShape
This method returns the bounding box of the Feature.

Remarks:

None

GetBoundingBoxCore()

Provides the overridable implementation that returns the bounding box that encloses the relevant geometry.

protected RectangleShape GetBoundingBoxCore()

Returns

RectangleShape
The result of the operation.

CloneDeep(IEnumerable<String>)

This method clones the entire structure, creating a totally separate copy.

public Feature CloneDeep(IEnumerable<string> returningColumnNames)

Parameters

returningColumnNames IEnumerable<String>
This parameter represents the columnar data fields that you wish to include in the clone.

Returns

Feature

        This method returns a clone of the entire structure, creating a totally separate
        copy.

Remarks:

This method will return a complete copy of the Feature. As this is a deep clone, there are no shared references between the source and the copy.

CloneDeep(ReturningColumnsType)

This method clones the entire structure, creating a totally separate copy.

public Feature CloneDeep(ReturningColumnsType returningColumnNamesType)

Parameters

returningColumnNamesType ReturningColumnsType
This parameter allows you to select a type from the ReturningColumnsType that you wish to return with.

Returns

Feature

        This method returns a clone of the entire structure, creating a totally separate
        copy.

Remarks:

This method will return a complete copy of the Feature. As this is a deep clone, there are no shared references between the source and the copy.

CloneDeep()

Performs clone deep.

public Feature CloneDeep()

Returns

Feature
The result of the operation.

Union(IEnumerable<Feature>)

This method returns the union of the specified features.

public static Feature Union(IEnumerable<Feature> targetFeatures)

Parameters

targetFeatures IEnumerable<Feature>
The features you are trying to find the union with.

Returns

Feature

        The return type is a Feature that contains the set of all points that
        lie within the features you specified.

Exceptions

ArgumentNullException
If you pass a null as the targetFeatures, we will throw an ArgumentNullException.

Remarks:

This is useful for adding area features together to form a larger area feature.

Union(Feature)

This method returns the union of the current feature and the target feature, defined as the set of all points in the current feature or the target feature.

public Feature Union(Feature targetFeature)

Parameters

targetFeature Feature
The feature you are trying to find the union with.

Returns

Feature

        The return type is a Feature that contains the set of all points which
        lie in the current feature or the target feature.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a feature which has no points, it will throw an InvalidOperationException.

Remarks:

This is useful for adding area features together to form a larger area shape.

Buffer(Double, GeographyUnit, DistanceUnit)

This method computes the area containing all of the points within a given distance from this feature.

public Feature Buffer(double distance, GeographyUnit featureUnit, DistanceUnit distanceUnit)

Parameters

distance Double
The distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.

featureUnit GeographyUnit
This is the geographic unit of the shape you are performing the operation on.

distanceUnit DistanceUnit
This is the distance unit you would like to use as the distance. For example, if you select miles as your distanceUnit, then the distance will be calculated in miles for the operation.

Returns

Feature

        The return type is a Feature that represents all of the points within a
        given distance from the feature.

Exceptions

ArgumentOutOfRangeException
If you pass in a featureUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

ArgumentOutOfRangeException
If you pass in a distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

Remarks:

distance from this feature. In this case, you will be using the rounded RoundedBufferCapStyle and the default 8 quadrant segments. The distance unit is determined by the distanceUnit argument.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Buffer(Double, Int32, GeographyUnit, DistanceUnit)

This method computes the area containing all of the points within a given distance from this feature.

public Feature Buffer(double distance, int quadrantSegments, GeographyUnit featureUnit, DistanceUnit distanceUnit)

Parameters

distance Double
The distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.

quadrantSegments Int32
The quadrant segments are the number of points in each quarter circle. A good default is 8, but if you want smoother edges you can increase this number. The valid range for this number is from 3 to 100.

featureUnit GeographyUnit
This is the geographic unit of the feature you are performing the operation on.

distanceUnit DistanceUnit
This is the distance unit you would like to use as the distance. For example, if you select miles as your distanceUnit, then the distance will be calculated in miles for the operation.

Returns

Feature

        The return type is a Feature that represents all of the points within a
        given distance from the feature.

Exceptions

ArgumentOutOfRangeException
Passing an invalid number of quadrant segments which is not between 3 and 100 will throw an ArgumentOutOfRangeException.

ArgumentOutOfRangeException
If you pass in a featureUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

ArgumentOutOfRangeException
If you pass in a distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

Remarks:

distance from this feature. In this case, you will be using the rounded RoundedBufferCapStyle. The distance unit is determined by the distanceUnit argument.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Buffer(Double, Int32, BufferCapType, GeographyUnit, DistanceUnit)

This method computes the area containing all of the points within a given distance from this feature.

public Feature Buffer(double distance, int quadrantSegments, BufferCapType bufferCapType, GeographyUnit featureUnit, DistanceUnit distanceUnit)

Parameters

distance Double
The distance is the number of units to buffer the current feature. The distance unit will be the one specified in the distanceUnit parameter.

quadrantSegments Int32
The number of quadrantSegments used in the buffer logic.

bufferCapType BufferCapType
The bufferCapType used in the buffer logic.

featureUnit GeographyUnit
This is the geographic unit of the feature you are performing the operation on.

distanceUnit DistanceUnit
This is the distance unit you would like to use as the distance. For example, if you select miles as your distanceUnit, then the distance will be calculated in miles for the operation.

Returns

Feature

        The return type is a Feature that represents all of the points within a
        given distance from the feature.

Exceptions

ArgumentOutOfRangeException
If you pass in a featureUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

ArgumentOutOfRangeException
If you pass in a distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentOutOfRangeException
If you pass in a bufferCapType that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.

ArgumentOutOfRangeException
Passing an invalid quadrantSegments which is not between 3 and 100 will throw an ArgumentOutOfRangeException.

Remarks:

distance from this feature. In this case, you will be using the rounded RoundedBufferCapStyle and the default 8 quadrant segments. The distance unit is determined by the distanceUnit argument.

Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.

Contains(Feature)

This method returns if the targetFeature lies within the interior of the current feature.

public bool Contains(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature that contains a shape you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetShape which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Crosses(Feature)

This method returns if the current feature and the targetFeature share some but not all interior points.

public bool Crosses(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature that contains a shape you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetShape which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

IsWithin(Feature)

This method returns if the current feature lies within the interior of the targetFeature.

public bool IsWithin(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature that contains a shape you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetShape which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Intersects(Feature)

This method returns if the current feature and the targetFeature have at least one point in common.

public bool Intersects(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetShape which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

IsDisjointed(Feature)

This method returns if the current feature and the targetFeature have no points in common.

public bool IsDisjointed(Feature targetFeature)

Parameters

targetFeature Feature
The feature you wish to compare the current one to.

Returns

Boolean

        common.
        As this is a concrete public method that wraps a Core method, we reserve the right
        to add events and other logic to pre- or post-process data returned by the Core version
        of the method. In this way, we leave our framework open on our end, but also allow you
        the developer to extend our logic to suit your needs. If you have questions about this,
        please contact our support team as we would be happy to work with you on extending our
        framework.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetShape which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

None

IsTopologicallyEqual(Feature)

This method returns if the current feature and the targetFeature are topologically equal.

public bool IsTopologicallyEqual(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature that contains a shape you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetfeature which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

Topologically equal means that the shapes are essentially the same. For example, let's say you have a line with two points, point A and point B. You also have another line that is made up of point A, point B and point C. Point A of line one shares the same vertex as point A of line two, and point B of line one shares the same vertex as point C of line two. They are both straight lines, so point B of line two would lie on the first line. Essentially the two lines are the same, with line 2 having just one extra point. Topologically they are the same line, so this method would return true.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Overlaps(Feature)

This method returns if the current feature and the targetFeature share some but not all points in common.

public bool Overlaps(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature that contains a shape you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetFeature which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Touches(Feature)

This method returns of the current feature and the targetFeature have at least one boundary point in common, but no interior points.

public bool Touches(Feature targetFeature)

Parameters

targetFeature Feature
The targetFeature which contains a shape that you wish to compare the current one to.

Returns

Boolean

Exceptions

InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.

ArgumentException
If you pass in a targetFeature which is invalid, we will throw an ArgumentException.

ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.

Remarks:

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

GetIntersection(Feature)

This method returns the intersection of the current feature and the target feature, defined as the set of all points which lie in both the current feature and the target feature.

public Feature GetIntersection(Feature targetFeature)

Parameters

targetFeature Feature
The feature you are trying to find the intersection with.

Returns

Feature

        The return type is a Feature that contains the set of all points which
        lie in both the current feature and the target feature.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a feature which has no points, it will throw an InvalidOperationException.

Remarks:

None

GetDifference(Feature)

This method returns the difference between current feature and the specified feature, defined as the set of all points which lie in the current feature but not in the targetFeature.

public Feature GetDifference(Feature targetFeature)

Parameters

targetFeature Feature
The feture you are trying to find the difference with.

Returns

Feature

        The return type is a Feature that is the set of all points which lie in
        the current feature but not in the target feature.

Exceptions

InvalidOperationException
In the event you attempt to call this method on a feature which has no points, it will throw an InvalidOperationException.

Remarks:

None

GetConvexHull()

This method returns the convex hull of the feature, defined as the smallest convex ring that contains all of the points in the feature.

public Feature GetConvexHull()

Returns

Feature

Exceptions

InvalidOperationException
In the event you attempt to call this method on a feature which has no points, it will throw an InvalidOperationException.

Remarks:

This method is useful when you want to create a perimeter around the shape. For example, if you had a MultiPolygon that represented buildings on a campus, you could easily get the convex hull of the buildings and determine the perimeter of all of the buildings together. This also works with MultiPoint shapes, where each point may represent a certain type of person you are doing statistics on. With convex hull, you can get an idea of the regions those points are located in.

SetWellKnownBinary(Byte[])

Sets well known binary.

public void SetWellKnownBinary(Byte[] wellKnownBinary)

Parameters

wellKnownBinary Byte[]
The well known binary.

GetInvalidReason()

Returns invalid reason.

public string GetInvalidReason()

Returns

String
A string result.

IsGeometryValid()

Validates the geometry represented by wellKnownBinary using NetTopologySuite.

public bool IsGeometryValid()

Returns

Boolean
true if the geometry is valid; otherwise, false. If the geometry cannot be constructed from wellKnownBinary, this method returns false.

Remarks:

This method performs a simple validity check and returns only a boolean flag. For detailed validation information, including the corresponding , use GetGeometryValidationInfo() or the IsGeometryValid(out TopologyValidationError?) overload.

IsGeometryValid(TopologyValidationError&)

Validates the geometry represented by wellKnownBinary using NetTopologySuite.

public bool IsGeometryValid(TopologyValidationError& validationError)

Parameters

validationError TopologyValidationError&

Returns

Boolean
true if the geometry is valid; otherwise, false. If the geometry cannot be constructed from wellKnownBinary, this method returns false.

Remarks:

This method is a convenience wrapper around and only returns a boolean validity flag. For detailed validation information, including the corresponding , use or the Feature.IsGeometryValid(TopologyValidationError&) overload.

MakeGeometryValid()

Uses NetTopologySuite to validate and, if necessary, repair the geometry represented by wellKnownBinary, and returns a new Feature containing the resulting geometry.

public Feature MakeGeometryValid()

Returns

Feature

        A new  containing a valid geometry if one can be produced;
        otherwise, null.

Remarks:

If the geometry is already valid, this method returns a feature whose geometry is identical (in coordinates) to the original.

If the geometry is invalid, it is passed through . If the result is still invalid, a final attempt is made using with a distance of 0, which may slightly alter the original shape in order to produce a valid geometry.

If the geometry cannot be constructed from wellKnownBinary, this method returns null.

GetShapeCore()

This method returns the shape class that represents the Feature.

protected BaseShape GetShapeCore()

Returns

BaseShape
This method returns the shape class that represents the Feature.

Remarks:

This method allows you to get a shape class from a Feature. Because the Feature stores the geometry for itself in well-known binary, it may take some time to generate a shape class if the geometry is complex.