webdggrid 1.0.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +9 -56
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdggrid",
3
- "version": "1.0.9",
3
+ "version": "1.2.0",
4
4
  "description": "Wasm package for DGGRID ",
5
5
  "packageManager": "yarn@4.10.3",
6
6
  "type": "module",
package/readme.md CHANGED
@@ -1,13 +1,14 @@
1
1
  ## Web Assembly version of DGGRID
2
2
 
3
- A wrapper for DGGRID in Web Assembly. Based on last DGGRID c++ library developed by Dr. Kevin
3
+ A WebAssembly wrapper for [DGGRID](https://github.com/sahrk/DGGRID), the C++ library for working with Discrete Global Grid Systems.
4
4
 
5
5
 
6
6
  <div align="center">
7
7
 
8
8
  [![NPM Version](https://img.shields.io/npm/v/webdggrid?style=flat-square)](https://www.npmjs.com/package/webdggrid)
9
9
  [![Docs](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/deploy.yml?style=flat-square&label=docs)](https://am2222.github.io/webDggrid/)
10
- [![npm package](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/main.yml?style=flat-square&label=npm%20package)](https://github.com/am2222/webDggrid/actions/workflows/main.yml)
10
+ [![CI](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/pr-check.yml?style=flat-square&label=ci)](https://github.com/am2222/webDggrid/actions/workflows/pr-check.yml)
11
+ [![npm package](https://img.shields.io/github/actions/workflow/status/am2222/webDggrid/publish.yml?style=flat-square&label=publish)](https://github.com/am2222/webDggrid/actions/workflows/publish.yml)
11
12
  [![](https://data.jsdelivr.com/v1/package/npm/webdggrid/badge)](https://www.jsdelivr.com/package/npm/webdggrid)
12
13
 
13
14
  </div>
@@ -47,64 +48,16 @@ const seqNum = dggs.geoToSequenceNum([[0, 0]]);
47
48
  ```
48
49
 
49
50
 
50
- ## Supported Functions
51
+ ## API
51
52
 
52
- **Grid Creation**
53
+ `setDggs` · `getResolution` · `setResolution` · `geoToSequenceNum` · `sequenceNumToGeo` · `sequenceNumToGrid` · `sequenceNumToGridFeatureCollection` · `geoToGeo` · `cellAreaKM` · `cellDistKM` · `nCells`
53
54
 
54
- - [setDggs](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#setDggs)
55
- - [getResolution](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#getResolution)
56
- - [setResolution](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#setResolution)
55
+ See the [full API reference](https://am2222.github.io/webDggrid/api/) for details and type signatures.
57
56
 
58
- **Grid Statistics**
57
+ ## Contributing & Development
59
58
 
60
- - [cellAreaKM](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#cellAreaKM)
61
- - [cellDistKM](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#cellDistKM)
62
- - [nCells](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#nCells)
63
-
64
- **Grid Conversions**
65
-
66
- - [geoToGeo](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#geoToGeo)
67
- - [geoToSequenceNum](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#geoToSequenceNum)
68
- - [sequenceNumToGeo](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#sequenceNumToGeo)
69
- - [sequenceNumToGridFeatureCollection](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#sequenceNumToGridFeatureCollection)
70
- - [sequenceNumToGrid](https://am2222.github.io/webDggrid/api/classes/Webdggrid.html#sequenceNumToGrid)
59
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, project structure, and commit conventions.
71
60
 
72
61
  ## Changes
73
62
 
74
- Slow development pace.
75
-
76
- **1.0.5**
77
-
78
- - Added support to `SeqNumGrid`
79
-
80
- ## Development
81
-
82
- Make sure to setup `emscripten` on your machine.
83
-
84
- The development process involves modifying the `cpp` code and use `utils/make.js` to build the library.
85
-
86
- | Folder | Desc |
87
- |----------|:-------------:|
88
- | src-cpp| The src file of the DGGRID. It is inspired from DGGRIDR project.|
89
- | src-ts| The src file js wrapper around the `emscripten` code to make it easier to interact with library in more `js` friendly approach.|
90
- | lib-wasm | The js output that `emscripten` generates |
91
- | lib-wasm-py | experimental python wrapper |
92
- | tests| JS unit tests |
93
-
94
- To build the entire library simply run
95
- ``yarn build``
96
-
97
- It will build webassembly file and also builds the typescript wrapper.
98
-
99
- ### Server the emscripten output [just for development purpuse]
100
-
101
- Run the following command. It will open the emscripten's default page to test the wasm file. Just navigate to `libdggrid.html`
102
- `
103
- yarn serve
104
- `
105
-
106
- you can invoke the functions similar to
107
-
108
- ```
109
- Module.DgGEO_to_SEQNUM(0,0,0,4,10,'HEXAGON','ISEA',[0],[0])
110
- ``
63
+ See [CHANGELOG.md](CHANGELOG.md) for the full history.