public class ExtendLineOperationUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
END_SIDE
Use it to indicate end side should be extended
|
static java.lang.String |
START_SIDE
Use it to indicate start side should be extended
|
| Constructor and Description |
|---|
ExtendLineOperationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Point |
arcIntersection(Arc arcToBeExtended,
java.lang.String sideToExtend,
FeatureSelection boundaryObjects)
Calculates the nearest intersection point among arc and boundary objects
depending on side received as parameter.Strategy:
1- Create a full arc with the same center and radius of arc received by
parameter.2- Iterate over boundary objects.3- If some boundary object
intersects with full arc, calculates the distance to start point or end
point depending on side to be extend.4- Return the nearest intersection
point.
|
static Point |
arcIntersection(Arc arcToBeExtended,
java.lang.String sideToExtend,
Geometry boundaryObject)
Calculates the nearest intersection point among arc and boundary objects
depending on side received as parameter.Strategy:
1- Create a full arc with the same center and radius of arc received by
parameter.2- Iterate over boundary objects.3- If some boundary object
intersects with full arc, calculates the distance to start point or end
point depending on side to be extend.4- Return the nearest intersection
point.
|
static Point |
curveIntersection(Curve line,
java.lang.String sideToExtend,
FeatureSelection boundaryObjects)
Calculates the nearest intersection among curve and boundary objects
depending on side received as parameter.
|
static Point |
curveIntersection(Curve line,
java.lang.String sideToExtend,
Geometry boundaryObject)
Calculates the nearest intersection among curve and boundary objects
depending on side received as parameter.
|
static double |
getAngle(Point start,
Point end) |
static Point |
getIntersectionOfProjectedLine(Point initPoint,
Point endPoint,
FeatureSelection boundaryObjects)
Gets intersection among the line formed by initPoint and endPoint and
boundary objects.If line or its projection does not intersect with any
boundary object return null.Strategy:
1- Get module of line to determine if an intersection point already be
vertex of line.If the distance between intersection point and start point
of line is less than module indicates that intersection point already be
curve point.2- Project line with the line parametric equation. 3- Iterate
over boundary objects. 4- Check if boundary object does not contains end
point of projected line. 5- If projected line intersects with any
boundary object, get the nearest intersection point 6- Return it.
|
static Point |
getIntersectionOfProjectedLine(Point initPoint,
Point endPoint,
Geometry boundaryObject)
Gets intersection among the line formed by initPoint and endPoint and
boundary object.If line or its projection does not intersect with
boundary object return null.Strategy:
1- Get module of line to determine if an intersection point already be
vertex of line.If the distance between intersection point and start point
of line is less than module indicates that intersection point already be
curve point.2- Project line with the line parametric equation. 3- Check
if boundary object does not contains end point of projected line. 5- If
projected line intersects with boundary object, get the nearest
intersection point 6- Return it.
|
static ExtendLineOperation |
getOperation(Primitive geom) |
static void |
register(ExtendLineOperation operation,
int geometryType) |
public static final java.lang.String START_SIDE
public static final java.lang.String END_SIDE
public static void register(ExtendLineOperation operation, int geometryType)
public static ExtendLineOperation getOperation(Primitive geom)
public static Point curveIntersection(Curve line, java.lang.String sideToExtend, FeatureSelection boundaryObjects) throws CreateGeometryException, DataException, GeometryOperationNotSupportedException, GeometryOperationException
line - to be extendedsideToExtend - What side will be extend. Use
START_SIDE and
END_SIDEboundaryObjects - to calculate intersection points.CreateGeometryExceptionDataExceptionGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic static Point curveIntersection(Curve line, java.lang.String sideToExtend, Geometry boundaryObject) throws GeometryException, DataException, GeometryOperationNotSupportedException, GeometryOperationException
line - to be extendedsideToExtend - What side will be extend. Use
START_SIDE and
END_SIDEboundaryObject - to calculate intersection points.CreateGeometryExceptionDataExceptionGeometryOperationNotSupportedExceptionGeometryOperationExceptionGeometryExceptionpublic static Point arcIntersection(Arc arcToBeExtended, java.lang.String sideToExtend, FeatureSelection boundaryObjects) throws GeometryOperationNotSupportedException, GeometryOperationException, CreateGeometryException, DataException
arcToBeExtended - Arc to be extendedsideToExtend - What side will be extend. Use
START_SIDE and
END_SIDEboundaryObjects - to calculate intersection points.GeometryOperationNotSupportedExceptionGeometryOperationExceptionCreateGeometryExceptionDataExceptionpublic static Point arcIntersection(Arc arcToBeExtended, java.lang.String sideToExtend, Geometry boundaryObject) throws GeometryOperationNotSupportedException, GeometryOperationException, CreateGeometryException, DataException
arcToBeExtended - Arc to be extendedsideToExtend - What side will be extend. Use
START_SIDE and
END_SIDEboundaryObject - to calculate intersection points.GeometryOperationNotSupportedExceptionGeometryOperationExceptionCreateGeometryExceptionDataExceptionpublic static double getAngle(Point start, Point end) throws GeometryOperationNotSupportedException, GeometryOperationException
public static Point getIntersectionOfProjectedLine(Point initPoint, Point endPoint, FeatureSelection boundaryObjects) throws GeometryOperationNotSupportedException, GeometryOperationException, DataException, CreateGeometryException
initPoint - of curve to extendendPoint - end point of curve to extendboundaryObjects - to calculate intersection points.GeometryOperationNotSupportedExceptionGeometryOperationExceptionDataExceptionCreateGeometryExceptionpublic static Point getIntersectionOfProjectedLine(Point initPoint, Point endPoint, Geometry boundaryObject) throws GeometryOperationNotSupportedException, GeometryOperationException, DataException, GeometryException
initPoint - of curve to extendendPoint - end point of curve to extendboundaryObject - to calculate intersection points.GeometryOperationNotSupportedExceptionGeometryOperationExceptionDataExceptionCreateGeometryExceptionGeometryException