Class GisModelCurveCalculator


  • public class GisModelCurveCalculator
    extends Object
    This class allows to obtain arcs and circles given by the most usual parameters, in a Gis geometry model. In this model, an arc or a circle is given by a set of points that defines it shape
    Author:
    jmorell
    • Constructor Detail

      • GisModelCurveCalculator

        public GisModelCurveCalculator()
    • Method Detail

      • calculateGisModelCircle

        public static Point2D[] calculateGisModelCircle​(Point2D c,
                                                        double r)
        This method calculates an array of Point2D that represents a circle. The distance between it points is 1 angular unit
        Parameters:
        c - Point2D that represents the center of the circle
        r - double value that represents the radius of the circle
        Returns:
        Point2D[] An array of Point2D that represents the shape of the circle
      • calculateGisModelEllipse

        public static Point2D[] calculateGisModelEllipse​(Point2D center,
                                                         Point2D majorAxisVector,
                                                         double axisRatio,
                                                         double initAngle,
                                                         double endAngle)
        This method calculates an array of Point2D that represents a ellipse. The distance between it points is 1 angular unit
        Parameters:
        center - Point2D that represents the center of the ellipse
        majorAxisVector - Point2D that represents the vector for the major axis
        axisRatio - double value that represents the axis ratio
        initAngle - double value that represents the start angle of the ellipse arc
        endAngle - double value that represents the end angle of the ellipse arc
        Returns:
        Point2D[] An array of Point2D that represents the shape of the ellipse
      • calculateGisModelArc

        public static Point2D[] calculateGisModelArc​(Point2D c,
                                                     double r,
                                                     double sa,
                                                     double ea)
        This method calculates an array of Point2D that represents an arc. The distance between it points is 1 angular unit
        Parameters:
        c - Point2D that represents the center of the arc
        r - double value that represents the radius of the arc
        sa - double value that represents the start angle of the arc
        ea - double value that represents the end angle of the arc
        Returns:
        Point2D[] An array of Point2D that represents the shape of the arc
      • calculateGisModelBulge

        public static Point2D[] calculateGisModelBulge​(Point2D[] newPts,
                                                       double[] bulges)
        This method applies an array of bulges to an array of Point2D that defines a polyline. The result is a polyline with the input points with the addition of the points that define the new arcs added to the polyline
        Parameters:
        newPts - Base points of the polyline
        bulges - Array of bulge parameters
        Returns:
        Polyline with a new set of arcs added and defined by the bulge parameters