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.
- package/package.json +1 -1
- package/readme.md +9 -56
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
## Web Assembly version of DGGRID
|
|
2
2
|
|
|
3
|
-
A wrapper for DGGRID
|
|
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
|
[](https://www.npmjs.com/package/webdggrid)
|
|
9
9
|
[](https://am2222.github.io/webDggrid/)
|
|
10
|
-
[](https://github.com/am2222/webDggrid/actions/workflows/pr-check.yml)
|
|
11
|
+
[](https://github.com/am2222/webDggrid/actions/workflows/publish.yml)
|
|
11
12
|
[](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
|
-
##
|
|
51
|
+
## API
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
`setDggs` · `getResolution` · `setResolution` · `geoToSequenceNum` · `sequenceNumToGeo` · `sequenceNumToGrid` · `sequenceNumToGridFeatureCollection` · `geoToGeo` · `cellAreaKM` · `cellDistKM` · `nCells`
|
|
53
54
|
|
|
54
|
-
|
|
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
|
-
|
|
57
|
+
## Contributing & Development
|
|
59
58
|
|
|
60
|
-
|
|
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
|
-
|
|
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.
|