@gis-js/utilsol / Exports / utils

# Namespace: utils

# Table of contents

# Variables

# Functions

# Variables

# Constants

Const Constants: Object

# Type declaration

Name Type
FITTING_COUNT number
HALF_PI number
TWO_PI number
ZERO_TOLERANCE number

# Functions

# createBezierCurve

createBezierCurve(points?, space?): Coordinate[]

# Parameters

Name Type Default value Description
points Coordinate[] []
space number 0.01

# Returns

Coordinate[]


# createCurve

createCurve(from, to, radius?, angle?, space?): Coordinate[]

# Parameters

Name Type Default value Description
from Coordinate undefined
to Coordinate undefined
radius number 0
angle number 90
space number 0.01

# Returns

Coordinate[]


# equal

equal(coordinate1, coordinate2): boolean

# Parameters

Name Type Description
coordinate1 Coordinate
coordinate2 Coordinate

# Returns

boolean


# factorial

factorial(num): number

# Parameters

Name Type Description
num number

# Returns

number


# getAngleOfThreePoints

getAngleOfThreePoints(pntA, pntB, pntC): number

# Parameters

Name Type
pntA Coordinate
pntB Coordinate
pntC Coordinate

# Returns

number


# getArc

getArc(center, radius, startAngle, endAngle): Coordinate[]

# Parameters

Name Type Description
center Coordinate
radius number
startAngle number
endAngle number

# Returns

Coordinate[]


# getAzimuth

getAzimuth(startPnt, endPnt): number

# Parameters

Name Type Description
startPnt Coordinate
endPnt Coordinate

# Returns

number


# getBaseLength

getBaseLength(points): number

# Parameters

Name Type Description
points Coordinate[]

# Returns

number


# getCircleCenterOfThreePoints

getCircleCenterOfThreePoints(pnt1, pnt2, pnt3): Coordinate

# Parameters

Name Type Description
pnt1 Coordinate
pnt2 Coordinate
pnt3 Coordinate

# Returns

Coordinate


# getCoordinateByDistance

getCoordinateByDistance(coordinates, distance, options?): Coordinate

# Parameters

Name Type Description
coordinates Coordinate[]
distance number
options Object
options.units? Units -

# Returns

Coordinate


# getCoordinateByPoint

getCoordinateByPoint(coordinates, coordinate): Coordinate

# Parameters

Name Type
coordinates Coordinate[] | Coordinate[][]
coordinate Coordinate

# Returns

Coordinate


# getCoordinateByScale

getCoordinateByScale(coordinates, scale, options?): Coordinate

# Parameters

Name Type Description
coordinates Coordinate[]
scale number
options Object
options.units? Units -

# Returns

Coordinate


# getDistance

getDistance(pnt1, pnt2): number

# Parameters

Name Type Description
pnt1 Coordinate
pnt2 Coordinate

# Returns

number


# getIntersectPoint

getIntersectPoint(pntA, pntB, pntC, pntD): Coordinate

# Parameters

Name Type
pntA Coordinate
pntB Coordinate
pntC Coordinate
pntD Coordinate

# Returns

Coordinate


# getLength

getLength(points): number

# Parameters

Name Type Description
points Coordinate[]

# Returns

number


# getMid

getMid(pnt1, pnt2): Coordinate

# Parameters

Name Type Description
pnt1 Coordinate
pnt2 Coordinate

# Returns

Coordinate


# getThirdPoint

getThirdPoint(startPnt, endPnt, angle, distance, clockWise?): Coordinate

# Parameters

Name Type Default value Description
startPnt Coordinate undefined
endPnt Coordinate undefined
angle number undefined
distance number undefined
clockWise boolean true

# Returns

Coordinate


# isClockWise

isClockWise(pnt1, pnt2, pnt3): boolean

# Parameters

Name Type Description
pnt1 Coordinate
pnt2 Coordinate
pnt3 Coordinate

# Returns

boolean


# linearInterpolate

linearInterpolate(coordinates?, space?): Coordinate[]

# Parameters

Name Type Default value Description
coordinates Coordinate[] []
space number 0.01

# Returns

Coordinate[]


# parseDecimal

parseDecimal(number): number

# Parameters

Name Type
number number

# Returns

number


# sliceByDistance

sliceByDistance(coordinates, startDist, stopDist, options?): Coordinate[]

# Parameters

Name Type
coordinates Coordinate[]
startDist number
stopDist number
options Object
options.units? Units

# Returns

Coordinate[]


# sliceByPoint

sliceByPoint(coordinates, startPt, stopPt): Coordinate[]

# Parameters

Name Type
coordinates Coordinate[]
startPt Coordinate
stopPt Coordinate

# Returns

Coordinate[]


# sliceByScale

sliceByScale(coordinates, startScale, stopScale, options?): Coordinate[]

# Parameters

Name Type
coordinates Coordinate[]
startScale number
stopScale number
options Object
options.units? Units

# Returns

Coordinate[]