Skip to content

Commit

Permalink
docs: Use "map sheet" with spaces consistently in comments
Browse files Browse the repository at this point in the history
Avoids renaming things in code since that would be a breaking change.
  • Loading branch information
l0b0 committed Feb 11, 2024
1 parent df027fb commit 8d132ae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Outputs files for visualisation of the tiles and as an list for [topo-imagery](h
- `file-list.json` a list of source and target files to be used as an input for `topo-imagery`. Example: [file-list.json](docs/file-list.json)

`--validate`
Validate list of tiffs match a LINZ Mapsheet tile index and assert that there will be no duplicates. Example:
Validate list of tiffs match a LINZ map sheet tile index and assert that there will be no duplicates. Example:

```bash
tileindex-validate --validate --scale 5000 s3://linz-imagery/auckland/auckland_2010-2012_0.5m/rgb/2193/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('copyFiles', () => {
mem.put(satellite);
mem.put(southland);

it('Should create the correct mapsheets', async () => {
it('Should create the correct map sheets', async () => {
const outputs = await createMapSheet(aerial, mem, rest, undefined, undefined);

assert.deepEqual(outputs, [
Expand Down
4 changes: 2 additions & 2 deletions src/commands/basemaps-mapsheet/create-mapsheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const CommandCreateMapSheetArgs = {
output: option({
type: string,
long: 'output',
description: 'Output of the mapsheet file',
description: 'Output of the map sheet file',
}),
include: option({
type: optional(string),
Expand All @@ -68,7 +68,7 @@ export const CommandCreateMapSheetArgs = {
export const basemapsCreateMapSheet = command({
name: 'bm-create-mapsheet',
version: CliInfo.version,
description: 'Create a cog mapsheet from provided flatgeobuf',
description: 'Create a cog map sheet from provided flatgeobuf',
args: CommandCreateMapSheetArgs,
async handler(args) {
registerCli(this, args);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/tileindex-validate/tileindex.validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const TiffLoader = {
};

/**
* Validate list of tiffs match a LINZ Mapsheet tile index
* Validate list of tiffs match a LINZ map sheet tile index
*
* If --validate
* Asserts that there will be no duplicates
Expand Down Expand Up @@ -308,7 +308,7 @@ export async function extractTiffLocations(
const tileName = getTileName(x, y, gridSize);

// if (shouldValidate) {
// // Is the tiff bounding box the same as the mapsheet bounding box!
// // Is the tiff bounding box the same as the map sheet bounding box!
// // Also need to allow for ~1.5cm of error between bounding boxes.
// // assert bbox == MapSheet.getMapTileIndex(tileName).bbox
// }
Expand Down
12 changes: 6 additions & 6 deletions src/utils/mapsheet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** Parse topographic mapsheet names in the format `${mapSheet}_${gridSize}_${y}${x}` */
/** Parse topographic map sheet names in the format `${mapSheet}_${gridSize}_${y}${x}` */
const MapSheetRegex = /(?<sheetCode>[A-Z]{2}\d{2})(_(?<gridSize>\d+)_(?<tileId>\d+))?/;

export interface MapTileIndex {
Expand Down Expand Up @@ -63,7 +63,7 @@ export type GridSize = (typeof gridSizes)[number];
/**
* Topographic 1:50k map sheet calculator
*
* Useful for working with LINZ's Topo 1:50k mapsheet names and any of the tile indexes
* Useful for working with LINZ's Topo 1:50k map sheet names and any of the tile indexes
*
* LINZ Topo50:
* - https://www.linz.govt.nz/products-services/maps/new-zealand-topographic-maps/topo50-map-chooser/topo50-sheet-index
Expand All @@ -77,11 +77,11 @@ export type GridSize = (typeof gridSizes)[number];
* - https://data.linz.govt.nz/layer/106965-nz-1500-tile-index/ 1:500
**/
export const MapSheet = {
/** Height of Topo 1:50k mapsheets (meters) */
/** Height of Topo 1:50k map sheets (meters) */
height: 36_000,
/** Width of Topo 1:50k mapsheets (meters) */
/** Width of Topo 1:50k map sheets (meters) */
width: 24_000,
/** Base scale Topo 1:50k mapsheets (meters) */
/** Base scale Topo 1:50k map sheets (meters) */
scale: mapSheetTileGridSize,
/** Map Sheets start at AS and end at CK */
code: { start: 'AS', end: 'CK' },
Expand All @@ -93,7 +93,7 @@ export const MapSheet = {
gridSizes: gridSizes,

/**
* Get the expected origin and mapsheet information from a file name
* Get the expected origin and map sheet information from a file name
*
* @example
* ```typescript
Expand Down

0 comments on commit 8d132ae

Please sign in to comment.