Skip to content

Commit

Permalink
Merge f56369a into 737e519
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 13, 2023
2 parents 737e519 + f56369a commit 32ba474
Show file tree
Hide file tree
Showing 47 changed files with 58 additions and 58 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ While math.gl is highly **optimized for use with the WebGL and WebGPU APIs**, it
- **3D math** - Basic vectors and matrices, as well as 3D primitives and culling: **`@math.gl/types`**, **`@math.gl/core`**, **`@math.gl/culling`**
- **Geospatial projections** - Support for a variety of geospatial projections **`@math.gl/geospatial`**, **`@math.gl/geoid`**, **`@math.gl/proj4`**, **`@math.gl/web-mercator`**
- **Geospatial utilities** - Cutting polygons and calculating sun position and direction **`@math.gl/polygon`**, **`@math.gl/sun`**
- **Discrete Global Grids** - Standardized interfaces to a number of the major discrete global grids. **`@math.gl/geohash`**, **`@math.gl/quadkey`**, **`@math.gl/s2`**
- **Discrete Global Grids** - Standardized interfaces to a number of the major discrete global grids. **`@math.gl/dggs-geohash`**, **`@math.gl/dggs-quadkey`**, **`@math.gl/dggs-s2`**

## Modules

Expand All @@ -33,9 +33,9 @@ math.gl is a toolbox that offers a suite of composable modules.
| **DGGS (Discrete global grid support) libraries** | Module <span style={{width: 300}} /> | Description |
| ------------------------------------------------- | ------------------------------------ | ------------------------------- |
| | | |
| ![geohash](./images/dggs/geohash.png 'geohash') | **`@math.gl/geohash`** | Get geometry of GeoHash tokens. |
| ![quadkey](./images/dggs/quadkey.png 'quadkey') | **`@math.gl/quadkey`** | Get geometry of QuadKey tokens |
| ![s2](./images/dggs/s2.png 's2') | **`@math.gl/s2`** | Get geometry of S2 tokens. |
| ![geohash](./images/dggs/geohash.png 'geohash') | **`@math.gl/dggs-geohash`** | Get geometry of GeoHash tokens. |
| ![quadkey](./images/dggs/quadkey.png 'quadkey') | **`@math.gl/dggs-quadkey`** | Get geometry of QuadKey tokens |
| ![s2](./images/dggs/s2.png 's2') | **`@math.gl/dggs-s2`** | Get geometry of S2 tokens. |

<br/>
In addition, math.gl provides a few deprecated legacy modules, to avoid breaking older applications.
Expand Down
12 changes: 6 additions & 6 deletions docs/developer-guide/geospatial/dggs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ In terms of API design and nomenclature, the golden standard for DGGS systems at

## Supported Grid Systems

| DGGS | Module | Functionality |
| ----------------------------------------------- | ------------------ | ------------------------------- |
| ![GeoHash](../../images/dggs/geohash.png 'GeoHash') | `@math.gl/geohash` | Get geometry of GeoHash tokens. |
| ![QuadKey](../../images/dggs/quadkey.png 'QuadKey') | `@math.gl/quadkey` | Get geometry of QuadKey tokens |
| ![S2](../../images/dggs/s2.png 'S2') | `@math.gl/s2` | Get geometry of S2 tokens. |
| ![H3](../../images/dggs/h3.png 'H3') | `h3-js` \* | Get geometry of H3 tokens. |
| DGGS | Module | Functionality |
| --------------------------------------------------- | ----------------------- | ------------------------------- |
| ![GeoHash](../../images/dggs/geohash.png 'GeoHash') | `@math.gl/dggs-geohash` | Get geometry of GeoHash tokens. |
| ![QuadKey](../../images/dggs/quadkey.png 'QuadKey') | `@math.gl/dggs-quadkey` | Get geometry of QuadKey tokens |
| ![S2](../../images/dggs/s2.png 'S2') | `@math.gl/dggs-s2` | Get geometry of S2 tokens. |
| ![H3](../../images/dggs/h3.png 'H3') | `h3-js` \* | Get geometry of H3 tokens. |

Note that `h3-js` is not a `math.gl` library. For H3 it is recommended to work directly with the H3 JavaScript bindings.

