Class AreaBaseShape
This abstract class is the root of all area-based shapes, such as RectangleShape and PolygonShape.
public abstract class AreaBaseShape : BaseShape
- Inheritance
-
AreaBaseShape
- Derived
- Inherited Members
Remarks
This class is used as the base class for area shapes such as:
PolygonShape
RectangleShape
MultiPolygonShape
EllipseShape
RingShape
It can be inherited from to create your own specialized area geometry. If you
choose to do this, your new class must conform to one of the well-known text standard
shapes in order for the base implementations to work properly.
Constructors
AreaBaseShape()
This is the default constructor for AreaBaseShape.
protected AreaBaseShape()
Remarks
This constructor simply calls the base constructor.
Methods
GetArea(int, AreaUnit)
public double GetArea(int shapeSrid, AreaUnit returningUnit)
Parameters
Returns
GetArea(int, AreaUnit, DistanceCalculationMode)
public double GetArea(int shapeSrid, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeSrid
intreturningUnit
AreaUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetArea(string, AreaUnit)
public double GetArea(string shapeProjString, AreaUnit returningUnit)
Parameters
Returns
GetArea(string, AreaUnit, DistanceCalculationMode)
public double GetArea(string shapeProjString, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjString
stringreturningUnit
AreaUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetArea(GeographyUnit, AreaUnit)
This method returns the area of the shape, defined as the size of the region enclosed by the figure.
public double GetArea(GeographyUnit shapeUnit, AreaUnit returningUnit)
Parameters
shapeUnit
GeographyUnitThis is the GeographyUnit of the shape you are performing the operation on.
returningUnit
AreaUnitThis is the AreaUnit you would like to use as the return value. For example, if you select square miles as your returningUnit, then the distance will be returned in square miles.
Returns
- double
The return unit is based on a AreaUnit you specify in the returningUnit parameter, regardless of the shape's GeographyUnit.
Remarks
You would use this method to find the area inside the shape.
Exceptions
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a returningUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
GetArea(Projection, AreaUnit)
public double GetArea(Projection shapeProjection, AreaUnit returningUnit)
Parameters
shapeProjection
ProjectionreturningUnit
AreaUnit
Returns
GetArea(Projection, AreaUnit, DistanceCalculationMode)
public double GetArea(Projection shapeProjection, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjection
ProjectionreturningUnit
AreaUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetAreaCore(GeographyUnit, AreaUnit)
This method returns the area of the shape, defined as the size of the region enclosed by the figure.
protected virtual double GetAreaCore(GeographyUnit shapeUnit, AreaUnit returningUnit)
Parameters
shapeUnit
GeographyUnitThis is the GeographyUnit of the shape you are performing the operation on.
returningUnit
AreaUnitThis is the AreaUnit you would like to use as the return value. For example, if you select square miles as your returningUnit, then the distance will be returned in square miles.
Returns
- double
The return unit is based on a AreaUnit you specify in the returningUnit parameter, regardless of the shape's GeographyUnit.
Remarks
You would use this method to find the area inside the shape.
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 an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a returningUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
GetAreaCore(Projection, AreaUnit, DistanceCalculationMode)
protected virtual double GetAreaCore(Projection shapeProjection, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjection
ProjectionreturningUnit
AreaUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetConvexHull()
This method returns the convex hull of the shape, defined as the smallest convex ring that contains all of the points in the shape.
public RingShape GetConvexHull()
Returns
- RingShape
This method returns the convex hull of the shape, defined as the smallest convex ring that contains all of the points in the shape.
Remarks
This method is useful when you want to create a perimeter around the shape. For example, if you had a MultiPolygon that represented buildings on a campus, you could easily get the convex hull of the buildings and determine the perimeter of all of the buildings together. This also works with MultiPoint shapes, where each point may represent a certain type of person you are doing statistics on. With convex hull, you can get an idea of the regions those points are located in.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
GetConvexHullCore()
This method returns the convex hull of the shape, defined as the smallest convex ring that contains all of the points in the shape.
protected virtual RingShape GetConvexHullCore()
Returns
- RingShape
This method returns the convex hull of the shape, defined as the smallest convex ring that contains all of the points in the shape.
Remarks
This method is useful when you want to create a perimeter around the shape. For
example, if you had a MultiPolygon that represented buildings on a campus, you could
easily get the convex hull of the buildings and determine the perimeter of all of the
buildings together. This also works with MultiPoint shapes, where each point may
represent a certain type of person you are doing statistics on. With convex hull, you
can get an idea of the regions those points are located in.
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.
GetDifference(AreaBaseShape)
This method returns the difference between two shapes, defined as the set of all points which lie in the current shape but not in the targetShape.
public MultipolygonShape GetDifference(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape but not in the targetShape.
Remarks
None
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.
GetDifference(Feature)
This method returns the difference between current shape and the specified feature, defined as the set of all points which lie in the current shape but not in the targetShape.
public MultipolygonShape GetDifference(Feature targetFeature)
Parameters
targetFeature
FeatureThe feture you are trying to find the difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape but not in the target feature.
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.
GetDifferenceCore(AreaBaseShape)
This method returns the difference between two shapes, defined as the set of all points which lie in the current shape but not in the targetShape.
protected virtual MultipolygonShape GetDifferenceCore(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape but not in the targetShape.
Remarks
<br />
<br />
<br />
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.
GetIntersection(AreaBaseShape)
This method returns the intersection of the current shape and the target shape, defined as the set of all points which lie in both the current shape and the target shape.
public MultipolygonShape GetIntersection(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the intersection with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in both the current shape and the target shape.
Remarks
None
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.
GetIntersection(Feature)
This method returns the intersection of the current shape and the target feature, defined as the set of all points which lie in both the current shape and the target feature.
public MultipolygonShape GetIntersection(Feature targetFeature)
Parameters
targetFeature
FeatureThe feature you are trying to find the intersection with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in both the current shape and the target feature.
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.
GetIntersectionCore(AreaBaseShape)
This method returns the intersection of the current shape and the target shape, defined as the set of all points which lie in both the current shape and the target shape.
protected virtual MultipolygonShape GetIntersectionCore(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the intersection with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in both the current shape and the target shape.
Remarks
<br />
<br />
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.
GetPerimeter(int, DistanceUnit)
public double GetPerimeter(int shapeSrid, DistanceUnit returningUnit)
Parameters
shapeSrid
intreturningUnit
DistanceUnit
Returns
GetPerimeter(int, DistanceUnit, DistanceCalculationMode)
public double GetPerimeter(int shapeSrid, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeSrid
intreturningUnit
DistanceUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetPerimeter(string, DistanceUnit)
public double GetPerimeter(string shapeProjString, DistanceUnit returningUnit)
Parameters
shapeProjString
stringreturningUnit
DistanceUnit
Returns
GetPerimeter(string, DistanceUnit, DistanceCalculationMode)
public double GetPerimeter(string shapeProjString, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjString
stringreturningUnit
DistanceUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetPerimeter(GeographyUnit, DistanceUnit)
This method returns the perimeter of the shape, defined as the sum of the lengths of all its sides.
public double GetPerimeter(GeographyUnit shapeUnit, DistanceUnit returningUnit)
Parameters
shapeUnit
GeographyUnitThis is the GeographyUnit of the shape you are performing the operation on.
returningUnit
DistanceUnitThis is the DistanceUnit you would like to use as the return value. For example, if you select miles as your returningUnit, then the distance will be returned in miles.
Returns
- double
The return unit is based on a LengthUnit you specify in the returningUnit parameter, regardless of the shape's GeographyUnit.
Remarks
You would use this method to find the distance around the area shape.
Exceptions
- ArgumentOutOfRangeException
If you pass in a shapeUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a returningUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
GetPerimeter(Projection, DistanceUnit)
public double GetPerimeter(Projection shapeProjection, DistanceUnit returningUnit)
Parameters
shapeProjection
ProjectionreturningUnit
DistanceUnit
Returns
GetPerimeter(Projection, DistanceUnit, DistanceCalculationMode)
public double GetPerimeter(Projection shapeProjection, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjection
ProjectionreturningUnit
DistanceUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetPerimeterCore(GeographyUnit, DistanceUnit)
This method returns the perimeter of the shape, defined as the sum of the lengths of all its sides.
protected virtual double GetPerimeterCore(GeographyUnit shapeUnit, DistanceUnit returningUnit)
Parameters
shapeUnit
GeographyUnitThis is the GeographyUnit of the shape you are performing the operation on.
returningUnit
DistanceUnitThis is the DistanceUnit you would like to use as the return value. For example, if you select miles as your returningUnit, then the distance will be returned in miles.
Returns
- double
The return unit is based on a LengthUnit you specify in the returningUnit parameter, regardless of the shape's GeographyUnit.
Remarks
You would use this method to find the distance around the area shape.
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 an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
If you pass in a returningUnit that is not defined in the enumeration, it will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
GetPerimeterCore(Projection, DistanceUnit, DistanceCalculationMode)
protected virtual double GetPerimeterCore(Projection shapeProjection, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters
shapeProjection
ProjectionreturningUnit
DistanceUnitdistanceCalculationMode
DistanceCalculationMode
Returns
GetSymmetricalDifference(AreaBaseShape)
This method returns the symmetrical difference between two shapes, defined as the set of all points which lie in the current shape or the targetShape but not both.
public MultipolygonShape GetSymmetricalDifference(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the symmetrical difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape or the targetShape but not both.
Remarks
None
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.
GetSymmetricalDifference(Feature)
This method returns the symmetrical difference between current shape and the specified feature, defined as the set of all points which lie in the current shape or the targetFeature but not both.
public MultipolygonShape GetSymmetricalDifference(Feature targetFeature)
Parameters
targetFeature
FeatureThe feature you are trying to find the symmetrical difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape or the targetFeature but not both.
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.
GetSymmetricalDifferenceCore(AreaBaseShape)
This method returns the symmetrical difference between two shapes, defined as the set of all points which lie in the current shape or the targetShape but not both.
protected virtual MultipolygonShape GetSymmetricalDifferenceCore(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the symmetrical difference with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that is the set of all points which lie in the current shape or the targetShape but not both.
Remarks
<br />
<br />
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.
ScaleDown(double)
This method decreases the size of the area shape by the percentage given in the percentage parameter.
public void ScaleDown(double percentage)
Parameters
percentage
doubleThis is the percentage by which to decrease the shape's size.
Remarks
This method is useful when you would like to decrease the size of the shape. Note that a larger percentage will scale the shape down faster, since you apply the operation multiple times. There is a ScaleUp method that will enlarge the shape as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
ScaleDown(AreaBaseShape, double)
This method returns a new area shape that has been scaled down by the percentage given in the percentage parameter.
public static AreaBaseShape ScaleDown(AreaBaseShape targetShape, double percentage)
Parameters
targetShape
AreaBaseShapeThis parameter is the shape to use as the base for the scaling.
percentage
doubleThis is the percentage by which to decrease the shape's size.
Returns
- AreaBaseShape
This method is useful when you would like to decrease the size of the shape. Note that a larger percentage will scale the shape down faster, since you apply the operation multiple times. There is a ScaleUp method that will enlarge the shape as well.
Remarks
This method is useful when you would like to decrease the size of the shape. Note that a larger percentage will scale the shape down faster, since you apply the operation multiple times. There is a ScaleUp method that will enlarge the shape as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
ScaleDown(Feature, double)
This method returns a new area feature that has been scaled down by the percentage given in the percentage parameter.
public static Feature ScaleDown(Feature targetFeature, double percentage)
Parameters
targetFeature
FeatureThis parameter is the shape to use as the base for the scaling.
percentage
doubleThis is the percentage by which to decrease the shape's size.
Returns
- Feature
This method is useful when you would like to decrease the size of the feature. Note that a larger percentage will scale the shape down faster, since you apply the operation multiple times. There is a ScaleUp method that will enlarge the shape as well.
Remarks
This method is useful when you would like to decrease the size of the feature. Note that a larger percentage will scale the shape down faster, since you apply the operation multiple times. There is a ScaleUp method that will enlarge the shape as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
ScaleDownCore(double)
This method decreases the size of the area shape by the percentage given in the percentage parameter.
protected virtual void ScaleDownCore(double percentage)
Parameters
percentage
doubleThis is the percentage by which to decrease the shape's size.
Remarks
This method is useful when you would like to decrease the size of the shape. Note
that a larger percentage will scale the shape down faster, since you apply the operation
multiple times. There is a ScaleUp method that will enlarge the shape as
well.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentOutOfRangeException
Passing an invalid percentage which less than 0 will thrown an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
ScaleUp(double)
This method increases the size of the area shape by the percentage given in the percentage parameter.
public void ScaleUp(double percentage)
Parameters
percentage
doubleThis is the percentage by which to increase the shape's size.
Remarks
This method is useful when you would like to increase the size of the shape. Note that a larger percentage will scale the shape up faster, since you apply the operation multiple times. There is a ScaleDown method that will shrink the shape. as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is not between 0 and 100 will throw an ArgumentOutOfRangeException.
ScaleUp(AreaBaseShape, double)
This method returns a new area shape that has been scaled up by the percentage given in the percentage parameter.
public static AreaBaseShape ScaleUp(AreaBaseShape targetShape, double percentage)
Parameters
targetShape
AreaBaseShapeThis parameter is the shape to use as the base for the scaling.
percentage
doubleThis is the percentage by which to increase the shape's size.
Returns
Remarks
This method is useful when you would like to increase the size of the shape. Note that a larger percentage will scale the shape up faster, since you apply the operation multiple times. There is a ScaleDown method that will shrink the shape as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is not between 0 and 100 will throw an ArgumentOutOfRangeException.
ScaleUp(Feature, double)
This method returns a new area shape that has been scaled up by the percentage given in the percentage parameter.
public static Feature ScaleUp(Feature targetFeature, double percentage)
Parameters
targetFeature
FeatureThis parameter is the feature to use as the base for the scaling.
percentage
doubleThis is the percentage by which to increase the shape's size.
Returns
Remarks
This method is useful when you would like to increase the size of the shape. Note that a larger percentage will scale the shape up faster, since you apply the operation multiple times. There is a ScaleDown method that will shrink the shape as well.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid percentage that is not between 0 and 100 will throw an ArgumentOutOfRangeException.
ScaleUpCore(double)
This method increases the size of the area shape by the percentage given in the percentage parameter.
protected virtual void ScaleUpCore(double percentage)
Parameters
percentage
doubleThis is the percentage by which to increase the shape's size.
Remarks
This method is useful when you would like to increase the size of the shape. Note
that a larger percentage will scale the shape up faster, since you apply the operation
multiple times. There is a ScaleDown method that will shrink the shape as
well.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined
above.
Exceptions
- ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Simplify(double, SimplificationType)
This method performed a simplification operation based on the parameters passed in. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.
public MultipolygonShape Simplify(double tolerance, SimplificationType simplificationType)
Parameters
tolerance
doubleThis parameter specifes the tolerance to be used when simplification.
simplificationType
SimplificationTypeThis prameter specifies the type of simplification operation.
Returns
- MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
Simplify(AreaBaseShape, double, SimplificationType)
This method performed a simplification operation based on the parameters passed in. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.
public static MultipolygonShape Simplify(AreaBaseShape targetShape, double tolerance, SimplificationType simplificationType)
Parameters
targetShape
AreaBaseShapeThis parameter specifies the area shape to be simplfied.
tolerance
doubleThis parameter specifes the tolerance to be used when simplification.
simplificationType
SimplificationTypeThis prameter specifies the type of simplification operation.
Returns
- MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
Simplify(AreaBaseShape, GeographyUnit, double, DistanceUnit, SimplificationType)
This method performed a simplification operation based on the parameters passed in. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.
public static MultipolygonShape Simplify(AreaBaseShape targetShape, GeographyUnit targetShapeUnit, double tolerance, DistanceUnit toleranceUnit, SimplificationType simplificationType)
Parameters
targetShape
AreaBaseShapeThis parameter specifies the area shape to be simplfied.
targetShapeUnit
GeographyUnitThis parameter specifies the geographic unit of the shape you are performing the operation
tolerance
doubleThis parameter specifes the tolerance to be used when simplification.
toleranceUnit
DistanceUnitThis parameter specifes the distance unit of the tolerance.
simplificationType
SimplificationTypeThis prameter specifies the type of simplification operation.
Returns
- MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
Simplify(GeographyUnit, double, DistanceUnit, SimplificationType)
This method performed a simplification operation based on the parameters passed in. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.
public MultipolygonShape Simplify(GeographyUnit shapeUnit, double tolerance, DistanceUnit toleranceUnit, SimplificationType simplificationType)
Parameters
shapeUnit
GeographyUnitThis parameter specifies the geographic unit of this current shape you are performing the operation
tolerance
doubleThis parameter specifes the tolerance to be used when simplification.
toleranceUnit
DistanceUnitThis parameter specifes the distance unit of the tolerance.
simplificationType
SimplificationTypeThis prameter specifies the type of simplification operation.
Returns
- MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
SimplifyCore(double, SimplificationType)
This method performed a simplification operation based on the parameters passed in. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.
protected virtual MultipolygonShape SimplifyCore(double tolerance, SimplificationType simplificationType)
Parameters
tolerance
doubleThis parameter specifes the tolerance to be used when simplification.
simplificationType
SimplificationTypeThis prameter specifies the type of simplification operation.
Returns
- MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
Snap(IEnumerable<AreaBaseShape>, GeographyUnit, double, DistanceUnit)
Simplify the Shapes by snapping vertexes based on specified tolerance distance.
public static Collection<PolygonShape> Snap(IEnumerable<AreaBaseShape> shapes, GeographyUnit shapeUnit, double snappingTolerance, DistanceUnit toleranceUnit)
Parameters
shapes
IEnumerable<AreaBaseShape>target shapes which will be simplified
shapeUnit
GeographyUnitthe geography unit of the target shapes
snappingTolerance
doubledistance tolerance
toleranceUnit
DistanceUnitthe distance unit of tolerance
Returns
- Collection<PolygonShape>
Simplified lineshape depends on distance tolerance of each vertexes.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on an empty ineBaseShapes collection, it will throw an InvalidOperationException.
- ArgumentOutOfRangeException
Passing an invalid tolerance which is less than 0 will thrown an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
Passing an invalid shapeUnit will thrown an ArgumentOutOfRangeException.
- ArgumentOutOfRangeException
Passing an invalid toleranceUnit will thrown an ArgumentOutOfRangeException.
Split(AreaBaseShape, AreaBaseShape)
This method returns a collection of MultiPolygonShapes split by the specified parameters.
public static Collection<MultipolygonShape> Split(AreaBaseShape areaToSplit, AreaBaseShape areaToSplitBy)
Parameters
areaToSplit
AreaBaseShapeThis parameter represents the shape to be split.
areaToSplitBy
AreaBaseShapeThis parameter represents the shape that will be used to perform the split.
Returns
- Collection<MultipolygonShape>
This method returns a collection of MultiPolygonShape split by the specified parameters.
Remarks
None.
Split(Feature, Feature)
This method returns a collection of Features split by the specified parameters.
public static Collection<Feature> Split(Feature areaToSplit, Feature areaToSplitBy)
Parameters
areaToSplit
FeatureThis parameter represents the feature to be split.
areaToSplitBy
FeatureThis parameter represents the feature that will be used to perform the split.
Returns
- Collection<Feature>
This method returns a collection of Features split by the specified parameters.
Remarks
None.
Union(IEnumerable<AreaBaseShape>)
This method returns the union of the specified area shapes.
public static MultipolygonShape Union(IEnumerable<AreaBaseShape> areaShapes)
Parameters
areaShapes
IEnumerable<AreaBaseShape>The shapes you are trying to find the union with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points that lie within the shapes you specified.
Remarks
This is useful for adding area shapes together to form a larger area
shape.
Exceptions
- ArgumentNullException
If you pass a null as the areaShapes, we will throw an ArgumentNullException.
Union(IEnumerable<Feature>)
This method returns the union of the current shape and the target features, defined as the set of all points in the current shape or the target features.
public static MultipolygonShape Union(IEnumerable<Feature> targetFeatures)
Parameters
targetFeatures
IEnumerable<Feature>The target features you are trying to find the union with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in the current shape or the target features.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
Remarks
This is useful for adding area shapes together to form a larger area
shape.
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 targetFeatures, 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.
Union(AreaBaseShape)
This method returns the union of the current shape and the target shape, defined as the set of all points in the current shape or the target shape.
public virtual MultipolygonShape Union(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the union with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in the current shape or the target shape.
Remarks
This is useful for adding area shapes together to form a larger area shape.
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.
Union(Feature)
This method returns the union of the current shape and the target feature, defined as the set of all points in the current shape or the target feature.
public MultipolygonShape Union(Feature targetFeature)
Parameters
targetFeature
FeatureThe feature you are trying to find the union with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in the current shape or the target feature.
Remarks
This is useful for adding area shapes together to form a larger area shape.
Exceptions
- InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
UnionCore(AreaBaseShape)
This method returns the union of the current shape and the target shapes, defined as the set of all points in the current shape or the target shape.
protected virtual MultipolygonShape UnionCore(AreaBaseShape targetShape)
Parameters
targetShape
AreaBaseShapeThe shape you are trying to find the union with.
Returns
- MultipolygonShape
The return type is a MultiPolygonShape that contains the set of all points which lie in the current shape or the target shape.
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
Remarks
This is useful for adding area shapes together to form a larger area
shape.
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.