Class BaseShape
The abstract class from which area shapes, line shapes, and point shapes inherit from.
public abstract class BaseShape
- Inheritance
-
BaseShape
- Derived
- Inherited Members
Remarks
The BaseShape is the lowest level shape in the shapes hierarchy. Directly inherited from BaseShape are AreaShape, LineShape and PointShape. The methods and properties on BaseShape are the lowest common denominator for all the various kinds of shapes. It marked abstract and is designed only to be inherited from.
Constructors
BaseShape()
This is the default constructor for BaseShape.
protected BaseShape()
Properties
Id
The id of the shape.
public string Id { get; set; }
Property Value
Tag
The tag of the shape.
public object Tag { get; set; }
Property Value
Methods
Buffer(double, int, BufferCapType, GeographyUnit, DistanceUnit)
This method computes the area containing all of the points within a given distance from this shape.
public MultipolygonShape Buffer(double distance, int quadrantSegments, BufferCapType bufferCapType, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.
quadrantSegments
intThe 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.
bufferCapType
BufferCapTypeThe bufferCapType determines how the caps of the buffered object look. They range from rounded to squared off.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis 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
- MultipolygonShape
The return type is a MultiPolygonShape that represents all of the points within a given distance from the shape.
Remarks
This method computes the area containing all of the points within a given
distance from this shape.
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 bufferCapType that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit 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, int, GeographyUnit, DistanceUnit)
This method computes the area containing all of the points within a given distance from this shape.
public MultipolygonShape Buffer(double distance, int quadrantSegments, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.
quadrantSegments
intThe 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.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis 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
- MultipolygonShape
The return type is a MultiPolygonShape that represents all of the points within a given distance from the shape.
Remarks
This method computes the area containing all of the points within a given
distance from this shape. 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 shapeUnit 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 shape.
public MultipolygonShape Buffer(double distance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis 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
- MultipolygonShape
The return type is a MultiPolygonShape that represents all of the points within a given distance from the shape.
Remarks
This method computes the area containing all of the points within a given
distance from this shape. 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 shapeUnit 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.
BufferCore(double, int, BufferCapType, GeographyUnit, DistanceUnit)
This method computes the area containing all of the points within a given distance from this shape.
protected virtual MultipolygonShape BufferCore(double distance, int quadrantSegments, BufferCapType bufferCapType, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to buffer the current shape. The distance unit will be the one specified in the distanceUnit parameter.
quadrantSegments
intThe number of quadrantSegments used in the buffer logic.
bufferCapType
BufferCapTypeThe bufferCapType used in the buffer logic.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis 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
- MultipolygonShape
The return type is a MultiPolygonShape that represents all of the points within a given distance from the shape.
Remarks
This method computes the area containing all of the points within a given
distance from this shape. 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 shapeUnit 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.
CloneDeep()
This method returns a complete copy of the shape without any references in common.
public BaseShape CloneDeep()
Returns
- BaseShape
This method returns a complete copy of the shape without any references 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.
CloneDeepCore()
This method returns a complete copy of the shape without any references in common.
protected virtual BaseShape CloneDeepCore()
Returns
- BaseShape
This method returns a complete copy of the shape without any references in common.
Remarks
When you override this method, you need to ensure that there are no references in common between the original and copy.
Contains(BaseShape)
This method returns if the targetShape lies within the interior of the current shape.
public bool Contains(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the targetShape lies within the interior of the current shape.
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.
Contains(Feature)
This method returns if the targetFeature lies within the interior of the current shape.
public bool Contains(Feature targetFeature)
Parameters
targetFeature
FeatureThe 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 shape.
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.
ContainsCore(BaseShape)
This method returns if the targetShape lies within the interior of the current shape.
protected virtual bool ContainsCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the targetShape lies within the interior of the current shape.
Remarks
<br />
<br />
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.
- 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.
CreateShapeFromGeoJson(string)
public static BaseShape CreateShapeFromGeoJson(string geoJson)
Parameters
geoJson
string
Returns
CreateShapeFromWellKnownData(byte[])
This method creates a BaseShape from a string of well-known binary.
public static BaseShape CreateShapeFromWellKnownData(byte[] wellKnownBinary)
Parameters
wellKnownBinary
byte[]An array of bytes representing the geometry in well-known binary format.
Returns
- BaseShape
The return type is a higher level shape constructed from the well-known binary you passed into the method. Though the object is a higher level shape, such as a PolygonShape or MultiPointShape, you will need to cast it to that shape in order to use its unique properties.
Remarks
This method creates a BaseShape from a string of 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.
Exceptions
- ArgumentException
Passing invalid well-known binary in the bytes parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null in the bytes parameter will throw an ArgumentNullException.
CreateShapeFromWellKnownData(string)
This method creates a BaseShape from a string of well-known text.
public static BaseShape CreateShapeFromWellKnownData(string wellKnownText)
Parameters
wellKnownText
stringA string representing the geometry in well-known text format.
Returns
- BaseShape
The return type is a higher level shape constructed from the well-known text you passed into the method. Though the object is a higher level shape, such as a PolygonShape or MultiPointShape, you will need to cast it to that shape in order to use its unique properties.
Remarks
This method creates a BaseShape from a string of 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)))
Exceptions
- ArgumentException
Passing invalid well-known text in the wellKnownText parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null as the wellKnownText parameter will throw an ArgumentNullException.
Crosses(BaseShape)
This method returns if the current shape and the targetShape share some but not all interior points.
public bool Crosses(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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.
Crosses(Feature)
This method returns if the current shape and the targetFeature share some but not all interior points.
public bool Crosses(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature that contains a shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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.
CrossesCore(BaseShape)
This method returns if the current shape and the targetShape share some but not all interior points.
protected virtual bool CrossesCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape share some but not all interior points.
Remarks
<br />
<br />
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.
- 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 calculates the smallest RectangleShape that encompasses the entire geometry.
public RectangleShape GetBoundingBox()
Returns
- RectangleShape
The RectangleShape returned is the smallest RectangleShape that can encompass the entire geometry.
Remarks
The GetBoundingBox method calculates the smallest RectangleShape that can encompass the entire geometry by examining each point in the geometry.
Depending on the number of PointShapes and complexity of the geometry, this
operation can take longer for larger objects.
If the shape is a PointShape, then the bounding box's upper left and lower right
points will be equal. This will create a RectangleShape with no area.
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 get the bounding box from a shape which has no points, it will throw an InvalidOperationException.
GetBoundingBoxCore()
This method calculates the smallest RectangleShape that encompasses the entire geometry.
protected virtual RectangleShape GetBoundingBoxCore()
Returns
- RectangleShape
The RectangleShape returned is the smallest RectangleShape that can encompass the entire geometry.
Remarks
The GetBoundingBox method calculates the smallest RectangleShape that can encompass the entire geometry by examining each point in the geometry.
Depending on the number of PointShapes and complexity of the geometry, this
operation can take longer for larger objects.
If the shape is a PointShape, then the bounding box's upper left and lower right
points will be equal. This will create a RectangleShape with no area.
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 get the bounding box from a shape which has no points, it will throw an InvalidOperationException.
GetCenterPoint()
This method returns the center point of the current shape's bounding box.
public PointShape GetCenterPoint()
Returns
- PointShape
A PointShape representing the center point of the current shape's bounding box.
Remarks
This method returns the center point of the current shape's bounding box. It is
important to note that this is the center point of the bounding box. There are numerous
ways to calculate the "center" of a geometry, such as its weighted center, etc. You can
find other centers by examining the various methods of the shape itself.
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.
GetCenterPointCore()
This method returns the center point of the current shape's bounding box.
protected virtual PointShape GetCenterPointCore()
Returns
- PointShape
A PointShape representing the center point of the current shape's bounding box.
Remarks
This method returns the center point of the current shape's bounding box. It is
important to note that this is the center point of the bounding box. There are numerous
ways to calculate the "center" of a geometry, such as its weighted center, etc. You can
find other centers by examining the various methods of the shape itself.
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.
GetClosestPointTo(BaseShape, GeographyUnit)
This method returns the point of the current shape that is closest to the target shape.
public PointShape GetClosestPointTo(BaseShape targetShape, GeographyUnit shapeUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the closest point to.
shapeUnit
GeographyUnitThe geographic unit of the shape you are trying to find the closet point to.
Returns
- PointShape
A PointShape representing the closest point of the current shape to the targetShape.
Remarks
This method returns the point of the current shape that is closest to the target shape.
It is often the case that the point returned is not a point of the object itself. An
example would be a line with two points that are far apart from each other. If you set the
targetShape to be a point midway between the points but a short distance away from the line, the
method would return a point that is on the line but not either of the two points that make up the
line.
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
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetClosestPointTo(Feature, GeographyUnit)
This method returns the point of the current shape that is closest to the target feature.
public PointShape GetClosestPointTo(Feature targetFeature, GeographyUnit shapeUnit)
Parameters
targetFeature
FeatureThe feature you are trying to find the closest point to.
shapeUnit
GeographyUnitThe geographic unit of the feature you are trying to find the closet point to.
Returns
- PointShape
A PointShape representing the closest point of the current shape to the targetFeature.
Remarks
This method returns the point of the current shape that is closest to the target feature.
It is often the case that the point returned is not a point of the object itself. An
example would be a line with two points that are far apart from each other. If you set the
targetFeature to be a point midway between the points but a short distance away from the line, the
method would return a point that is on the line but not either of the two points that make up the
line.
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
- ArgumentException
If you pass in a targetFeature which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetFeature, we will throw an ArgumentNullException.
- InvalidOperationException
In the event you attempt to call this method on a feature which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetClosestPointToCore(BaseShape, GeographyUnit)
This method returns the point of the current shape that is closest to the target shape.
protected virtual PointShape GetClosestPointToCore(BaseShape targetShape, GeographyUnit shapeUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the closest point to.
shapeUnit
GeographyUnitThe geographic unit of the shape you are trying to find the closet point to.
Returns
- PointShape
A PointShape representing the closest point of the current shape to the targetShape.
Remarks
This method returns the point of the current shape that is closest to the target shape.
It is often the case that the point returned is not a point of the object itself. An
example would be a line with two points that are far apart from each other. If you set the
targetShape to be a point midway between the points but a short distance away from the line, the
method would return a point that is on the line but not either of the two points that make up the
line.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetCrossing(BaseShape)
This method returns the crossing points between the current shape and the passed-in target shape.
public MultipointShape GetCrossing(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe target shape you wish to get crossing points with.
Returns
- MultipointShape
This method returns the crossing points between the current shape and the passed-in target shape.
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.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
GetCrossingCore(BaseShape)
This method returns the crossing points between the current shape and the passed-in target shape.
protected virtual MultipointShape GetCrossingCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe target shape you wish to get crossing with.
Returns
- MultipointShape
This method returns the crossing points between the current shape and the passed-in target shape.
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.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
GetDistanceTo(BaseShape, GeographyUnit, DistanceUnit)
This method computes the distance between the current shape and the targetShape.
public double GetDistanceTo(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the distance to.
shapeUnit
GeographyUnitThis parameter is the unit of the shape you are getting the distance to.
distanceUnit
DistanceUnitThis parameter is the unit of the distance you want the return value to be in.
Returns
- double
The return type is the distance between this shape and the targetShape in the GeographyUnit of the shape.
Remarks
In this method we compute the closest distance between the two shapes. The
returned unit will be in the unit of distance specified.
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
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit 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.
GetDistanceTo(Feature, GeographyUnit, DistanceUnit)
This method computes the distance between the current shape and the targetFeature.
public double GetDistanceTo(Feature targetFeature, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetFeature
FeatureThe feature you are trying to find the distance to.
shapeUnit
GeographyUnitThis parameter is the unit of the shape which is contained in the targetFeature you are getting the distance to.
distanceUnit
DistanceUnitThis parameter is the unit of the distance you want the return value to be in.
Returns
- double
The return type is the distance between this shape and the targetFeature in the GeographyUnit of the shape.
Remarks
In this method we compute the closest distance between a shape and a feature. The
returned unit will be in the unit of distance specified.
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
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit 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.
GetDistanceToCore(BaseShape, GeographyUnit, DistanceUnit)
This method computes the distance between the current shape and the targetShape.
protected virtual double GetDistanceToCore(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the distance to.
shapeUnit
GeographyUnitthe geographic unit of the targetShape.
distanceUnit
DistanceUnitThe returning distance unit.
Returns
- double
The return type is the distance between this shape and the targetShape in the GeographyUnit of the shape.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
Remarks
In this method we compute the closest distance between the two shapes. The returned unit will be in the unit of distance specified.
Exceptions
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit 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.
GetFeature()
Get a corresponding feature which has the same Id and BaseShape as the current shape.
public Feature GetFeature()
Returns
- Feature
The feature with the same Id and BaseShape as the current BaseShape, and with empty columnValues in it.
GetFeature(IDictionary<string, string>)
Get a corresponding feature which has the same Id and BaseShape as the current shape. Additionally, pass the specified columnValues into the returned feature.
public Feature GetFeature(IDictionary<string, string> columnValues)
Parameters
columnValues
IDictionary<string, string>The columnValues will be passed into returning feature.
Returns
- Feature
The feature with the same Id and BaseShape as the current BaseShape and with empty columnValues in it, substituted with the passed-in columnValues.
GetGeoJson()
public string GetGeoJson()
Returns
GetGeoJsonCore()
protected virtual string GetGeoJsonCore()
Returns
GetShortestLineTo(BaseShape, GeographyUnit)
This method returns the shortest LineShape between this shape and the targetShape parameter.
public MultilineShape GetShortestLineTo(BaseShape targetShape, GeographyUnit shapeUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the distance to.
shapeUnit
GeographyUnitThe geographic unit of the Shape you are trying to find the distance to.
Returns
- MultilineShape
A LineShape representing the shortest distance between the shape you're calling the method on and the targetShape.
Remarks
This method returns a LineShape representing the shortest distance between the
shape you're calling the method on and the targetShape. In some instances, based on the
GeographicType or Projection, the line may not be straight. This effect is similar to
what you might see on an international flight when the displayed flight path is
curved.
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
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetShortestLineTo(Feature, GeographyUnit)
This method returns the shortest LineShape between this shape and the targetFeature. parameter.
public MultilineShape GetShortestLineTo(Feature targetFeature, GeographyUnit shapeUnit)
Parameters
targetFeature
FeatureThe feature you are trying to find the distance to.
shapeUnit
GeographyUnitThe geographic unit of the feature you are trying to find the distance to.
Returns
- MultilineShape
A MultiLineShape representing the shortest distance between the shape you're calling the method on and the targetFeature.
Remarks
This method returns a MultiLineShape representing the shortest distance between the
shape you're calling the method on and the targetShape. In some instances, based on the
GeographicType or Projection, the line may not be straight. This is effect is similar to
what you might see on an international flight when the displayed flight path is
curved.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetShortestLineToCore(BaseShape, GeographyUnit)
This method returns the shortest LineShape between this shape and the targetShape parameter.
protected virtual MultilineShape GetShortestLineToCore(BaseShape targetShape, GeographyUnit shapeUnit)
Parameters
targetShape
BaseShapeThe shape you are trying to find the distance to.
shapeUnit
GeographyUnitThe geographic unit of the shape you are trying to find the distance to.
Returns
- MultilineShape
A LineShape representing the shortest distance between the shape you're calling the method on and the targetShape.
Remarks
This method returns a LineShape representing the shortest distance between the
shape you're calling the method on and the targetShape. In some instances, based on the
GeographicType or Projection, the line may not be straight. This is effect is similar to
what you might see on an international flight when the displayed flight path is
curved.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentException
If you pass in a targetShape which does not have any points, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
- 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 shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
GetWellKnownBinary()
This method returns a byte array that represents the shape in well-known binary.
public byte[] GetWellKnownBinary()
Returns
- byte[]
This method returns a byte array that represents the shape in well-known binary.
Remarks
This method returns a byte array that represents the shape 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.
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.
GetWellKnownBinary(RingOrder)
public byte[] GetWellKnownBinary(RingOrder outerRingOrder)
Parameters
outerRingOrder
RingOrder
Returns
- byte[]
GetWellKnownBinary(RingOrder, WkbByteOrder)
public byte[] GetWellKnownBinary(RingOrder outerRingOrder, WkbByteOrder byteOrder)
Parameters
outerRingOrder
RingOrderbyteOrder
WkbByteOrder
Returns
- byte[]
GetWellKnownBinary(WkbByteOrder)
This method returns a byte array that represents the shape in well-known binary.
public byte[] GetWellKnownBinary(WkbByteOrder byteOrder)
Parameters
byteOrder
WkbByteOrderThis parameter is the byte order used to encode the well-known binary.
Returns
- byte[]
This method returns a byte array that represents the shape in well-known binary.
Remarks
This method returns a byte array that represents the shape 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.
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.
GetWellKnownBinaryCore(RingOrder, WkbByteOrder)
This method returns a byte array that represents the shape in well-known binary.
protected virtual byte[] GetWellKnownBinaryCore(RingOrder outerRingOrder, WkbByteOrder byteOrder)
Parameters
outerRingOrder
RingOrderbyteOrder
WkbByteOrderThis parameter specifies if the byte order is big- or little-endian.
Returns
- byte[]
This method returns a byte array that represents the shape in well-known binary.
Remarks
This method returns a byte array that represents the shape 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 representation of this shape.
public string GetWellKnownText()
Returns
- string
This method returns a string that represents the shape in well-known text.
Remarks
This method returns a string that 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)))
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.
GetWellKnownText(RingOrder)
This method returns the well-known text representation of this shape.
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 abstract string GetWellKnownTextCore(RingOrder outerRingOrder)
Parameters
outerRingOrder
RingOrder
Returns
GetWellKnownType()
This method returns the well-known type for the shape.
public WellKnownType GetWellKnownType()
Returns
- WellKnownType
This method returns the well-known type for the shape.
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.
GetWellKnownTypeCore()
This method returns the well-known type for the shape.
protected virtual WellKnownType GetWellKnownTypeCore()
Returns
- WellKnownType
This method returns the well-known type for the shape.
Remarks
None
Intersects(BaseShape)
This method returns if the current shape and the targetShape have at least one point in common.
public bool Intersects(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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.
Intersects(Feature)
This method returns if the current shape and the targetFeature have at least one point in common.
public bool Intersects(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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.
IntersectsCore(BaseShape)
This method returns if the current shape and the targetShape have at least one point in common.
protected virtual bool IntersectsCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape have at least one point in common.
Remarks
<br />
<br />
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.
- 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(BaseShape)
This method returns if the current shape and the targetShape have no points in common.
public bool IsDisjointed(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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.
IsDisjointed(Feature)
This method returns if the current shape and the targetFeature have no points in common.
public bool IsDisjointed(Feature targetFeature)
Parameters
targetFeature
FeatureThe feature you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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.
IsDisjointedCore(BaseShape)
This method returns if the current shape and the targetShape have no points in common.
protected virtual bool IsDisjointedCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape have no points in common.
Remarks
<br />
<br />
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.
- 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.
IsTopologicallyEqual(BaseShape)
This method returns if the current shape and the targetShape are topologically equal.
public bool IsTopologicallyEqual(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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 targetShape which is invalid, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
IsTopologicallyEqual(Feature)
This method returns if the current shape and the targetFeature are topologically equal.
public bool IsTopologicallyEqual(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature that contains a shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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 targetShape which is invalid, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
IsTopologicallyEqualCore(BaseShape)
This method returns if the current shape and the targetShape are topologically equal.
protected virtual bool IsTopologicallyEqualCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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.
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.
- 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.
IsWithin(BaseShape)
This method returns if the current shape lies within the interior of the targetShape.
public bool IsWithin(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape lies within the interior of the targetShape.
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.
IsWithin(Feature)
This method returns if the current shape lies within the interior of the targetFeature.
public bool IsWithin(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature that contains a shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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.
IsWithinCore(BaseShape)
This method returns if the current shape lies within the interior of the targetShape.
protected virtual bool IsWithinCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape lies within the interior of the targetShape.
Remarks
<br />
<br />
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.
- 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.
LoadFromWellKnownData(byte[])
This method hydrates the current shape with its data from well-known binary.
public void LoadFromWellKnownData(byte[] wellKnownBinary)
Parameters
wellKnownBinary
byte[]This parameter is the well-known binary used to populate the shape.
Remarks
This is used when you want to hydrate a shape based on well-known binary. You can
create the shape and then load the well-known binary using this method.
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
- ArgumentException
Passing invalid well-known binary in the bytes parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null in the bytes parameter will throw an ArgumentNullException.
LoadFromWellKnownData(string)
This method hydrates the current shape with its data from well-known text.
public void LoadFromWellKnownData(string wellKnownText)
Parameters
wellKnownText
stringThis parameter is the well-known text you will use to hydrate your object.
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
- ArgumentException
Passing invalid well-known text in the wellKnownText parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null as the wellKnownText parameter will throw an ArgumentNullException.
LoadFromWellKnownDataCore(byte[])
This method hydrates the current shape with its data from well-known binary.
protected virtual void LoadFromWellKnownDataCore(byte[] wellKnownBinary)
Parameters
wellKnownBinary
byte[]This parameter is the well-known binary used to populate the shape.
Remarks
This is used when you want to hydrate a shape based on well-known binary. You can
create the shape and then load the well-known binary using this method.
Exceptions
- ArgumentException
Passing invalid well-known binary in the bytes parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null in the bytes parameter will throw an ArgumentNullException.
LoadFromWellKnownDataCore(string)
This method hydrates the current shape with its data from well-known text.
protected abstract void LoadFromWellKnownDataCore(string wellKnownText)
Parameters
wellKnownText
stringThis parameter is the well-known text you will use to hydrate your object.
Remarks
None
Exceptions
- ArgumentException
Passing invalid well-known text in the wellKnownText parameter will throw an ArgumentException.
- ArgumentNullException
Passing a null as the wellKnownText parameter will throw an ArgumentNullException.
Overlaps(BaseShape)
This method returns if the current shape and the targetShape share some but not all points in common.
public bool Overlaps(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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 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 shape and the targetFeature share some but not all points in common.
public bool Overlaps(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature that contains a shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape 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 targetShape which is invalid, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
OverlapsCore(BaseShape)
This method returns if the current shape and the targetShape share some but not all points in common.
protected virtual bool OverlapsCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape share some but not all points in common.
Remarks
<br />
<br />
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.
- 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.
Register(Feature, Feature, DistanceUnit, GeographyUnit)
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
public BaseShape Register(Feature fromPoint, Feature toPoint, DistanceUnit fromUnit, GeographyUnit toUnit)
Parameters
fromPoint
FeatureThis parameter is the anchor PointFeature in the coordinate of origin.
toPoint
FeatureThis parameter is the anchor PointFeature in the coordinate of destination.
fromUnit
DistanceUnitThis parameter is the DistanceUnit of the coordinate of origin.
toUnit
GeographyUnitThis parameter is the GeographyUnit of the coordinate of destination.
Returns
- BaseShape
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
Remarks
Registering allows you to take a geometric shape generated in a planar system and attach it to the ground in a Geographic Unit.
A common scenario is integrating geometric shapes from external programs (such as CAD software or a modeling system) and placing them onto a map. You may have the schematics of a building in a CAD system and the relationship between all the points of the building are in feet. You want to then take the CAD image and attach it to where it really exists on a map. You would use the register method to do this.
Registering is also useful for scientific modeling, where software models things such
as a plume of hazardous materials or the fallout from a volcano. The modeling
software typically generates these models in a fictitious planar system. You would
then use the register to take the abstract model and attach it to a map with real
coordinates.
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 fromUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a toUnit 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.
- ArgumentNullException
Passing a null as the fromPoint parameter will throw an ArgumentNullException.
- ArgumentNullException
Passing a null as the toPoint parameter will throw an ArgumentNullException.
Register(PointShape, PointShape, DistanceUnit, GeographyUnit)
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
public BaseShape Register(PointShape fromPoint, PointShape toPoint, DistanceUnit fromUnit, GeographyUnit toUnit)
Parameters
fromPoint
PointShapeThis parameter is the anchor PointShape in the coordinate of origin.
toPoint
PointShapeThis parameter is the anchor PointShape in the coordinate of destination.
fromUnit
DistanceUnitThis parameter is the DistanceUnit of the coordinate of origin.
toUnit
GeographyUnitThis parameter is the GeographyUnit of the coordinate of destination.
Returns
- BaseShape
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
Remarks
Registering allows you to take a geometric shape generated in a planar system and attach it to the ground in a Geographic Unit.
A common scenario is integrating geometric shapes from external programs (such as CAD software or a modeling system) and placing them onto a map. You may have the schematics of a building in a CAD system and the relationship between all the points of the building are in feet. You want to then take the CAD image and attach it to where it really exists on a map. You would use the register method to do this.
Registering is also useful for scientific modeling, where software models things such
as a plume of hazardous materials or the fallout from a volcano. The modeling
software typically generates these models in a fictitious planar system. You would
then use the register to take the abstract model and attach it to a map with real
coordinates.
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 fromUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a toUnit 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.
- ArgumentNullException
Passing a null as the fromPoint parameter will throw an ArgumentNullException.
- ArgumentNullException
Passing a null as the toPoint parameter will throw an ArgumentNullException.
RegisterCore(PointShape, PointShape, DistanceUnit, GeographyUnit)
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
protected virtual BaseShape RegisterCore(PointShape fromPoint, PointShape toPoint, DistanceUnit fromUnit, GeographyUnit toUnit)
Parameters
fromPoint
PointShapeThis parameter is the anchor PointShape in the coordinate of origin.
toPoint
PointShapeThis parameter is the anchor PointShape in the coordinate of destination.
fromUnit
DistanceUnitThis parameter is the DistanceUnit of the coordinate of origin.
toUnit
GeographyUnitThis parameter is the GeographyUnit of the coordinate of destination.
Returns
- BaseShape
This method returns a BaseShape which has been registered from its original coordinate system to another based on two anchor PointShapes.
Remarks
Registering allows you to take a geometric shape generated in a planar system and attach it to the ground in a Geographic Unit.
A common scenario is integrating geometric shapes from external programs (such as CAD software or a modeling system) and placing them onto a map. You may have the schematics of a building in a CAD system and the relationship between all the points of the building are in feet. You want to then take the CAD image and attach it to where it really exists on a map. You would use the register method to do this.
Registering is also useful for scientific modeling, where software models things such
as a plume of hazardous materials or the fallout from a volcano. The modeling
software typically generates these models in a fictitious planar system. You would
then use the register to take the abstract model and attach it to a map with real
coordinates.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions
defined above.
Exceptions
- ArgumentOutOfRangeException
If you pass in a fromUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a toUnit 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.
- ArgumentNullException
Passing a null as the fromPoint parameter will throw an ArgumentNullException.
- ArgumentNullException
Passing a null as the toPoint parameter will throw an ArgumentNullException.
Rotate(BaseShape, PointShape, float)
This method returns a shape rotated by a number of degrees based on a pivot point.
public static BaseShape Rotate(BaseShape sourceBaseShape, PointShape pivotPoint, float degreeAngle)
Parameters
sourceBaseShape
BaseShapeThis parameter is the basis for the rotation.
pivotPoint
PointShapeThe pivotPoint represents the center of rotation.
degreeAngle
floatThe number of degrees of rotation required, from 0 to 360.
Returns
- BaseShape
This method returns a shape rotated by a number of degrees based on a pivot point.
Remarks
This method returns a shape rotated by a number of degrees based on a pivot
point. By placing the pivot point in the center of the shape you can achieve
in-place rotation. By moving the pivot point outside of the center of the shape you
can translate the shape in a circular motion. Moving the pivot point further
outside of the center will make the circular area larger.
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
- ArgumentNullException
If you pass a null as the pivotPoint, we will throw an ArgumentNullException.
- ArgumentOutOfRangeException
Passing an invalid degreeAngle which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which is not valid, it will throw an InvalidOperationException.
- NotImplementedException
In the event you attempt to call this method and the CanRotate property returns false, it will throw a NotImplementedException.
Rotate(Feature, PointShape, float)
This method returns a feature rotated by a number of degrees based on a pivot point.
public static BaseShape Rotate(Feature targetFeature, PointShape pivotPoint, float degreeAngle)
Parameters
targetFeature
FeatureThis parameter is the basis for the rotation.
pivotPoint
PointShapeThe pivotPoint represents the center of rotation.
degreeAngle
floatThe number of degrees of rotation required, from 0 to 360.
Returns
- BaseShape
This method returns a shape rotated by a number of degrees based on a pivot point.
Remarks
This method returns a feature rotated by a number of degrees based on a pivot
point. By placing the pivot point in the center of the feature you can achieve
in-place rotation. By moving the pivot point outside of the center of the feature you
can translate the feature in a circular motion. Moving the pivot point further
outside of the center will make the circular area larger.
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
- ArgumentNullException
If you pass a null as the pivotPoint, we will throw an ArgumentNullException.
- ArgumentOutOfRangeException
Passing an invalid degreeAngle which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which is not valid, it will throw an InvalidOperationException.
- NotImplementedException
In the event you attempt to call this method and the CanRotate property returns false, it will throw a NotImplementedException.
Rotate(PointShape, double)
This method rotates a shape a number of degrees based on a pivot point.
public void Rotate(PointShape pivotPoint, double degreeAngle)
Parameters
pivotPoint
PointShapeThe pivotPoint represents the center of rotation.
degreeAngle
doubleThe number of degrees of rotation required, from 0 to 360.
Remarks
This method returns a shape rotated by a number of degrees based on a pivot
point. By placing the pivot point in the center of the shape you can achieve
in-place rotation. By moving the pivot point outside of the center of the shape you
can translate the shape in a circular motion. Moving the pivot point further
outside of the center will make the circular area larger.
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
- ArgumentNullException
If you pass a null as the pivotPoint, we will throw an ArgumentNullException.
- ArgumentOutOfRangeException
Passing an invalid degreeAngle which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which is not valid, it will throw an InvalidOperationException.
- NotImplementedException
In the event you attempt to call this method and the CanRotate property returns false, it will throw a NotImplementedException.
RotateCore(PointShape, double)
This method rotates a shape a number of degrees based on a pivot point.
protected virtual void RotateCore(PointShape pivotPoint, double degreeAngle)
Parameters
pivotPoint
PointShapeThe pivotPoint represents the center of rotation.
degreeAngle
doubleThe number of degrees of rotation required, from 0 to 360.
Remarks
This method rotates a shape by a number of degrees based on a pivot
point. By placing the pivot point in the center of the shape you can achieve
in-place rotation. By moving the pivot point outside of the center of the shape you
can translate the shape in a circular motion. Moving the pivot point further
outside of the center will make the circular area larger.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions
defined above.
Exceptions
- ArgumentNullException
If you pass a null as the pivotPoint, we will throw an ArgumentNullException.
- ArgumentOutOfRangeException
Passing an invalid degreeAngle which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which is not valid, it will throw an InvalidOperationException.
- NotImplementedException
In the event you attempt to call this method and the CanRotate property returns false, it will throw a NotImplementedException.
ScaleTo(double)
This method increases or decreases the size of the shape by the specified scale factor given in the parameter.
public void ScaleTo(double scale)
Parameters
scale
doublePepresents a value which scaleFactor to
Examples
RectangleShape rectangleShape = new RectangleShape(-10, 10, 10, -10);
rectangleShape.ScaleTo(rectangleShape, 0.5);
rectangleShape.ScaleTo(rectangleShape, 2);
Dim rectangleShape As New RectangleShape(-10, 10, 10, -10)
rectangleShape.ScaleTo(rectangleShape, 0.5)
rectangleShape.ScaleTo(rectangleShape, 2)
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
- ArgumentOutOfRangeException
Is you pass in the scale is not bigger than zero, it will throw ArgumentOutOfRangeException.
ScaleTo(BaseShape, double)
This method increases or decreases the size of the shape by the specified scale factor given in the parameter.
public static BaseShape ScaleTo(BaseShape baseShape, double scale)
Parameters
baseShape
BaseShapeRepresents a shape which you want to resize
scale
doublePepresents a value which scaleFactor to.
Returns
- BaseShape
This method is useful when you would like to increase or decrease the size of the shape.
Examples
RectangleShape rectangleShape = new RectangleShape(-10, 10, 10, -10);
RectangleShape smallerShape = BaseShape.ScaleTo(rectangleShape, 0.5) as RectangleShape;
RectangleShape biggerShape = BaseShape.ScaleTo(rectangleShape, 2) as RectangleShape;
Dim rectangleShape As New RectangleShape(-10, 10, 10, -10)
Dim smallerShape As RectangleShape = TryCast(BaseShape.ScaleTo(rectangleShape, 0.5), RectangleShape)
Dim biggerShape As RectangleShape = TryCast(BaseShape.ScaleTo(rectangleShape, 2), RectangleShape)
Remarks
It will call the instanced method ScaleTo internally.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Is you pass in the scale is not bigger than zero, it will throw ArgumentOutOfRangeException.
ScaleToCore(double)
This method increases or decreases the size of the shape by the specified scale factor given in the parameter.
protected virtual void ScaleToCore(double scale)
Parameters
scale
doublePepresents a value which scaleFactor to
Remarks
This protected virtual method is called from the concrete public method ScaleTo. It does not take into account any transaction activity, as this is the responsibility of the concrete public method ScaleTo. This way, as a developer, if you choose to override this method you do not have to consider transactions at all.
Exceptions
- ArgumentOutOfRangeException
Is you pass in the scale is not bigger than zero, it will throw ArgumentOutOfRangeException.
Touches(BaseShape)
This method returns if the current shape and the targetShape have at least one boundary point in common, but no interior points.
public bool Touches(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape 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 targetShape which is invalid, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
Touches(Feature)
This method returns of the current shape and the targetFeature have at least one boundary point in common, but no interior points.
public bool Touches(Feature targetFeature)
Parameters
targetFeature
FeatureThe targetFeature which contains a shape that you wish to compare the current one to.
Returns
- bool
This method returns of the current shape 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 targetShape which is invalid, we will throw an ArgumentException.
- ArgumentNullException
If you pass a null as the targetShape, we will throw an ArgumentNullException.
TouchesCore(BaseShape)
This method returns if the current shape and the targetShape have at least one boundary point in common, but no interior points.
protected virtual bool TouchesCore(BaseShape targetShape)
Parameters
targetShape
BaseShapeThe shape you wish to compare the current one to.
Returns
- bool
This method returns if the current shape and the targetShape have at least one boundary point in common, but no interior points.
Remarks
<br />
<br />
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.
- 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.
TranslateByDegree(double, double)
This method moves a base shape from one location to another based on a distance and a direction in degrees.
public void TranslateByDegree(double distance, double angleInDegrees)
Parameters
distance
doubleThe distance is the number of units to move the shape using the angle specified. The distance unit will be the DistanceUnit specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees
doubleA number between 0 and 360 degrees that represents the direction you wish to move the shape, with 0 being up.
Remarks
This method moves a base shape from one location to another based on angleInDegrees and distance parameter. With this overload, it is important to note that the distance is based on the supplied distanceUnit parameter. For example, if your shape is in decimal degrees and you call this method with a distanceUnit of miles, you're going to move this shape a number of miles based on the distance value and the angleInDegrees. In this way, you can easily move a shape in decimal degrees five miles to the north.
If you pass a distance of 0, then the operation is ignored.
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 angleInDegrees which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method from a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid distance which is not greater than or equal to 0 will throw an ArgumentOutOfRangeException.
TranslateByDegree(double, double, GeographyUnit, DistanceUnit)
This method moves a base shape from one location to another based on a distance and a direction in degrees.
public void TranslateByDegree(double distance, double angleInDegrees, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to move the shape using the angle specified. The distance unit will be the DistanceUnit specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees
doubleA number between 0 and 360 degrees that represents the direction you wish to move the shape, with 0 being up.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the DistanceUnit you would like to use as the measure of the translate. For example if you select miles as your distanceUnit then the distance will be calculated in miles.
Remarks
This method moves a base shape from one location to another based on angleInDegrees and distance parameter. With this overload, it is important to note that the distance is based on the supplied distanceUnit parameter. For example, if your shape is in decimal degrees and you call this method with a distanceUnit of miles, you're going to move this shape a number of miles based on the distance value and the angleInDegrees. In this way, you can easily move a shape in decimal degrees five miles to the north.
If you pass a distance of 0, then the operation is ignored.
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 angleInDegrees which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit 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 from a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid distance which is not greater than or equal to 0 will throw an ArgumentOutOfRangeException.
TranslateByDegree(BaseShape, double, double, GeographyUnit, DistanceUnit)
This method returns a shape repositioned from one location to another based on a distance and a direction in degrees.
public static BaseShape TranslateByDegree(BaseShape targetShape, double distance, double angleInDegrees, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetShape
BaseShapeThis parameter is the basis of the move.
distance
doubleThe distance is the number of units to move the shape using the angle specified. The distance unit will be the one specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees
doubleA number between 0 and 360 degrees that represents the direction you wish to move the shape, with 0 being up.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the distance will be calculated in miles.
Returns
- BaseShape
This method returns a shape repositioned from one location to another based on a distance and a direction in degrees.
Remarks
This method returns a shape repositioned from one location to another based on angleInDegrees and distance parameter. With this overload, it is important to note that the distance is based on the supplied distanceUnit parameter. For example, if your shape is in decimal degrees and you call this method with a distanceUnit of miles, you're going to move this shape a number of miles based on the distance value and the angleInDegrees. In this way, you can easily move a shape in decimal degrees five miles to the north.
If you pass a distance of 0, then the operation is ignored.
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 angleInDegrees which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit 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 from a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid distance which is not greater than or equal to 0 will throw an ArgumentOutOfRangeException.
TranslateByDegree(Feature, double, double, GeographyUnit, DistanceUnit)
This method returns a feature repositioned from one location to another, based on a distance and a direction in degrees.
public static BaseShape TranslateByDegree(Feature targetFeature, double distance, double angleInDegrees, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetFeature
FeatureThis parameter is the basis of the move.
distance
doubleThe distance is the number of units to move the shape using the angle specified. The distance unit will be the DistanceUnit specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees
doubleA number between 0 and 360 degrees that represents the direction you wish to move the feature, with 0 being up.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the distance will be calculated in miles.
Returns
- BaseShape
This method returns a feature repositioned from one location to another, based on a distance and a direction in degrees.
Remarks
This method returns a feature repositioned from one location to another based on angleInDegrees and distance parameter. With this overload, it is important to note that the distance is based on the supplied distanceUnit parameter. For example, if your shape is in decimal degrees and you call this method with a distanceUnit of miles, you're going to move this feature a number of miles based on the distance value and the angleInDegrees. In this way, you can easily move a shape in decimal degrees five miles to the north.
If you pass a distance of 0, then the operation is ignored.
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 angleInDegrees which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit 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 from a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid distance which is not greater than or equal to 0 will throw an ArgumentOutOfRangeException.
TranslateByDegreeCore(double, double, GeographyUnit, DistanceUnit)
This method moves a base shape from one location to another based on a distance and a direction in degrees.
protected virtual void TranslateByDegreeCore(double distance, double angleInDegrees, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
distance
doubleThe distance is the number of units to move the shape using the angle specified. The distance unit will be the DistanceUnit specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees
doubleA number between 0 and 360 degrees that represents the direction you wish to move the shape, with 0 being up.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the DistanceUnit you would like to use as the measure of the translate. For example if you select miles as your distanceUnit then the distance will be calculated in miles.
Remarks
This method moves a base shape from one location to another based on angleInDegrees and distance parameter. With this overload, it is important to note that the distance is based on the supplied distanceUnit parameter. For example, if your shape is in decimal degrees and you call this method with a distanceUnit of miles, you're going to move this shape a number of miles based on the distance value and the angleInDegrees. In this way, you can easily move a shape in decimal degrees five miles to the north.
If you pass a distance of 0 then the operation is ignored.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions
defined above.
Exceptions
- ArgumentOutOfRangeException
Passing an invalid angleInDegrees which is not between 0 and 360 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit 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 from a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid distance which is not greater than or equal to 0 will throw an ArgumentOutOfRangeException.
TranslateByOffset(double, double)
This method moves a base shape from one location to another based on an X and Y offset distance.
public void TranslateByOffset(double xOffsetDistance, double yOffsetDistance)
Parameters
xOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
yOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
Remarks
This method moves a base shape from one location to another based on an X
and Y offset distance. With this overload, it is important to note that the X and Y
offset units are based on the distanceUnit parameter. For example, if your shape
is in decimal degrees and you call this method with an X offset of 1 and a Y
offset of 1, you're going to move this shape one unit of the distanceUnit in
the horizontal direction and one unit of the distanceUnit in the vertical
direction. In this way, you can easily move a shape in decimal degrees five miles
on the X axis and 3 miles on the Y axis.
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 from a shape which has no points, it will throw an InvalidOperationException.
TranslateByOffset(double, double, GeographyUnit, DistanceUnit)
This method moves a base shape from one location to another based on an X and Y offset distance.
public void TranslateByOffset(double xOffsetDistance, double yOffsetDistance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
xOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
yOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
shapeUnit
GeographyUnitThis is the geographic unit of the base shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the xOffsetDistance and yOffsetDistance will be calculated in miles.
Remarks
This method moves a base shape from one location to another based on an X
and Y offset distance. With this overload, it is important to note that the X and Y
offset units are based on the distanceUnit parameter. For example, if your shape
is in decimal degrees and you call this method with an X offset of 1 and a Y
offset of 1, you're going to move this shape one unit of the distanceUnit in
the horizontal direction and one unit of the distanceUnit in the vertical
direction. In this way, you can easily move a shape in decimal degrees five miles
on the X axis and 3 miles on the Y axis.
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 distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method from a shape which has no points, it will throw an InvalidOperationException.
TranslateByOffset(BaseShape, double, double, GeographyUnit, DistanceUnit)
This method returns a shape repositioned from one location to another based on an X and Y offset distance.
public static BaseShape TranslateByOffset(BaseShape targetShape, double xOffsetDistance, double yOffsetDistance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetShape
BaseShapeThis parameter is the basis of the moved shape.
xOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
yOffsetDistance
doubleThis is the number of vertical units of movement in the distance unit specified in the distanceUnit parameter.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the xOffsetDistance and yOffsetDistance will be calculated in miles.
Returns
- BaseShape
This method returns a shape repositioned from one location to another based on an X and Y offset distance.
Remarks
This method returns a shape repositioned from one location to another based on an X
and Y offset distance. With this overload, it is important to note that the X and Y
offset units are based on the distanceUnit parameter. For example, if your shape
is in decimal degrees and you call this method with an X offset of 1 and a Y
offset of 1, you're going to move this shape one unit of the distanceUnit in
the horizontal direction and one unit of the distanceUnit in the vertical
direction. In this way, you can easily move a shape in decimal degrees five miles
on the X axis and 3 miles on the Y axis.
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 distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method from a shape which has no points, it will throw an InvalidOperationException.
TranslateByOffset(Feature, double, double, GeographyUnit, DistanceUnit)
This method returns a feature repositioned from one location to another based on an X and Y offset distance.
public static Feature TranslateByOffset(Feature targetFeature, double xOffsetDistance, double yOffsetDistance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
targetFeature
FeatureThis parameter is the basis of the moved feature.
xOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
yOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
shapeUnit
GeographyUnitThis is the geographic unit of the shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the xOffsetDistance and yOffsetDistance will be calculated in miles.
Returns
- Feature
This method returns a feature repositioned from one location to another based on an X and Y offset distance.
Remarks
This method returns a feature repositioned from one location to another based on an X
and Y offset distance. With this overload, it is important to note that the X and Y
offset units are based on the distanceUnit parameter. For example, if your shape
is in decimal degrees and you call this method with an X offset of 1 and a Y
offset of 1, you're going to move this shape one unit of the distanceUnit in
the horizontal direction and one unit of the distanceUnit in the vertical
direction. In this way, you can easily move a shape in decimal degrees five miles
on the X axis and 3 miles on the Y axis.
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 distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method from a shape which has no points, it will throw an InvalidOperationException.
TranslateByOffsetCore(double, double, GeographyUnit, DistanceUnit)
This method moves a base shape from one location to another based on an X and Y offset distance.
protected virtual void TranslateByOffsetCore(double xOffsetDistance, double yOffsetDistance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
Parameters
xOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
yOffsetDistance
doubleThis is the number of horizontal units of movement in the distance unit specified in the distanceUnit parameter.
shapeUnit
GeographyUnitThis is the geographic unit of the base shape you are performing the operation on.
distanceUnit
DistanceUnitThis is the distance unit you would like to use as the measure for the move. For example, if you select miles as your distance unit, then the xOffsetDistance and yOffsetDistance will be calculated in miles.
Remarks
This method moves a base shape from one location to another based on an X
and Y offset distance. With this overload, it is important to note that the X and Y
offset units are based on the distanceUnit parameter. For example, if your shape
is in decimal degrees and you call this method with an X offset of 1 and a Y
offset of 1, you're going to move this shape one unit of the distanceUnit in
the horizontal direction and one unit of the distanceUnit in the vertical
direction. In this way, you can easily move a shape in decimal degrees five miles
on the X axis and 3 miles on the Y axis.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions
defined above.
Exceptions
- ArgumentOutOfRangeException
If you pass in a distanceUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method from a shape which has no points, it will throw an InvalidOperationException.
Validate(ShapeValidationMode)
This method returns a ShapeValidationResult based on a series of tests.
public ShapeValidationResult Validate(ShapeValidationMode validationMode)
Parameters
validationMode
ShapeValidationModeThis parameter determines whether the test is simple or advanced. In some cases, the advanced tests can take some time. The simple test is designed to always be fast.
Returns
- ShapeValidationResult
This method returns a ShapeValidationResult based on a series of tests.
Remarks
We use this method, with the simple enumeration, internally before doing any kind
of other methods on the shape. In this way, we are able to verify the integrity of the
shape itself. If you wish to test things such as whether a polygon self-intersects, we invite
you to call this method with the advanced ShapeValidationMode. One thing to consider is
that for complex polygon shapes this operation could take some time, which is why we
only run the basic, faster test. If you are dealing with polygon shapes that are
suspect, we suggest you run the advanced test.
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 validationMode that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ValidateCore(ShapeValidationMode)
This method returns a ShapeValidationResult based on a series of tests.
protected virtual ShapeValidationResult ValidateCore(ShapeValidationMode validationMode)
Parameters
validationMode
ShapeValidationModeThis parameter determines whether the test is simple or advanced. In some cases, the advanced tests can take some time. The simple test is designed to always be fast.
Returns
- ShapeValidationResult
This method returns a ShapeValidationResult based on a series of tests.
Remarks
We use this method, with the simple enumeration, internally before doing any kind
of other methods on the shape. In this way, we are able to verify the integrity of the
shape itself. If you wish to test things such as whether a polygon self-intersects, we invite
you to call this method with the advanced ShapeValidationMode. One thing to consider is
that for complex polygon shapes this operation could take some time, which is why we
only run the basic, faster test. If you are dealing with polygon shapes that are
suspect, we suggest you run the advanced test.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentOutOfRangeException
If you pass in a validationMode that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.