fplot_simplify Module



Contents


Interfaces

public interface simplify_polyline

  • private function simplify_polyline_2d1(x, y, tol, err) result(ln)

    Simplifies a 2D polyline by removing points too close to discern given a specified tolerance.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: x

    An N-element array containing the x-coordinates of the vertices making up the polyline.

    real(kind=real64), intent(in), dimension(:) :: y

    An N-element array containing the y-coordinates of the vertices making up the polyline.

    real(kind=real64), intent(in) :: tol

    The distance tolerance to use when simplifying the polyline. This value must be positive, and larger than machine epsilon.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    A matrix containing the simplified polyline vertices. The first column of the matrix contains the x-coordinates, and the second column contains the y-coordinates.

  • private function simplify_polyline_3d1(x, y, z, tol, err) result(ln)

    Simplifies a 3D polyline by removing points too close to discern given a specified tolerance.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: x

    An N-element array containing the x-coordinates of the vertices making up the polyline.

    real(kind=real64), intent(in), dimension(:) :: y

    An N-element array containing the y-coordinates of the vertices making up the polyline.

    real(kind=real64), intent(in), dimension(:) :: z

    An N-element array containing the z-coordinates of the vertices making up the polyline.

    real(kind=real64), intent(in) :: tol

    The distance tolerance to use when simplifying the polyline. This value must be positive, and larger than machine epsilon.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    A matrix containing the simplified polyline vertices. The first column of the matrix contains the x-coordinates, the second column contains the y-coordinates, and the third column contains the z-coordinates.

  • private function simplify_polyline_mtx(xy, tol, err) result(ln)

    Simplifies a 2D or 3D polyline by removing points too close to discern given a specified tolerance.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: xy

    An N-by-2 or N-by-3 matrix containing the polyline vertex data.

    real(kind=real64), intent(in) :: tol

    The distance tolerance to use when simplifying the polyline. This value must be positive, and larger than machine epsilon.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    A matrix containing the simplified polyline vertices. The first column of the matrix contains the x-coordinates, the second column contains the y-coordinates, and if necessary, the third column contains the z-coordinates.