Table of Contents

Class Feature

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

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
Feature
Inherited Members

Constructors

Feature()

public Feature()

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

This overload allows you to create a feature using well-known binary and specify the Id.

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

This overload allows you to create the Feature from well-known binary and feature ID, as well as specify the column values.

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

This overload allows you to create the Feature from well-known binary and feature ID, as well as specify the column values.

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 Feature will be a random GUID.

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, IDictionary<string, string>)

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

Parameters

x double
y double
id string
columnValues IDictionary<string, string>

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(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

This overload allows you to create the Feature from well-known text and specify the Id.

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

This overload allows you to create the Feature from well-known text and feature ID, as well as specify the column values.

Feature(string, string, IEnumerable<string>)

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

Parameters

wellKnownText string
id string
columnValues IEnumerable<string>

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.

Remarks

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

Exceptions

InvalidOperationException

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

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

This overload allows you to create the Feature from a baseShape and specify the column values.

Feature(BaseShape, IEnumerable<string>)

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

Parameters

baseShape BaseShape
columnValues IEnumerable<string>

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, IDictionary<string, string>)

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

Parameters

vertex Vertex
id string
columnValues IDictionary<string, string>

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.

Properties

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.

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

Methods

Buffer(double, int, 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 int

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.

Remarks

This method computes the area containing all of the points within a given 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.

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.

Buffer(double, int, 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 int

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.

Remarks

This method computes the area containing all of the points within a given 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.

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.

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.

Remarks

This method computes the area containing all of the points within a given 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.

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.

CloneDeep()

public Feature CloneDeep()

Returns

Feature

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.

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

bool

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

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.

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.

CreateFeatureFromGeoJson(string)

public static Feature CreateFeatureFromGeoJson(string geoJson)

Parameters

geoJson string

Returns

Feature

CreateFeatureFromWellKnownData(byte[])

public static Feature CreateFeatureFromWellKnownData(byte[] wellKnownBinary)

Parameters

wellKnownBinary byte[]

Returns

Feature

CreateFeatureFromWellKnownData(string)

public static Feature CreateFeatureFromWellKnownData(string wellKnownText)

Parameters

wellKnownText string

Returns

Feature

CreateFeaturesFromGeoJson(string)

public static Collection<Feature> CreateFeaturesFromGeoJson(string geoJson)

Parameters

geoJson string

Returns

Collection<Feature>

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

bool

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

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.

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.

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()

protected virtual RectangleShape GetBoundingBoxCore()

Returns

RectangleShape

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

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

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.

Exceptions

InvalidOperationException

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

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.

Remarks

None

Exceptions

InvalidOperationException

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

GetGeoJson()

public string GetGeoJson()

Returns

string

GetGeoJsonCore()

protected virtual string GetGeoJsonCore()

Returns

string

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.

Remarks

None

Exceptions

InvalidOperationException

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

GetInvalidReason()

public string GetInvalidReason()

Returns

string

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.

GetShapeCore()

This method returns the shape class that represents the Feature.

protected virtual 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.

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(RingOrder)

public byte[] GetWellKnownBinary(RingOrder outerRingOrder)

Parameters

outerRingOrder RingOrder

Returns

byte[]

GetWellKnownBinary(RingOrder, WkbByteOrder)

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

Parameters

outerRingOrder RingOrder
byteOrder WkbByteOrder

Returns

byte[]

GetWellKnownBinary(WkbByteOrder)

public byte[] GetWellKnownBinary(WkbByteOrder byteOrder)

Parameters

byteOrder WkbByteOrder

Returns

byte[]

GetWellKnownBinaryCore(RingOrder, WkbByteOrder)

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

protected virtual byte[] GetWellKnownBinaryCore(RingOrder outerRingOrder, WkbByteOrder byteOrder)

Parameters

outerRingOrder RingOrder
byteOrder WkbByteOrder

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

Returns

byte[]

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

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.

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.

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.

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.

Exceptions

InvalidOperationException

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

GetWellKnownTextCore(RingOrder)

protected virtual string GetWellKnownTextCore(RingOrder outerRingOrder)

Parameters

outerRingOrder RingOrder

Returns

string

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()

protected virtual WellKnownType GetWellKnownTypeCore()

Returns

WellKnownType

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

bool

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

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.

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.

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

bool

This method returns if the current feature and the targetFeature have no points in 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.

Remarks

None

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.

IsGeometryValid()

Using NTS to retrieve the geometry validation.

public bool IsGeometryValid()

Returns

bool

returns True if valid. Otherwise, for example in the case of self intersection, returns false. The reason for being invalid can be found with GetInvalidReason()

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

bool

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

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.

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.

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

bool

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

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.

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.

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

bool

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

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.

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.

SetWellKnownBinary(byte[])

public void SetWellKnownBinary(byte[] wellKnownBinary)

Parameters

wellKnownBinary byte[]

ToString()

public override string ToString()

Returns

string

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

bool

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

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.

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.

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.



Remarks

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


Exceptions

ArgumentNullException

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

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.

Remarks

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

Exceptions

InvalidOperationException

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