AreaBaseShape¶
Namespace: ThinkGeo.Core
This abstract class is the root of all area-based shapes, such as RectangleShape and PolygonShape.
public abstract class AreaBaseShape : BaseShape
Inheritance Object → BaseShape → AreaBaseShape
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.
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¶
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 GeographyUnit
This is the GeographyUnit of the shape you are performing the operation
on.
returningUnit DistanceUnit
This 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¶
The return unit is based on a LengthUnit you specify in the returningUnit
parameter, regardless of the shape's GeographyUnit.
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.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
You would use this method to find the distance around the area shape.
GetPerimeterCore(GeographyUnit, DistanceUnit)¶
This method returns the perimeter of the shape, defined as the sum of the lengths of all its sides.
protected double GetPerimeterCore(GeographyUnit shapeUnit, DistanceUnit returningUnit)
Parameters¶
shapeUnit GeographyUnit
This is the GeographyUnit of the shape you are performing the operation
on.
returningUnit DistanceUnit
This 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¶
The return unit is based on a LengthUnit you specify in the returningUnit
parameter, regardless of the shape's GeographyUnit.
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.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
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.
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 GeographyUnit
This is the GeographyUnit of the shape you are performing the operation
on.
returningUnit AreaUnit
This 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¶
The return unit is based on a AreaUnit you specify in the returningUnit
parameter, regardless of the shape's GeographyUnit.
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.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
You would use this method to find the area inside the shape.
GetAreaCore(GeographyUnit, AreaUnit)¶
This method returns the area of the shape, defined as the size of the region enclosed by the figure.
protected double GetAreaCore(GeographyUnit shapeUnit, AreaUnit returningUnit)
Parameters¶
shapeUnit GeographyUnit
This is the GeographyUnit of the shape you are performing the operation
on.
returningUnit AreaUnit
This 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¶
The return unit is based on a AreaUnit you specify in the returningUnit
parameter, regardless of the shape's GeographyUnit.
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.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
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.
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 AreaBaseShape
This parameter is the shape to use as the base for the scaling.
percentage Double
This is the percentage by which to increase the shape's size.
Returns¶
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.
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.
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 Feature
This parameter is the feature to use as the base for the scaling.
percentage Double
This is the percentage by which to increase the shape's size.
Returns¶
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.
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.
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 Double
This is the percentage by which to increase the shape's size.
Exceptions¶
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.
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.
GetArea(Int32, AreaUnit)¶
public double GetArea(int shapeSrid, AreaUnit returningUnit)
Parameters¶
shapeSrid Int32
returningUnit AreaUnit
Returns¶
GetArea(String, AreaUnit)¶
public double GetArea(string shapeProjString, AreaUnit returningUnit)
Parameters¶
shapeProjString String
returningUnit AreaUnit
Returns¶
GetArea(Projection, AreaUnit)¶
public double GetArea(Projection shapeProjection, AreaUnit returningUnit)
Parameters¶
shapeProjection Projection
returningUnit AreaUnit
Returns¶
GetArea(Int32, AreaUnit, DistanceCalculationMode)¶
public double GetArea(int shapeSrid, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeSrid Int32
returningUnit AreaUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetArea(String, AreaUnit, DistanceCalculationMode)¶
public double GetArea(string shapeProjString, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjString String
returningUnit AreaUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetArea(Projection, AreaUnit, DistanceCalculationMode)¶
public double GetArea(Projection shapeProjection, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjection Projection
returningUnit AreaUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetAreaCore(Projection, AreaUnit, DistanceCalculationMode)¶
protected double GetAreaCore(Projection shapeProjection, AreaUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjection Projection
returningUnit AreaUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetPerimeter(Int32, DistanceUnit)¶
public double GetPerimeter(int shapeSrid, DistanceUnit returningUnit)
Parameters¶
shapeSrid Int32
returningUnit DistanceUnit
Returns¶
GetPerimeter(String, DistanceUnit)¶
public double GetPerimeter(string shapeProjString, DistanceUnit returningUnit)
Parameters¶
shapeProjString String
returningUnit DistanceUnit
Returns¶
GetPerimeter(Projection, DistanceUnit)¶
public double GetPerimeter(Projection shapeProjection, DistanceUnit returningUnit)
Parameters¶
shapeProjection Projection
returningUnit DistanceUnit
Returns¶
GetPerimeter(Int32, DistanceUnit, DistanceCalculationMode)¶
public double GetPerimeter(int shapeSrid, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeSrid Int32
returningUnit DistanceUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetPerimeter(String, DistanceUnit, DistanceCalculationMode)¶
public double GetPerimeter(string shapeProjString, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjString String
returningUnit DistanceUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetPerimeter(Projection, DistanceUnit, DistanceCalculationMode)¶
public double GetPerimeter(Projection shapeProjection, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjection Projection
returningUnit DistanceUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
GetPerimeterCore(Projection, DistanceUnit, DistanceCalculationMode)¶
protected double GetPerimeterCore(Projection shapeProjection, DistanceUnit returningUnit, DistanceCalculationMode distanceCalculationMode)
Parameters¶
shapeProjection Projection
returningUnit DistanceUnit
distanceCalculationMode DistanceCalculationMode
Returns¶
ScaleUpCore(Double)¶
This method increases the size of the area shape by the percentage given in the percentage parameter.
protected void ScaleUpCore(double percentage)
Parameters¶
percentage Double
This is the percentage by which to increase the shape's size.
Exceptions¶
ArgumentOutOfRangeException
Passing an invalid percentage that is less than 0 will throw an ArgumentOutOfRangeException.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
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.
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 AreaBaseShape
This parameter is the shape to use as the base for the scaling.
percentage Double
This is the percentage by which to decrease the shape's size.
Returns¶
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.
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.
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 Feature
This parameter is the shape to use as the base for the scaling.
percentage Double
This is the percentage by which to decrease the shape's size.
Returns¶
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.
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.
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 Double
This is the percentage by which to decrease the shape's size.
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.
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.
ScaleDownCore(Double)¶
This method decreases the size of the area shape by the percentage given in the percentage parameter.
protected void ScaleDownCore(double percentage)
Parameters¶
percentage Double
This is the percentage by which to decrease the shape's size.
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.
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.
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¶
This method returns the convex hull of the shape, defined as the smallest convex
ring that contains all of the points in the shape.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
This method 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.
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 RingShape GetConvexHullCore()
Returns¶
This method returns the convex hull of the shape, defined as the smallest convex
ring that contains all of the points in the shape.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
This method 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.
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 AreaBaseShape
The shape you are trying to find the intersection with.
Returns¶
The return type is a MultiPolygonShape that contains the set of all points which
lie in both the current shape and the target 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.
Remarks:
None
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 Feature
The feature you are trying to find the intersection with.
Returns¶
The return type is a MultiPolygonShape that contains the set of all points which
lie in both the current shape and the target feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
None
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 MultipolygonShape GetIntersectionCore(AreaBaseShape targetShape)
Parameters¶
targetShape AreaBaseShape
The shape you are trying to find the intersection with.
Returns¶
The return type is a MultiPolygonShape that contains the set of all points which
lie in both the current shape and the target 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.
Remarks:
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
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 MultipolygonShape Union(AreaBaseShape targetShape)
Parameters¶
targetShape AreaBaseShape
The shape you are trying to find the union with.
Returns¶
The return type is a MultiPolygonShape that contains the set of all points which
lie in the current shape or the target 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.
Remarks:
This is useful for adding area shapes together to form a larger area shape.
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 Feature
The feature you are trying to find the union with.
Returns¶
The return type is a MultiPolygonShape that contains the set of all points which
lie in the current shape or the target feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
This is useful for adding area shapes together to form a larger area shape.
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 MultipolygonShape UnionCore(AreaBaseShape targetShape)
Parameters¶
targetShape AreaBaseShape
The shape you are trying to find the union with.
Returns¶
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.
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.
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.
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¶
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.
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.
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.
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¶
The return type is a MultiPolygonShape that contains the set of all points that
lie within the shapes you specified.
Exceptions¶
ArgumentNullException
If you pass a null as the areaShapes, we will throw an ArgumentNullException.
Remarks:
This is useful for adding area shapes together to form a larger area shape.
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 AreaBaseShape
The shape you are trying to find the difference with.
Returns¶
The return type is a MultiPolygonShape that is the set of all points which lie in
the current shape but not in the targetShape.
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.
Remarks:
None
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 Feature
The feture you are trying to find the difference with.
Returns¶
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.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
None
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 MultipolygonShape GetDifferenceCore(AreaBaseShape targetShape)
Parameters¶
targetShape AreaBaseShape
The shape you are trying to find the difference with.
Returns¶
The return type is a MultiPolygonShape that is the set of all points which lie in
the current shape but not in the targetShape.
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.
Remarks:
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
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 AreaBaseShape
The shape you are trying to find the symmetrical difference with.
Returns¶
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.
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.
Remarks:
None
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 Feature
The feature you are trying to find the symmetrical difference with.
Returns¶
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.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
None
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 MultipolygonShape GetSymmetricalDifferenceCore(AreaBaseShape targetShape)
Parameters¶
targetShape AreaBaseShape
The shape you are trying to find the symmetrical difference with.
Returns¶
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.
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.
In the event you attempt to call this method on a shape which has no points, it will throw an InvalidOperationException.
Remarks:
Overriding:
Please ensure that you validate the parameters being passed in and raise the exceptions defined above.
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 AreaBaseShape
This parameter represents the shape to be split.
areaToSplitBy AreaBaseShape
This parameter represents the shape that will be used to perform the split.
Returns¶
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 Feature
This parameter represents the feature to be split.
areaToSplitBy Feature
This parameter represents the feature that will be used to perform the split.
Returns¶
This method returns a collection of Features split by the specified
parameters.
Remarks:
None.
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 AreaBaseShape
This parameter specifies the area shape to be simplfied.
targetShapeUnit GeographyUnit
This parameter specifies the geographic unit of the shape you are performing the operation
tolerance Double
This parameter specifies the tolerance to be used when simplification.
toleranceUnit DistanceUnit
This parameter specifies the distance unit of the tolerance.
simplificationType SimplificationType
This 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 AreaBaseShape
This parameter specifies the area shape to be simplfied.
tolerance Double
This parameter specifies the tolerance to be used when simplification.
simplificationType SimplificationType
This 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 GeographyUnit
This parameter specifies the geographic unit of this current shape you are performing the operation
tolerance Double
This parameter specifies the tolerance to be used when simplification.
toleranceUnit DistanceUnit
This parameter specifies the distance unit of the tolerance.
simplificationType SimplificationType
This prameter specifies the type of simplification operation.
Returns¶
MultipolygonShape
This method returns a simplification multipolgyon by the specified parameters.
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 Double
This parameter specifies the tolerance to be used when simplification.
simplificationType SimplificationType
This 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 MultipolygonShape SimplifyCore(double tolerance, SimplificationType simplificationType)
Parameters¶
tolerance Double
This parameter specifies the tolerance to be used when simplification.
simplificationType SimplificationType
This 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 GeographyUnit
the geography unit of the target shapes
snappingTolerance Double
distance tolerance
toleranceUnit DistanceUnit
the 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.