Skip to content

Function: getProjection() ​

ts
function getProjection(epsg): string | undefined;

Defined in: projections.ts:104

Looks up the ESRI WKT for an EPSG code.

Synchronous, so it only sees codes that are already loaded: the four built-ins, anything passed to registerProjections, and — once loadProjectionTable has run, or after any write that needed it — the full bundled table.

Parameters ​

ParameterTypeDescription
epsgnumberEPSG code, e.g. 4326.

Returns ​

string | undefined

The WKT, or undefined if the code is not currently loaded.

Released under the MIT License.