Skip to content

geo.data

4 functions / 3 types

Index

FunctionDescription
gridsNeededList the grids that the most precise conversion between two systems needs, and whether each is installed. Call it before adding a layer, and install the grids it lists first.
installGridInstall a datum or geoid grid in the GeoTIFF form PROJ-data distributes, under its PROJ-data file name, such as ca_nrc_ntv2_0.tif.
installRegistryFileInstall a registry file in the epsg.bin format, whose entries all belong to authority, such as the epsg.bin file shipped with this engine version under the authority EPSG.
statusReport the geospatial data the engine holds.
TypeDescription
AreaOfInterestAn area in WGS 84 longitude and latitude degrees. west greater than east crosses the antimeridian.
DataStatusThe geospatial data the engine holds.
GridNeedA grid that a conversion needs.

gridsNeeded

gridsNeeded(args: { areaOfInterest?: GeoDataAreaOfInterest; source: GeoCrsId; target: GeoCrsId }, transactionId?: string): Promise<Array<GeoDataGridNeed>>

List the grids that the most precise conversion between two systems needs, and whether each is installed. Call it before adding a layer, and install the grids it lists first.

Without an area of interest, the most precise conversion can need a grid for a region the layer does not cover. Fails with InvalidArgument when the registry does not hold a system.

Returns Promise<Array<GeoDataGridNeed>>.

areaOfInterest optional : GeoDataAreaOfInterest

source : GeoCrsId

target : GeoCrsId

transactionId optional : string

installGrid

installGrid(args: { contents: Uint8Array; name: string }, transactionId?: string): Promise<void>

Install a datum or geoid grid in the GeoTIFF form PROJ-data distributes, under its PROJ-data file name, such as ca_nrc_ntv2_0.tif.

Fails with InvalidArgument when the file is not a GeoTIFF grid, or when a different file is already installed under the name. Installing the same file again does nothing.

Returns Promise<void>.

contents : Uint8Array

The whole file.

name : string

transactionId optional : string

installRegistryFile

installRegistryFile(args: { authority: string; contents: Uint8Array }, transactionId?: string): Promise<void>

Install a registry file in the epsg.bin format, whose entries all belong to authority, such as the epsg.bin file shipped with this engine version under the authority EPSG.

Fails with InvalidArgument for bytes that are not a well-formed registry file, and for a file that defines an entry the registry already holds differently, and installs nothing then. Installing the same file again does nothing.

Returns Promise<void>.

authority : string

The authority every entry of the file belongs to, such as EPSG.

contents : Uint8Array

The whole file.

transactionId optional : string

status

status(transactionId?: string): Promise<GeoDataDataStatus>

Report the geospatial data the engine holds.

Returns: The geospatial data the engine holds.

Returns Promise<GeoDataDataStatus>.

transactionId optional : string

AreaOfInterest

An area in WGS 84 longitude and latitude degrees. west greater than east crosses the antimeridian.

east : number

north : number

south : number

west : number

DataStatus

The geospatial data the engine holds.

grids optional : Array<string>

The names of the installed grids.

registered : number

The number of definitions registered with geo.crs.register.

registryFiles optional : Array<string>

The authority of each installed registry file, such as EPSG, in the order installed.

GridNeed

A grid that a conversion needs.

installed : boolean

name : string

The PROJ-data GeoTIFF file name, for installGrid.