JSMath

API for mathematical algorithm processing

Create Module.getMath API.

var math = Module.getMath();

convertBezierCurve(options) → JSVec3Array

Returns a list of coordinates applied with a Bezier curve through a list of latitude and longitude coordinates.

Set vertex list as argument variable.

Name
Type
Description

option

Coordinate transformation property information.

convertBeZierLine(options) → object

Returns a list of Bezier curve coordinates based on the start and end positions of latitude and longitude.

Set vertex list as argument variable.

Name
Type
Description

option

Coordinate transformation property information.

  • Return

    • .result: API success status (1: Success, 0: Failure).

    • .name: Operating API name.

    • .return: API return information (object: normal return value, string: failure error code).

  • Sample

calculationSlopeAnalysis(options) → object

Returns the result of slope analysis through a 3*3 array value (0 array top left, 9 array bottom right).

Set vertex list as argument variable.

Name
Type
Description

option

Slope analysis property information.

  • Return

    • .result: API success status (1: Success, 0: Failure).

    • .name: Operating API name.

    • .return: API return information (object: normal return value, string: failure error code).

Type Definitions

JSMath.BezierCurve

Options for transforming a list of latitude and longitude coordinates with a Bezier curve.

Name
Type
Attributes
Default
Description

option

List of latitude and longitude coordinates, coordinate list type setting.

JSMath.BezierLine

Options for transforming a list of latitude and longitude coordinates with a parabolic curve.

Name
Type
Attributes
Default
Description

start

500

Straight line start latitude and longitude position.

end

10

Straight line end latitude and longitude position.

detail

number

optional

50

Number of interpolation points for curve creation.

height

number

optional

100

Maximum height of the curve.

percent

number

optional

50

Set the maximum height point of the curve based on 0% start position and 100% end position.

JSMath.SlopeOption

Options for slope analysis settings.

Name
Type
Attributes
Default
Description

type

string

Slope analysis option (TERRAIN_ANGLE, TERRAIN_DIRECTION, TERRAIN_DIRECTION_ANGLE).

array

array

[3*3] altitude array for slope analysis.

vertical

number

optional

5

Cell vertical length needed for slope analysis (unit: m).

horizontal

number

optional

5

Cell horizontal length needed for slope analysis (unit: m).

Last updated