Skip to content

Commit

Permalink
Update some comments fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Oct 27, 2023
1 parent 9566751 commit 1ec24be
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 103 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ A digital basemap provides a consistent background detail necessary to orient lo

## Packages:

- [@basemaps/test](packages/__tests__/)
- [@basemaps/infra](packages/_infra/)
- [@basemaps/attribution](packages/attribution/)
- [@basemaps/bathymetry](packages/bathymetry/)
- [@basemaps/cli](packages/cli/)
- [@basemaps/cogify](packages/cogify/)
- [@basemaps/config](packages/config/)
- [@basemaps/geo](packages/geo/)
- [@basemaps/lambda-analytics](packages/lambda-analytics/)
- [@basemaps/lambda-tiler](packages/lambda-tiler/)
- [@basemaps/landing](packages/landing/)
- [@basemaps/server](packages/server/)
- [@basemaps/shared](packages/shared/)
- [@basemaps/smoke](packages/smoke/)
- [@basemaps/sprites](packages/sprites/)
- [@basemaps/tiler](packages/tiler/)
- [@basemaps/tiler-sharp](packages/tiler-sharp/)
- [@linzjs/docker-command](packages/linzjs-docker-command/)
- [@linzjs/geojson](packages/linzjs-geojson/)
- [@linzjs/metrics](packages/linzjs-metrics/)
- [@basemaps/test](packages/__tests__/) - Testing utilities and assets
- [@basemaps/infra](packages/_infra/) - Infrastructure code using [AWS CDK](https://github.com/aws/aws-cdk)
- [@basemaps/attribution](packages/attribution/) - Calculate the attribution for given map location
- [@basemaps/bathymetry](packages/bathymetry/) - Convert bathymetry from [GEBCO](https://www.gebco.net/) into colorized HillShade geotiff.
- [@basemaps/cli](packages/cli/) - cli that using for CICD process
- [@basemaps/cogify](packages/cogify/) - CLI to re-tile imagery into a Cloud Optimised Geotiffs (COG)
- [@basemaps/config](packages/config/) - Configurations for Basemaps system
- [@basemaps/geo](packages/geo/) - Utility to work with QuadKeys, Tiles and Projections.
- [@basemaps/lambda-analytics](packages/lambda-analytics/) - Generate analytics from CloudFront distribution statistics
- [@basemaps/lambda-tiler](packages/lambda-tiler/) - Lambda server for WMTS/XYZ map generation
- [@basemaps/landing](packages/landing/) - The landing page for Basemaps
- [@basemaps/server](packages/server/) - cli for WMTS/XYZ Tile server
- [@basemaps/shared](packages/shared/) - Shared Utilities for other Basemaps packages
- [@basemaps/smoke](packages/smoke/) - Smoke tests
- [@basemaps/sprites](packages/sprites/) - sprite sheet generation
- [@basemaps/tiler](packages/tiler/) - Compose CogGeoTiffs for xyz tile server
- [@basemaps/tiler-sharp](packages/tiler-sharp/) - Generate tiles by using [sharp](https://github.com/lovell/sharp) and [libvips](https://github.com/libvips/libvips)
- [@linzjs/docker-command](packages/linzjs-docker-command/) - Utilities for running Docker Commands
- [@linzjs/geojson](packages/linzjs-geojson/) - Utility for working with GeoJSO
- [@linzjs/metrics](packages/linzjs-metrics/) - Simple timing metric tracker for NodeJS

## Building

Expand Down
6 changes: 3 additions & 3 deletions packages/_infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The core tile generation service for [@basemaps/lambda-tiler](../lambda-tiler/)

### Edge

This is the edge of the tile serving, it is the egress point for all tiles. It deploys a CloudFront distribution with a lambda function that serve tiles for the Serve Stack
This is the edge of the tile serving, it is the egress point for all tiles.

## Usage

Expand All @@ -27,8 +27,7 @@ The infrastructure needs a number of environment variables to run
// The accountId that will be used to deploy into
CDK_DEFAULT_ACCOUNT;

// Due to the convoluted way that TLS certificates are made inside LINZ a hard coded TLS ARN is needed for the load balancer and Cloudfront
ALB_CERTIFICATE_ARN;
// Due to the convoluted way that TLS certificates are made inside LINZ a hard coded TLS ARN is needed for the Cloudfront
CLOUDFRONT_CERTIFICATE_ARN;
```

Expand All @@ -51,6 +50,7 @@ npx cdk list
```

To deploy `ServeStack` stack

```bash
npx cdk deploy ServeStack
```
22 changes: 0 additions & 22 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,6 @@ Import all configs from a bundled config.json into dynamo db from a given config
./bin/bmc.js import --config config.json --commit
```

## Usage -- Screenshots

Dump the screenshots from basemaps production, this mainly using for the screenshot validation smoke tests in the basemaps ci/cd process.

```bash
./bin/bmc.js screenshot
```

Dump the screenshots from different host

```bash
./bin/bmc.js screenshot --host HOST

```

Dump the screenshots with config file

```bash
./bin/bmc.js screenshot --config s3://..../config.json.gz

```

## Usage -- Create Config

Create a individual config.json from a path of imagery for Basemaps to load as standalone server to view them. This is mainly used for the preview images for the Basemaps imagery import process.
Expand Down
85 changes: 29 additions & 56 deletions packages/lambda-tiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ Lambda server for xyz map generation to provide apis for serving both raster and

## APIs

All available APIs are defined in the [index.ts](./src/index.ts)

`Host: https://basemaps.linz.govt.nz/`

### Server APIs

Validate the server status, health, version which is using for the ci/cd.

```typescript
handler.router.get('/ping', pingGet);
handler.router.get('/health', healthGet);
handler.router.get('/version', versionGet);
handler.router.get('/v1/ping', pingGet);
handler.router.get('/v1/health', healthGet);
handler.router.get('/v1/version', versionGet);
```
- GET [/ping](./src/routes/ping.ts)
- GET [/v1/ping](./src/routes/ping.ts)
- GET [/version](./src/routes/version.ts)
- GET [/v1/version](./src/routes/version.ts)
- GET [/health](./src/routes/health.ts)
- GET [/v1/health](./src/routes/health.ts)

### xyz tile generation API

Get a tile from the xyz and format for map generation, support both vector and raster tileSet.

```typescript
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/:z/:x/:y.:tileType', tileXyzGet);
```
- GET [/v1/tiles/:tileSet/:tileMatrix/:z/:x/:y.:tileType](./src/routes/tile.xyz.ts)

Example:

Expand All @@ -38,9 +36,7 @@ Example:

Fetch the imagery metadata based on the imageryId

```typescript
handler.router.get('/v1/imagery/:imageryId/:fileName', imageryGet);
```
- GET [/v1/imagery/:imageryId/:fileName](./src/routes/imagery.ts)

Examples:

Expand All @@ -56,75 +52,52 @@ Examples:

Fetch the imagery and tile set configurations

```typescript
handler.router.get('/v1/config/:tileSet.json', configTileSetGet);
handler.router.get('/v1/config/:tileSet/:imageryId.json', configImageryGet);
```
- GET [/v1/config/:tileSet.json](./src/routes/config.ts)
- GET [/v1/config/:tileSet/:imageryId.json](./src/routes/config.ts)

### Sprite and Fonts APIs

To get the fonts and sprites for the vector map.

```typescript
// Sprites
handler.router.get('/v1/sprites/:spriteName', spriteGet);

// Fonts
handler.router.get('/v1/fonts.json', fontList);
handler.router.get('/v1/fonts/:fontStack/:range.pbf', fontGet);
```
- GET [/v1/sprites/:spriteName](./src/routes/sprites.ts)
- GET [/v1/fonts.json](./src/routes/fonts.ts)
- GET [/v1/fonts/:fontStack/:range.pbf](./src/routes/fonts.ts)

### StyleJSON and TileJSON APIs

Get the style json and tile json for the vector map.

```typescript
// StyleJSON
handler.router.get('/v1/styles/:styleName.json', styleJsonGet);

// TileJSON
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/tile.json', tileJsonGet);
```
- GET [/v1/styles/:styleName.json](./src/routes/tile.style.json.ts)
- GET [/v1/tiles/:tileSet/:tileMatrix/tile.json](./src/routes/tile.json.ts)

### Preview APIs

Serve a preview of a imagery set

```typescript
handler.router.get('/v1/preview/:tileSet/:tileMatrix/:z/:lon/:lat', tilePreviewGet);
handler.router.get('/v1/@:location', previewIndexGet);
handler.router.get('/@:location', previewIndexGet);
```
- GET [/v1/preview/:tileSet/:tileMatrix/:z/:lon/:lat](./src/routes/preview.ts)
- GET [/v1/@:location](./src/routes/preview.index.ts)
- GET [/@:location](./src/routes/preview.index.ts)

### Attribution APIs

Get attribution json for the map attributions.

```typescript
// Attribution
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/attribution.json', tileAttributionGet);
handler.router.get('/v1/attribution/:tileSet/:tileMatrix/summary.json', tileAttributionGet);
```
- GET [/v1/tiles/:tileSet/:tileMatrix/attribution.json](./src/routes/attribution.ts)
- GET [/v1/attribution/:tileSet/:tileMatrix/summary.json](./src/routes/attribution.ts)

### WMTS Capabilities APIs

Get WMTS xml from the server to support QGIS and Arcgis

```typescript
// WMTS Capabilities
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml', wmtsCapabilitiesGet);
handler.router.get('/v1/tiles/:tileSet/WMTSCapabilities.xml', wmtsCapabilitiesGet);
handler.router.get('/v1/tiles/WMTSCapabilities.xml', wmtsCapabilitiesGet);
```
- GET [/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)
- GET [/v1/tiles/:tileSet/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)
- GET [/v1/tiles/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)

### Arcgis Vector APIs

Provide support to serve basemaps vector map in Arcgis

```typescript
// Arcgis Vector
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer', arcgisTileServerGet);
handler.router.post('/v1/arcgis/rest/services/:tileSet/VectorTileServer', OkResponse);
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer/root.json', arcgisStyleJsonGet);
handler.router.get('/v1/arcgis/rest/info', arcgisInfoGet);
```
- GET [/v1/arcgis/rest/services/:tileSet/VectorTileServer](./src/arcgis/vector.tile.server.ts)
- POST [/v1/arcgis/rest/services/:tileSet/VectorTileServer](./src/arcgis/vector.tile.server.ts)
- POST [/v1/arcgis/rest/services/:tileSet/VectorTileServer/root.json](./src/arcgis/arcgis.style.json.ts)
- POST [/v1/arcgis/rest/info](./src/arcgis/arcgis.info.ts)
2 changes: 1 addition & 1 deletion packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ basemaps-server --config path/to/config/

### Usage docker

The server is also published as a docker container
The server is also published as a [github container](https://github.com/linz/basemaps/pkgs/container/basemaps%2Fserver)

```bash
docker run -it \
Expand Down
2 changes: 1 addition & 1 deletion packages/tiler-sharp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @basemaps/tiler-sharp

Module contains the functions to support xyz tile server to generate tiles by using sharp.
Module contains the functions to support xyz tile server to generate tiles by using [sharp](https://github.com/lovell/sharp) and [libvips](https://github.com/libvips/libvips).

```typescript
const res = await compose({
Expand Down

0 comments on commit 1ec24be

Please sign in to comment.