# Class 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

- Find the maximum value in am array of numbers

  #### Parameters

  - array: number[]

    of number

  #### Returns number

  the maximum of input array

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

### arrayMin

- arrayMin(array): number

- Find the minimum value in am array of numbers

  #### Parameters

  - array: number[]

    of number

  #### Returns number

  the minimum of input array

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

### clipLineByMeasure

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

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

  #### 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

  Object with clipped lined coordinates and left domain value

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

### downloadProfileAsImageFile

- downloadProfileAsImageFile(profileClientConfig): 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): {
  [key: string]: string | number;
  }[]

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

  #### Parameters

  - points: LidarPoint[]

    A list of lidar profile point objects.

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

  Objects for a csv export (column: value).

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

### getClosestPoint

- getClosestPoint(points, xs, ys, tolerance, sx, sy, classification_colors): LidarPoint

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

  #### 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

  closestPoint the closest point to the clicked coordinates

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

### getFlatPointsByDistance

- getFlatPointsByDistance(profilePoints): LidarPoint[]

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

  #### Parameters

  - profilePoints: LidarprofilePoints

    in the profile

  #### Returns LidarPoint[]

  An array of LIDAR Points.

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

### getNiceLOD

- getNiceLOD(span, max_levels): NiceLOD

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

  #### Parameters

  - span: number

    domain extent

  - max_levels: LidarprofileServerConfigLevels

    levels defined by a LIDAR server

  #### Returns NiceLOD

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

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

### getPytreeLinestring

- getPytreeLinestring(line): string

- Transform OpenLayers linestring into a cPotree compatible definition

  #### Parameters

  - line: LineString

    the profile 2D line

  #### Returns string

  linestring in a cPotree/pytree compatible string definition

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

Generated using TypeDoc