LuciadCPillar C# 2023.1.02
|
Factory to create geometries defined within a coordinate reference. More...
Factory to create geometries defined within a coordinate reference.
You can read more about the available geometries here.
|
inlinestatic |
Factory method to create an arc band.
Create the arc band you need
The angles for the arc band are expressed in degrees counterclockwise from the direction at 3 o'clock). By default, the arc band goes from the start angle to the end angle in the positive direction (counterclockwise). This can changed using the optional angleDirection parameter. To create an arc band from 30 to 145 you can use the following code.
Creation of an arc band is very similar to a circular arc. See GeometryFactory::createCircularArcByCenterPoint. Interpretation based on the coordinate reference
When the passed coordinate reference is a geodetic reference the distance calculations to determine points on the arc band are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the circular arc is defined.
center
the center point of the arc band.
minRadius
the minimal radius of the arc band.
maxRadius
the maximal radius of the arc band.
startAngle
the start angle of the arc band. (in degrees, counterclockwise from the direction at 3 o'clock).
endAngle
the end angle of the arc band. (in degrees, counterclockwise from the direction at 3 o'clock).
angleDirection
optional parameter defining the orientation of the arc, i.e. in which direction the arc extends from the start angle to the end angle. The default value is counterclockwise.
the arc band.
luciad::InvalidArgumentException
if the arc band cannot be created.
|
inlinestatic |
Factory method to create a quadratic Bezier curve transitioning smoothly between startPoint and endPoint.
A quadratic Bezier curve is defined by this equation: F(t) = startPoint*(1-t)^2 + 2(1-t)*t*controlPoint + endPoint*t^2 Quadratic Bezier Curves
At t=0 (at start), F(t) evaluates to startPoint At t=1 (at end), F(t) evaluates to endPoint For other values between 0 and 1, F(t) will evaluate to a quadratic curve tending to controlPoint.
reference
the coordinate reference in which the Bezier curve is defined.
startPoint
first control point of quadratic Bezier curve, start of the curve.
controlPoint
second control point of quadratic Bezier curve.
endPoint
third control point of quadratic Bezier curve, end of the curve.
the line geometry.
2020.1
|
inlinestatic |
Factory method to create a bounding box geometry.
Example to create a bounds geometry:
reference
the coordinate reference in which the point is defined.
location
the lower left location of the bounds.
width
the width of the bounds (positive value).
height
the height of the bounds (positive value).
depth
the depth of the bounds (positive value).
the point.
|
inlinestatic |
Factory method to create a circle, given three points.
The points are allowed to have a Z-value, but all Z-values are required to be equal. If this requirement is not met, an exception is thrown. Example usage:
A circle by-3-points where the three points coincide represents a circle with these points as its center and a radius of 0. A circle by-3-points where 2 out of 3 points coincide represents a circle with its center located in the middle between the 2 coinciding points and the other point. A circle by-3-points where the 3 points are co-linear results in luciad::InvalidArgumentException exceptions when curve methods are called in case the coordinate reference is Cartesian . When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the circle are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the circle is defined.
startPoint
the start point of the circle.
firstIntermediatePoint
the first intermediate point of the circle.
secondIntermediatePoint
the second intermediate point of the circle.
the circle.
luciad::InvalidArgumentException
if the input points do not have equal Z-values.
|
inlinestatic |
Factory method to create a circle.
Example usage:
When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the circle are done using geodesic calculations on the underlying ellipsoid of the coordinate reference.
reference
the coordinate reference in which the circle is defined.
center
the center point of the circle.
radius
the radius of the circle. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
the circle.
luciad::InvalidArgumentException
if the radius is smaller than 0.
|
inlinestatic |
Factory method to create a circular arc, given three points.
The circular arc will start at the given start point, pass through the given intermediate point and end in the given end point. The points are allowed to have a Z-value, but all Z-values are required to be equal. If this requirement is not met, an exception is thrown. Example usage:
A circular arc-by-3-points where the start, end and intermediate point coincide represents an arc on a circle with these points as its center and a radius of 0. A circular arc-by-3-points where 2 out of 3 points coincide represents an arc on a circle with its center located in the middle between the 2 coinciding points and the other point. If the start and end point coincide, a full circle is drawn, otherwise, the arc is interpreted as half a circle in counterclockwise direction from start to end point. When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the circular arc are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the circular arc is defined.
startPoint
the start point of the circular arc.
intermediatePoint
an intermediate point of the circular arc.
endPoint
the end point of the circular arc.
the circular arc.
luciad::InvalidArgumentException
if the input points do not have equal Z-values.
|
inlinestatic |
Factory method to create a circular arc, starting at the given start point and ending in the given end point.
The points are allowed to have a Z-value, but both Z-values are required to be equal. If this requirement is not met, an exception is thrown. Example usage:
The bulge factor is the ratio of (1) the distance between the arc midpoint and the center of the arc's chord, and (2) half the length of the arc's chord. The sign of the bulge indicates whether the midpoint is on the left side (positive) or right side (negative) of the vector from start to end point. So a bulge factor with an absolute value of 1 means a half-circle, smaller than 1 means a less bulging arc and larger than 1 means an arc that bulges out in the start and end point. A circular arc-by-bulge where the start and end point coincide represents an arc on a circle with these points as its center and a radius of 0. The bulge factor is ignored in this case. When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the circular arc are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the circular arc is defined.
startPoint
the start point of the circular arc.
endPoint
the end point of the circular arc.
bulge
the bulge factor of the circular arc.
the circular arc.
luciad::InvalidArgumentException
if the input points do not have equal Z-values.
|
inlinestatic |
Factory method to create a circular arc.
Create the circular arc you need
The angles for the circular arc are expressed in degrees counterclockwise from the direction at 3 o'clock. The arc segment goes from the start angle to the end angle in the positive direction (counterclockwise). To create a circular arc with an extent from 45 to 300 you can use the following code.
Arc from 45 to 300
To create a circular arc with an extent from 300 to 45 you can use the following code.
Arc from 300 to 45
Creation of a circular arc with the start and the end angle having the same value results in full circle. Optional orientation of the arc
The default orientation for the circular arc is counterclockwise. The circular arc is a curve that is useful as a sub-curve building block for other geometries, e.g., an arc band. Therefore it also supports the specification of the orientation of the arc. When the orientation value is set to clock-wise the arc segment goes from the start angle to the end angle in counter clock wise direction (negative direction). Interpretation based on the coordinate reference
When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the circular arc are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the circular arc is defined.
center
the center point of the circular arc.
radius
the radius of the circular arc. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
startAngle
the start angle of the circular arc. (in degrees, counterclockwise from the direction at 3 o'clock).
endAngle
the end angle of the circular arc. (in degrees, counterclockwise from the direction at 3 o'clock).
angleDirection
optional parameter defining the orientation of the arc. The default value is counter clock-wise.
the circular arc.
|
inlinestatic |
Factory to create a composite curve.
The following requirements must be met for the curves: the coordinate references must be the same the end point of a curve must be same as the start point of the next curve
curveList
the curves of which to make a composite curve.
the composite curve.
luciad::InvalidArgumentException
if the requirements are not met.
|
inlinestatic |
Factory to create a composite patch.
The composite patch represents a surface whose boundary is defined by an exterior patch and optionally a number of interior patches which represents holes within the surface. The following requirements must be met for the exterior patch and the interior patches: the coordinate references must be the same
Creation of composite patch with a hole:
exteriorPatch
the exterior patch of the composite patch surface.
interiorPatches
the interior patches of the composite patch surface. This can be an empty list.
the composite patch.
luciad::InvalidArgumentException
if the requirements are not met.
|
inlinestatic |
Factory to create a composite ring.
The following requirements must be met for the curves: the coordinate references must be the same the end point of a curve must be same as the start point of the next curve the end point of the last curve must be the same as the start point of the first curve
curveList
the curves of which to make a composite ring.
the composite ring.
luciad::InvalidArgumentException
if the requirements are not met.
|
inlinestatic |
Factory method to create an ellipse.
Example usage:
When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the ellipse are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the ellipse is defined.
center
the center point of the ellipse.
a
the length of the semi-major axis of the ellipse. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
b
the length of the semi-minor axis of the ellipse. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
rotationAngle
the rotation angle of the ellipse.
the ellipse.
luciad::InvalidArgumentException
if a or b is smaller than 0.
|
inlinestatic |
Factory method to create an elliptical arc.
Example usage:
Creation of an elliptical arc with the start and the end angle having the same value results in full ellipse. When the passed coordinate reference is a geodetic reference, the distance calculations to determine points on the elliptical arc are done using geodesic calculations on the underlying ellipsoid of the coordinate reference. For other coordinate references the distance calculations are done using cartesian calculations.
reference
the coordinate reference in which the elliptical arc is defined.
center
the center point of the elliptical arc.
a
the length of the semi-major axis of the elliptical arc. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
b
the length of the semi-minor axis of the elliptical arc. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
startAngle
the start angle of the elliptical arc.
endAngle
the end angle of the elliptical arc.
rotationAngle
the rotation of the ellipse on which the arc is defined
angleDirection
optional parameter defining the orientation of the arc, i.e. in which direction the arc extends from the start angle to the end angle. The default value is counterclockwise.
the elliptical arc.
luciad::InvalidArgumentException
if a or b is smaller than 0.
|
inlinestatic |
Factory method to create an extruded geometry, based on a base geometry, minimum height and maximum height.
If the base geometry has Z-values of its own, they are ignored. The maximum height cannot be smaller than the minimum height. If the given geometry is not a supported base for an extruded geometry, an exception is thrown. Use luciad::ExtrudedGeometry::isBaseGeometrySupported to check whether a geometry is supported or not. Currently, all luciad::Curve and luciad::Surface geometries are supported, as well as luciad::MultiGeometry instances that consist solely of such geometries. Example Usage:
reference
the coordinate reference in which the extruded geometry is defined. The horizontal component of this reference must be the same as the horizontal component of the base geometry's coordinate reference. The vertical reference is used to interpret the min and max height values.
baseGeometry
the geometry to use as a base for the extruded geometry.
minHeight
the minimum height of the extruded geometry. If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
maxHeight
the maximum height of the extruded geometry.If the coordinate reference is a geodetic reference, this is expressed in meters. Otherwise the unit of the reference is used.
the extruded geometry.
luciad::InvalidArgumentException
if the given geometry is not a supported base geometry for an extruded geometry, or if maxHeight < minHeight.
|
inlinestatic |
Factory method to create a line.
Line objects can be created with the interpolation types: linear geodesic rhumb
The interpolation types geodesic and rhumb are only allowed for geodetic coordinate references. Creation of geodesic line:
Creation of rhumb line:
Creation of linear line in a cartesian coordinate reference:
firstPoint
first point of the line.
secondPoint
second point of the line.
reference
the coordinate reference in which the line is defined.
curveInterpolationType
the type of interpolation between the points, i.e., linear, geodesic, or rhumb.
the line geometry.
luciad::InvalidArgumentException
if the line cannot be constructed. For example for an invalid combination of coordinate reference and interpolation type.
|
inlinestatic |
Factory to create a multi-geometry.
The following requirements must be met for the geometries: the coordinate references must be the same
To create a multi-geometry from a list of geometries you can use the following code.
geometryList
the geometries of which to make a multi-geometry; at least one geometry is required.
the multi-geometry.
luciad::InvalidArgumentException
if the requirements are not met.
|
inlinestatic |
Factory method to create a patch based on a Ring.
Example Usage:
baseGeometry
the base geometry (Ring) for the patch.
the patch geometry.
luciad::InvalidArgumentException
if the base ring geometry is not supported.
|
inlinestatic |
Factory method to create a point.
Example to create a point geometry:
reference
the coordinate reference in which the point is defined.
x
the x-value of the point.
y
the y-value of the point.
z
the z-value of the point.
the point.
|
inlinestatic |
Factory method to create a point from a coordinate.
Example to create a point geometry:
reference
the coordinate reference in which the point is defined.
location
the location of the point
the point.
2022.1
|
inlinestatic |
Factory to create a polygon.
The polygon represents a surface whose boundary is defined by an exterior (polyline) ring and optionally a number of interior (polyline) rings. The following requirements must be met for the exterior ring and the interior rings: the coordinate references must be the same the interpolation type must be the same
Creation of polygon that only has an exterior ring:
Creation of polygon that has a single hole:
exteriorRing
the exterior ring of the polygon.
interiorRings
the interior rings of the polygon. This can be an empty list.
the polygon.
luciad::InvalidArgumentException
if the requirements are not met.
|
inlinestatic |
Factory to create a polyline.
Polyline objects can be created with the interpolation types: linear geodesic rhumb
The interpolation types geodesic and rhumb are only allowed for geodetic coordinate references. Creation of geodesic polyline:
Creation of rhumb polyline:
Creation of linear polyline in a cartesian coordinate reference:
points
the points defining the polyline.
reference
the coordinate reference in which the polyline is defined.
curveInterpolationType
the type of interpolation between the points, i.e., linear, geodesic, or rhumb.
the polyline
luciad::InvalidArgumentException
if the polyline cannot be constructed. For example for an invalid combination of coordinate reference and interpolation type.
|
inlinestatic |
Factory to create a polyline to be used as ring.
The polyline represents a closed curve. The implementation does not require the list of points to be such that the first and the last point are the same. A line segment is automatically included between the last point and the first point. Polyline objects can be created with the interpolation types: linear geodesic rhumb
The interpolation types geodesic and rhumb are only allowed for geodetic coordinate references. Creation of a polyline as a ring:
points
the points defining the polyline.
reference
the coordinate reference in which the polyline is defined.
curveInterpolationType
the type of interpolation between the points, i.e., linear, geodesic, or rhumb.
the polyline, as a ring.
luciad::InvalidArgumentException
if the polyline ring cannot be constructed. For example for an invalid combination of coordinate reference and interpolation type.
|
inlinestatic |
Factory method to create a curve where pointy corners are replaced by Bezier Curves.
This method operates by assuming that the points originally define a Polyline. It retains the first and last point and replaces the geometry around vertex (corners) by a BezierCurve. The extent of BezierCurve depends on cornerRoundess. cornerRoundness decides the size of the Bezier Curve such that lower values will result in more pointy geometries. This method requires at least 3 points to produce a rounded result. If only 2 points are provided, it will return a standard line. If less than 2 points are provided, this method will throw an Invalid Argument exception. If cornerRoundness is zero, a standard Polyline is created. Corner roundness is expected to be between [0,1]. Rounded Line
reference
The coordinate reference in which the curve is defined.
points
Series of points defining the curve. At least 2 points are required to produce a result.
cornerRoundness
The lower this value, the pointier the geometry will be. This value must be between [0, 1].
the rounded curve geometry.
luciad::InvalidArgumentException
if the requirements are not met.
2020.1
|
inlinestatic |
Factory method to create a ring where pointy corners are replaced by Bezier Curves.
This method operates by assuming that the points define a PolylineRing and then replace each corner of the ring by a BezierCurve. The extent of BezierCurve depends on cornerRoundess. CornerRoundness decides the size of the Bezier Curve such that lower values will result in more pointy geometries. This method requires at least 3 points to produce a result. If less than 3 points are provided, it will throw an Invalid Argument exception. If cornerRoundness is zero, a standard PolylineRing is created. Corner roundness is expected to be between [0,1]. Roundness Factor
reference
The coordinate reference in which the curve is defined.
points
Series of points defining the curve. At least 3 points are required to produce a result.
cornerRoundness
The lower this value, the pointier the geometry will be. This value must be between [0, 1].
the rounded ring geometry.
luciad::InvalidArgumentException
if the requirements are not met.
2020.1