# Class default

#### Hierarchy

- default

- Defined in src/lidar/Utils.ts:108

#####
Index

### Constructors

constructor

### Properties

onload

### Methods

arrayMax
arrayMin
clipLineByMeasure
downloadProfileAsImageFile
getCSVData
getClosestPoint
getFlatPointsByDistance
getNiceLOD
getPytreeLinestring

## Constructors

### constructor

- new default(): default

- #### Returns default

## Properties

### onload

onload: (() => void)

#### Type declaration

- - (): void

  - #### Returns void

- Defined in src/lidar/Utils.ts:109

## Methods

### arrayMax

- arrayMax(array: number[]): number

- Find the maximum value in am array of numbers

  ### Returns

  the maximum of input array

  #### Parameters

  - ##### array: number[]

    of number

  #### Returns number

  - Defined in src/lidar/Utils.ts:394

### arrayMin

- arrayMin(array: number[]): number

- Find the minimum value in am array of numbers

  ### Returns

  the minimum of input array

  #### Parameters

  - ##### array: number[]

    of number

  #### Returns number

  - Defined in src/lidar/Utils.ts:404

### clipLineByMeasure

- clipLineByMeasure(config: LidarprofileConfigService, map_resolution: number, linestring: LineString, dLeft: number, dRight: number): ClippedLine

- Clip a linestring with start and end measure given by D3 Chart domain

  ### Returns

  Object with clipped lined coordinates and left domain value

  #### Parameters

  - ##### config: LidarprofileConfigService

    the LIDAR profile config instance

  - ##### map_resolution: number

    the current resolution of the map

  - ##### linestring: LineString

    an OpenLayers Linestring

  - ##### dLeft: number

    domain minimum

  - ##### dRight: number

    domain maximum

  #### Returns ClippedLine

  - Defined in src/lidar/Utils.ts:121

### downloadProfileAsImageFile

- downloadProfileAsImageFile(profileClientConfig: LidarprofileClientConfig): void

- Create a image file by combining SVG and canvas elements and let the user downloads it.

  #### Parameters

  - ##### profileClientConfig: LidarprofileClientConfig

    The profile client configuration.

  #### Returns void

  - Defined in src/lidar/Utils.ts:278

### getCSVData

- getCSVData(points: LidarPoint[]): { [key: string]: string | number }[]

- Get the data for a CSV export of the profile.

  ### Returns

  Objects for a csv export (column: value).

  #### Parameters

  - ##### points: LidarPoint[]

    A list of lidar profile point objects.

  #### Returns { [key: string]: string | number }[]

  - Defined in src/lidar/Utils.ts:370

### getClosestPoint

- getClosestPoint(points: LidarprofilePoints, xs: number, ys: number, tolerance: number, sx: updateScaleFunction, sy: updateScaleFunction, classification_colors: LidarprofileServerConfigClassifications): LidarPoint

- Find the profile's closest point in profile data to the chart mouse position

  ### Returns

  closestPoint the closest point to the clicked coordinates

  #### Parameters

  - ##### points: LidarprofilePoints

    Object containing points properties as arrays

  - ##### xs: number

    mouse x coordinate on canvas element

  - ##### ys: number

    mouse y coordinate on canvas element

  - ##### tolerance: number

    snap sensibility

  - ##### sx: updateScaleFunction

    d3.scalelinear x scale

  - ##### sy: updateScaleFunction

    d3.scalelinear y scale

  - ##### classification_colors: LidarprofileServerConfigClassifications

    classification colors

  #### Returns LidarPoint

  - Defined in src/lidar/Utils.ts:444

### getFlatPointsByDistance

- getFlatPointsByDistance(profilePoints: LidarprofilePoints): LidarPoint[]

- Transforms a lidarprofile into multiple single points sorted by distance.

  ### Returns

  An array of LIDAR Points.

  #### Parameters

  - ##### profilePoints: LidarprofilePoints

    in the profile

  #### Returns LidarPoint[]

  - Defined in src/lidar/Utils.ts:347

### getNiceLOD

- getNiceLOD(span: number, max_levels: LidarprofileServerConfigLevels): NiceLOD

- Get a Level Of Details and with for a given chart span Configuration is set up in Pytree configuration

  ### Returns

  Object with optimized Level Of Details and width for this profile span

  #### Parameters

  - ##### span: number

    domain extent

  - ##### max_levels: LidarprofileServerConfigLevels

    levels defined by a LIDAR server

  #### Returns NiceLOD

  - Defined in src/lidar/Utils.ts:257

### getPytreeLinestring

- getPytreeLinestring(line: LineString): string

- Transform OpenLayers linestring into a cPotree compatible definition

  ### Returns

  linestring in a cPotree/pytree compatible string definition

  #### Parameters

  - ##### line: LineString

    the profile 2D line

  #### Returns string

  - Defined in src/lidar/Utils.ts:420

Generated using TypeDoc