Skip to content

am2222/webDggrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Assembly version of DGGRID

A WebAssembly wrapper for DGGRID, the C++ library for working with Discrete Global Grid Systems.

NPM Version GitHub Release Docs PR Check Publish jsDelivr

Webdggrid demo screenshot


How to use

Please check tests folder for more examples.

in browser

const WebdggridLocal = await import("../dist/index.js").then(m => m.Webdggrid).catch(console.log);
import { Webdggrid as WebdggridExternal } from "https://cdn.jsdelivr.net/npm/webDggrid/dist/index.js";

const Webdggrid = WebdggridLocal ?? WebdggridExternal;

const webdggrid = await Webdggrid.load();
const seqNum = dggs.geoToSequenceNum([[0, 0]]);

In nodejs

import { Webdggrid } from 'webdggrid'
const dggs = await Webdggrid.load();
const seqNum = dggs.geoToSequenceNum([[0, 0]]);

API

setDggs · getResolution · setResolution · geoToSequenceNum · sequenceNumToGeo · sequenceNumToGrid · sequenceNumToGridFeatureCollection · geoToGeo · cellAreaKM · cellDistKM · nCells

See the full API reference for details and type signatures.

Contributing & Development

See CONTRIBUTING.md for setup instructions, project structure, and commit conventions.

Changes

See CHANGELOG.md for the full history.

About

A WASM version of DGGRID

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors