Class ExtendLineOperationUtils

java.lang.Object
org.gvsig.vectorediting.lib.prov.extendline.operation.ExtendLineOperationUtils

public class ExtendLineOperationUtils extends Object
Author:
llmarques
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Use it to indicate end side should be extended
    static final String
    Use it to indicate start side should be extended
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.gvsig.fmap.geom.primitive.Point
    arcIntersection(org.gvsig.fmap.geom.primitive.Arc arcToBeExtended, String sideToExtend, org.gvsig.fmap.dal.feature.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 org.gvsig.fmap.geom.primitive.Point
    arcIntersection(org.gvsig.fmap.geom.primitive.Arc arcToBeExtended, String sideToExtend, org.gvsig.fmap.geom.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 org.gvsig.fmap.geom.primitive.Point
    curveIntersection(org.gvsig.fmap.geom.primitive.Curve line, String sideToExtend, org.gvsig.fmap.dal.feature.FeatureSelection boundaryObjects)
    Calculates the nearest intersection among curve and boundary objects depending on side received as parameter.
    static org.gvsig.fmap.geom.primitive.Point
    curveIntersection(org.gvsig.fmap.geom.primitive.Curve line, String sideToExtend, org.gvsig.fmap.geom.Geometry boundaryObject)
    Calculates the nearest intersection among curve and boundary objects depending on side received as parameter.
    static double
    getAngle(org.gvsig.fmap.geom.primitive.Point start, org.gvsig.fmap.geom.primitive.Point end)
     
    static org.gvsig.fmap.geom.primitive.Point
    getIntersectionOfProjectedLine(org.gvsig.fmap.geom.primitive.Point initPoint, org.gvsig.fmap.geom.primitive.Point endPoint, org.gvsig.fmap.dal.feature.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 org.gvsig.fmap.geom.primitive.Point
    getIntersectionOfProjectedLine(org.gvsig.fmap.geom.primitive.Point initPoint, org.gvsig.fmap.geom.primitive.Point endPoint, org.gvsig.fmap.geom.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.
    getOperation(org.gvsig.fmap.geom.primitive.Primitive geom)
     
    static void
    register(ExtendLineOperation operation, int geometryType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ExtendLineOperationUtils

      public ExtendLineOperationUtils()
  • Method Details

    • register

      public static void register(ExtendLineOperation operation, int geometryType)
    • getOperation

      public static ExtendLineOperation getOperation(org.gvsig.fmap.geom.primitive.Primitive geom)
    • curveIntersection

      public static org.gvsig.fmap.geom.primitive.Point curveIntersection(org.gvsig.fmap.geom.primitive.Curve line, String sideToExtend, org.gvsig.fmap.dal.feature.FeatureSelection boundaryObjects) throws org.gvsig.fmap.geom.exception.CreateGeometryException, org.gvsig.fmap.dal.exception.DataException, org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Calculates the nearest intersection among curve and boundary objects depending on side received as parameter.
      Parameters:
      line - to be extended
      sideToExtend - What side will be extend. Use START_SIDE and END_SIDE
      boundaryObjects - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.exception.CreateGeometryException
      org.gvsig.fmap.dal.exception.DataException
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
    • curveIntersection

      public static org.gvsig.fmap.geom.primitive.Point curveIntersection(org.gvsig.fmap.geom.primitive.Curve line, String sideToExtend, org.gvsig.fmap.geom.Geometry boundaryObject) throws org.gvsig.fmap.geom.GeometryException, org.gvsig.fmap.dal.exception.DataException, org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Calculates the nearest intersection among curve and boundary objects depending on side received as parameter.
      Parameters:
      line - to be extended
      sideToExtend - What side will be extend. Use START_SIDE and END_SIDE
      boundaryObject - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.exception.CreateGeometryException
      org.gvsig.fmap.dal.exception.DataException
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.geom.GeometryException
    • arcIntersection

      public static org.gvsig.fmap.geom.primitive.Point arcIntersection(org.gvsig.fmap.geom.primitive.Arc arcToBeExtended, String sideToExtend, org.gvsig.fmap.dal.feature.FeatureSelection boundaryObjects) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException, org.gvsig.fmap.geom.exception.CreateGeometryException, org.gvsig.fmap.dal.exception.DataException
      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.
      Parameters:
      arcToBeExtended - Arc to be extended
      sideToExtend - What side will be extend. Use START_SIDE and END_SIDE
      boundaryObjects - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.geom.exception.CreateGeometryException
      org.gvsig.fmap.dal.exception.DataException
    • arcIntersection

      public static org.gvsig.fmap.geom.primitive.Point arcIntersection(org.gvsig.fmap.geom.primitive.Arc arcToBeExtended, String sideToExtend, org.gvsig.fmap.geom.Geometry boundaryObject) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException, org.gvsig.fmap.geom.exception.CreateGeometryException, org.gvsig.fmap.dal.exception.DataException
      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.
      Parameters:
      arcToBeExtended - Arc to be extended
      sideToExtend - What side will be extend. Use START_SIDE and END_SIDE
      boundaryObject - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.geom.exception.CreateGeometryException
      org.gvsig.fmap.dal.exception.DataException
    • getAngle

      public static double getAngle(org.gvsig.fmap.geom.primitive.Point start, org.gvsig.fmap.geom.primitive.Point end) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
    • getIntersectionOfProjectedLine

      public static org.gvsig.fmap.geom.primitive.Point getIntersectionOfProjectedLine(org.gvsig.fmap.geom.primitive.Point initPoint, org.gvsig.fmap.geom.primitive.Point endPoint, org.gvsig.fmap.dal.feature.FeatureSelection boundaryObjects) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException, org.gvsig.fmap.dal.exception.DataException, org.gvsig.fmap.geom.exception.CreateGeometryException
      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.
      Parameters:
      initPoint - of curve to extend
      endPoint - end point of curve to extend
      boundaryObjects - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.dal.exception.DataException
      org.gvsig.fmap.geom.exception.CreateGeometryException
    • getIntersectionOfProjectedLine

      public static org.gvsig.fmap.geom.primitive.Point getIntersectionOfProjectedLine(org.gvsig.fmap.geom.primitive.Point initPoint, org.gvsig.fmap.geom.primitive.Point endPoint, org.gvsig.fmap.geom.Geometry boundaryObject) throws org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException, org.gvsig.fmap.geom.operation.GeometryOperationException, org.gvsig.fmap.dal.exception.DataException, org.gvsig.fmap.geom.GeometryException
      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.
      Parameters:
      initPoint - of curve to extend
      endPoint - end point of curve to extend
      boundaryObject - to calculate intersection points.
      Returns:
      the nearest intersection point. Return Null if arc does not intersect with any boundary object
      Throws:
      org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException
      org.gvsig.fmap.geom.operation.GeometryOperationException
      org.gvsig.fmap.dal.exception.DataException
      org.gvsig.fmap.geom.exception.CreateGeometryException
      org.gvsig.fmap.geom.GeometryException