Skip to content

webdggrid / dggsPreset

Function: dggsPreset() ​

dggsPreset(name): IDGGSProps

Defined in: webdggrid.ts:360

Returns the IDGGSProps of a DGGRID preset grid (DGGRID's dggs_type), for Webdggrid.setDggs.

Unlike DGGRID, IVEA… names without S/L are accepted as the spherical grids, and the bare name IGEO7 is rejected: DGGRID 9.1 changed it from IGEO7v1 to IGEO7v2, so say which one you mean.

Parameters ​

name ​

DggsPresetName

Returns ​

IDGGSProps

Example ​

ts
import { Webdggrid, dggsPreset } from 'webdggrid/Webdggrid';

const dggs = await Webdggrid.load();
dggs.setDggs(dggsPreset('IGEO7v2'), 9);   // ISEA7H on WGS84

Throws ​

If the name is not a supported preset.