Expand Down
18 changes: 9 additions & 9 deletions docs/docs-sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,26 @@
},
{
"type": "category",
"label": "@math.gl/geohash",
"label": "@math.gl/dggs-geohash",
"items": [
"modules/geohash/README",
"modules/geohash/api-reference/geohash"
"modules/dggs-geohash/README",
"modules/dggs-geohash/api-reference/geohash"
]
},
{
"type": "category",
"label": "@math.gl/quadkey",
"label": "@math.gl/dggs-quadkey",
"items": [
"modules/quadkey/README",
"modules/quadkey/api-reference/quadkey"
"modules/dggs-quadkey/README",
"modules/dggs-quadkey/api-reference/quadkey"
]
},
{
"type": "category",
"label": "@math.gl/s2",
"label": "@math.gl/dggs-s2",
"items": [
"modules/s2/README",
"modules/s2/api-reference/s2"
"modules/dggs-s2/README",
"modules/dggs-s2/api-reference/s2"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
</p>


`@math.gl/geohash` is a JavaScript library with
`@math.gl/dggs-geohash` is a JavaScript library with

## Installation

```bash
npm install @math.gl/sun
npm install @math.gl/dggs-geohash
```

## Usage

```js
import {getGeohashPolygon} from '@math.gl/quadkey';
import {getGeohashPolygon} from '@math.gl/dggs-geohash';
const polygon = getGeohashPolygon(geohash);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<img src="https://img.shields.io/badge/From-v3.7-blue.svg?style=flat-square" alt="From-v3.7" />
</p>

`@math.gl/quadkey` is a JavaScript library providing math for the Quadkey DGGS (Discrete Global Grid System).
`@math.gl/dggs-quadkey` is a JavaScript library providing math for the Quadkey DGGS (Discrete Global Grid System).

## Installation

```bash
npm install @math.gl/quadkey
npm install @math.gl/dggs-quadkey
```

## Usage

Get a polygon representing the outline of a specific
```js
import {getQuadkeyLngLat} from '@math.gl/quadkey';
import {getQuadkeyLngLat} from '@math.gl/dggs-quadkey';
const center = getQuadkeyLngLat(quadkey);
```

Expand Down
6 changes: 3 additions & 3 deletions docs/modules/s2/README.md → docs/modules/dggs-s2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<img src="https://img.shields.io/badge/From-v3.7-blue.svg?style=flat-square" alt="From-v3.7" />
</p>

`@math.gl/s2` is a small JavaScript library for working with the S2 DGGS (Discrete Global Grid System).
`@math.gl/dggs-s2` is a small JavaScript library for working with the S2 DGGS (Discrete Global Grid System).

## Installation

```bash
npm install @math.gl/s2
npm install @math.gl/dggs-s2
```

## Usage

```js
import {} from '@math.gl/s2';
import {} from '@math.gl/dggs-s2';
```

## Attribution
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@
</tbody>
</table>

## v3.7 (In Development)
## v4.0 (In Development)

Target Release Date: March, 2023
Target Release Date: Q4, 2023

- Three new modules for working with DGGS (Discrete Global Grid System) math.
- Node.js v18 is now officially supported.
- Typescript v5 now used

**`@math.gl/geohash`** (NEW MODULE)
**`@math.gl/dggs-geohash`** (NEW MODULE)

- New module with math for the GeoHash DGGS (Discrete Global Grid System).

**`@math.gl/quadkey`** (NEW MODULE)
**`@math.gl/dggs-quadkey`** (NEW MODULE)

- New module with math for the quadkey DGGS (Discrete Global Grid System).

**`@math.gl/s2`** (NEW MODULE)
**`@math.gl/dggs-s2`** (NEW MODULE)

- New module that contains a lightweight implementation of the S2 DGGS (Discrete Global Grid System).

**`@math.gl/core`
**`@math.gl/core`**

- `config` is now truly global (stored on `globalThis`).

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.0-alpha.4",
"version": "4.0.0-beta.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@math.gl/geohash",
"name": "@math.gl/dggs-geohash",
"description": "Math for the GeoHash DGGS (Discrete Global Grid System)",
"license": "MIT",
"type": "module",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'tape-promise/tape';
import {getGeohashBounds, getGeohashBoundaryFlat} from '@math.gl/geohash';
import {getGeohashBounds, getGeohashBoundaryFlat} from '@math.gl/dggs-geohash';

const TEST_DATA = [
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@math.gl/quadkey",
"name": "@math.gl/dggs-quadkey",
"description": "Math for the quadkey DGGS (Discrete Global Grid System)",
"license": "MIT",
"type": "module",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'tape-promise/tape';
import {quadkeyToWorldBounds, getQuadkeyBoundary} from '@math.gl/quadkey';
import {quadkeyToWorldBounds, getQuadkeyBoundary} from '@math.gl/dggs-quadkey';

const TEST_DATA = [
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion modules/s2/README.md → modules/dggs-s2/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @math.gl/s2
# @math.gl/dggs-s2

[math.gl](https://math.gl/docs) is a suite of math modules for 3D and geospatial applications.

Expand Down
2 changes: 1 addition & 1 deletion modules/s2/package.json → modules/dggs-s2/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@math.gl/s2",
"name": "@math.gl/dggs-s2",
"description": "A minimal S2 DGGS (Discrete Global Grid System) implementation",
"license": "MIT",
"type": "module",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import test from 'tape-promise/tape';

import {_toHilbertQuadKey as toHilbertQuadKey} from '@math.gl/s2';
import {_toHilbertQuadKey as toHilbertQuadKey} from '@math.gl/dggs-s2';
import {S2} from 's2-geometry';
import Long from 'long';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// loaders.gl, MIT license
import test from 'tape-promise/tape';

import {getS2BoundaryFlat} from '@math.gl/s2';
import {getS2BoundaryFlat} from '@math.gl/dggs-s2';

// import Long from 'long';

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions test/modules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import '../modules/proj4/test';
import '../modules/sun/test';
import '../modules/web-mercator/test';

import '../modules/geohash/test';
import '../modules/quadkey/test';
import '../modules/s2/test';
import '../modules/dggs-geohash/test';
import '../modules/dggs-quadkey/test';
import '../modules/dggs-s2/test';
12 changes: 6 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@
"@math.gl/core/test/*": ["modules/core/test/*"],
"@math.gl/culling/*": ["modules/culling/src/*"],
"@math.gl/culling/test/*": ["modules/culling/test/*"],
"@math.gl/geohash/*": ["modules/geohash/src/*"],
"@math.gl/geohash/test/*": ["modules/geohash/test/*"],
"@math.gl/dggs-pgeohash/*": ["modules/dggs-pgeohash/src/*"],
"@math.gl/dggs-pgeohash/test/*": ["modules/dggs-pgeohash/test/*"],
"@math.gl/dggs-s2/*": ["modules/dggs-s2/src/*"],
"@math.gl/dggs-s2/test/*": ["modules/dggs-s2/test/*"],
"@math.gl/dggs-quadkey/*": ["modules/dggs-quadkey/src/*"],
"@math.gl/dggs-quadkey/test/*": ["modules/dggs-quadkey/test/*"],
"@math.gl/geoid/*": ["modules/geoid/src/*"],
"@math.gl/geoid/test/*": ["modules/geoid/test/*"],
"@math.gl/geospatial/*": ["modules/geospatial/src/*"],
Expand All @@ -54,14 +58,10 @@
"@math.gl/polygon/test/*": ["modules/polygon/test/*"],
"@math.gl/proj4/*": ["modules/proj4/src/*"],
"@math.gl/proj4/test/*": ["modules/proj4/test/*"],
"@math.gl/s2/*": ["modules/s2/src/*"],
"@math.gl/s2/test/*": ["modules/s2/test/*"],
"@math.gl/sun/*": ["modules/sun/src/*"],
"@math.gl/sun/test/*": ["modules/sun/test/*"],
"@math.gl/types/*": ["modules/types/src/*"],
"@math.gl/types/test/*": ["modules/types/test/*"],
"@math.gl/quadkey/*": ["modules/quadkey/src/*"],
"@math.gl/quadkey/test/*": ["modules/quadkey/test/*"],
"@math.gl/web-mercator/*": ["modules/web-mercator/src/*"],
"@math.gl/web-mercator/test/*": ["modules/web-mercator/test/*"],
"test/*": ["test/*"]
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"references": [
{"path": "modules/core"},
{"path": "modules/culling"},
{"path": "modules/geohash"},
{"path": "modules/dggs-geohash"},
{"path": "modules/dggs-s2"},
{"path": "modules/dggs-quadkey"},
{"path": "modules/geoid"},
{"path": "modules/geospatial"},
{"path": "modules/main"},
{"path": "modules/polygon"},
{"path": "modules/proj4"},
{"path": "modules/s2"},
{"path": "modules/sun"},
{"path": "modules/quadkey"},
{"path": "modules/web-mercator"}
],
"include": [
Expand Down
6 changes: 3 additions & 3 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ const config = {
'@math.gl/proj4': resolve('../modules/proj4/src'),
'@math.gl/web-mercator': resolve('../modules/web-mercator/src'),
'@math.gl/sun': resolve('../modules/sun/src'),
'@math.gl/geohash': resolve('../modules/mapbox/geohash'),
'@math.gl/quadkey': resolve('../modules/quadkey/src'),
'@math.gl/s2': resolve('../modules/s2/src'),
'@math.gl/ddgs-geohash': resolve('../modules/ddgs-geohash/src'),
'@math.gl/dggs-quadkey': resolve('../modules/dggs-quadkey/src'),
'@math.gl/dggs-s2': resolve('../modules/dggs-s2/src'),

'@probe.gl/bench': resolve('../node_modules/@probe.gl/bench')
}
Expand Down

0 comments on commit 32ba474

Please sign in to comment.