RectangleClipOperator Class
Represents an operator that clips features with a rectangle.
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CECore assembly)
Syntax
public class RectangleClipOperator : UnaryOperator
Remarks
A RectangleClipOperator clips vector and raster features with a rectangle. If the operation results in several pieces, then new features are created with the same attributes.
Raster features are normally clipped to the nearest cell border outside the clip rectangle, but you can get more exact clipping if you let RealignRasters be True.
Line features that are clipped will be given attributes clippedAtBeginning and/or clippedAtEnd set to True to indicate which part of the line was clipped.
clippedAtBeginning and clippedAtEnd will be either True or undefined; they will not be set to False to indicate that a line feature has not been clipped.
If an explicit clip rectangle is used, by setting the RectangleSource property to Argument and the Rectangle property to the clip rectangle, then its corners are interpreted as coordinates in the coordinate reference system of the input features. This design makes it possible to clip without reprojection, but all input features should be defined in the same coordinate reference system, otherwise the RectangleClipOperator does not make much sense. If all input features originate from the same ReadOperator, all is well, but if there is a FunnelOperator that merges data streams from several operator chains before the RectangleClipOperator, then you should insert a ProjectOperator with an explicit coordinate reference system between the FunnelOperator and the RectangleClipOperator.
If the clipping rectangle comes from the View, it will be expressed in the coordinate reference system of the View - originally. However, each input feature will be clipped in its own coordinate reference system. Therefore, the operator must project the original rectangle to the coordinate reference system of the input feature. The contour of the original rectangle may not be shaped as a rectangle when it has been projected, so the operator uses some rectangle that covers the projected contour. In fact, two rectangles may be needed, for example if the original rectangle crosses meridian 180 and the input feature is defined in Crs.Wgs84LongLat. As a result, clipped features objects may have parts outside the original clip rectangle. To avoid this effect, you can use a ProjectOperator without an explicit coordinate reference system to ensure that input features have the same coordinate reference system as the View. For images, see When are things reprojected?.
Inheritance Hierarchy
System.Object (not available in C#)
EngineObject
Operator
UnaryOperator
RectangleClipOperator
Platforms
Windows, Linux, Android
RectangleClipOperator Members
The RectangleClipOperator type has the following members.
Constructors
Name | Description |
---|---|
RectangleClipOperator | Initializes a new instance of the RectangleClipOperator class. |
Properties
Name | Description |
---|---|
Description | Gets or sets a short description of the operator. Inherited from Operator |
DisplayName | Gets or sets a display name for the operator. Inherited from Operator |
Input | Gets or sets the input operator, from which this operator reads features. Inherited from UnaryOperator |
IsDisposed | Gets a value that tells whether the current RectangleClipOperator has been disposed. Inherited from EngineObject |
IsoMetadataDocument | Gets or sets the path to an ISO 19139 metadata document for the operator. Inherited from Operator |
Name | Gets or sets the name of the operator. Inherited from Operator |
NativeHandle | Gets the native Carmenta Engine kernel object the current RectangleClipOperator represents. Inherited from EngineObject |
PixelMargin | Gets or sets the margin that the clip rectangle will be extended by. |
RealignRasters | Gets or sets a value that determines whether clipped rasters will be aligned with the clip rectangle. |
Rectangle | Gets or sets an explicit clip rectangle. |
RectangleSource | Gets or sets a value that determines which rectangle features will be clipped with. |
IUserProperties.UserProperties | Gets the AttributeSet that contains the user properties. Inherited from IUserProperties |
Methods
Name | Description |
---|---|
Clone | Creates a copy of an object. Inherited from EngineObject |
Dispose | Releases the reference to the native Carmenta Engine kernel instance the EngineObject represents. Inherited from EngineObject |
Equals | Determines whether this instance is equal to another. Inherited from EngineObject |
FindChildObject | Overloaded. Finds the child object with the specified name. Inherited from Operator |
FlushCache | Marks the layer as flushed which will release cached resources during the next update. Inherited from Operator |
GetChildObjects | Overloaded. Gets the child objects of the current object. Inherited from Operator |
GetFeatures | Overloaded. Gets features from the operator chain. Inherited from Operator |
GetLocalizedDescription | Gets a localized version of the operator description in a specific language. Inherited from Operator |
GetLocalizedDisplayName | Gets a localized version of the operator display name in a specific language. Inherited from Operator |
GetLocalizedIsoMetadataDocument | Gets the path to an ISO 19139 metadata document for a specific language. Inherited from Operator |
GetRasterFeature | Overloaded. Gets raster features from the operator chain and merges them into a single raster. Inherited from Operator |
HasLocalizedDescription | Checks if a localized version of the operator description is available in a specific language. Inherited from Operator |
HasLocalizedDisplayName | Checks if a localized version of the operator display name is available in a specific language. Inherited from Operator |
HasLocalizedIsoMetadataDocument | Checks if an ISO 19139 metadata document is available for a specific language. Inherited from Operator |
SetLocalizedDescription | Sets a operator description in a specific language. Inherited from Operator |
SetLocalizedDisplayName | Sets a operator display name in a specific language. Inherited from Operator |
SetLocalizedIsoMetadataDocument | Sets the path to an ISO 19139 metadata document for the operator, for a specific language. Inherited from Operator |