Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 154 additions & 66 deletions src/tiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,165 +21,253 @@ export interface TestTile {
hillshade?: string;
}

const Locs = {
Mainland: { lat: -41.8899962, lng: 174.0492437 },
NorthIsland: { lat: -39.2169833, lng: 176.4774344 },
SouthIsland: { lat: -45.0735206, lng: 169.1674805 },
ChathamIslands: { lat: -43.9090948, lng: -176.540438 },

WellingtonUrban: { lat: -41.2890657, lng: 174.7769262 },
ChristchurchNorthUrban: { lat: -43.4567506, lng: 172.6109426 },

Akaroa: { lat: -43.8063936, lng: 172.9679876 },
AucklandAirport: { lat: -37.000845, lng: 174.8064383 },
CanterburyRural: { lat: -43.4040409, lng: 172.5393086 },
MountCookVillage: { lat: -43.717227, lng: 170.0844837 },
MountTaranaki: { lat: -39.3031717, lng: 174.0585208 },
Ngauranga: { lat: -41.2454458, lng: 174.8101136 },
OtakiSouth: { lat: -40.7727954, lng: 175.1504838 },
} as const;

export const DefaultTestTiles: TestTile[] = [
/**
* health: mainland
*/
{
name: 'health-3857-z5',
name: 'health-3857-mainland-z5',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.8899962, lng: 174.0492437, z: 5 },
location: { ...Locs.Mainland, z: 5 },
tileSet: 'health',
},
{
name: 'health-2193-z3',
name: 'health-2193-mainland-z3',
tileMatrix: TileMatrixIdentifier.Nztm2000Quad,
location: { lat: -41.8899962, lng: 174.0492437, z: 3 },
location: { ...Locs.Mainland, z: 3 },
tileSet: 'health',
},
/**
* aerial: specific locations
*/
{
name: 'aerial-3857-wellington-urban-z16',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.2890657, lng: 174.7769262, z: 16 },
location: { ...Locs.WellingtonUrban, z: 16 },
tileSet: 'aerial',
},
{
name: 'aerial-3857-canterbury-rural-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.4040409, lng: 172.5393086, z: 12 },
location: { ...Locs.CanterburyRural, z: 12 },
tileSet: 'aerial',
},
/**
* topographic-v2: north island
*/
{
name: 'topographic-3857-z8',
name: 'topographic-v2-3857-north-island-z8',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -39.2169833, lng: 176.4774344, z: 8 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.NorthIsland, z: 8 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
/**
* topolite-v2: north island
*/
{
name: 'topolite-3857-z8',
name: 'topolite-v2-3857-north-island-z8',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -39.2169833, lng: 176.4774344, z: 8 },
tileSet: 'topographic',
style: 'topolite',
location: { ...Locs.NorthIsland, z: 8 },
tileSet: 'topographic-v2',
style: 'topolite-v2',
},
/**
* topographic-v2: specific locations
*/
{
name: 'topographic-3857-z14',
name: 'topographic-v2-3857-mainland-z14',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.8899962, lng: 174.0492437, z: 14 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.Mainland, z: 14 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
{
name: 'topographic-3857-ngauranga-z15',
name: 'topographic-v2-3857-ngauranga-z15',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.2454458, lng: 174.8101136, z: 15 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.Ngauranga, z: 15 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
{
name: 'topographic-3857-auckland-airport-z13',
name: 'topographic-v2-3857-auckland-airport-z13',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -37.000845, lng: 174.8064383, z: 13 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.AucklandAirport, z: 13 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
{
name: 'topographic-3857-otaki-south-z13',
name: 'topographic-v2-3857-otaki-south-z13',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -40.7727954, lng: 175.1504838, z: 13 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.OtakiSouth, z: 13 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
{
name: 'topographic-3857-christchurch-north-urban-z17',
name: 'topographic-v2-3857-christchurch-north-urban-z17',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.4567506, lng: 172.6109426, z: 17 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.ChristchurchNorthUrban, z: 17 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
{
name: 'topographic-3857-mount-cook-village-z12',
name: 'topographic-v2-3857-mount-cook-village-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.717227, lng: 170.0844837, z: 12 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.MountCookVillage, z: 12 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
},
/**
* topolite-v2: specific locations
*/
{
name: 'topolite-3857-ngauranga-z15',
name: 'topolite-v2-3857-ngauranga-z15',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.2454458, lng: 174.8101136, z: 15 },
tileSet: 'topographic',
style: 'topolite',
location: { ...Locs.Ngauranga, z: 15 },
tileSet: 'topographic-v2',
style: 'topolite-v2',
},
{
name: 'topolite-3857-z17',
name: 'topolite-v2-3857-akaroa-z17',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.8063936, lng: 172.9679876, z: 17 },
tileSet: 'topographic',
style: 'topolite',
location: { ...Locs.Akaroa, z: 17 },
tileSet: 'topographic-v2',
style: 'topolite-v2',
},
/**
* aerial: terrain + hillshade, hillshade, terrain
*/
{
name: 'aerial-3857-terrain-hillshade-z6',
name: 'aerial-3857-south-island-terrain-hillshade-z6',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -45.0735206, lng: 169.1674805, z: 6 },
location: { ...Locs.SouthIsland, z: 6 },
tileSet: 'aerial',
style: 'aerial',
terrain: 'LINZ-Terrain',
hillshade: 'LINZ-Terrain',
},
{
name: 'aerial-3857-terrain-hillshade-z5',
name: 'aerial-3857-mainland-hillshade-z5',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -40.7681948, lng: 172.4544741, z: 5 },
location: { ...Locs.Mainland, z: 5 },
tileSet: 'aerial',
style: 'aerial',
hillshade: 'LINZ-Terrain',
},
{
name: 'aerial-3857-mount-taranaki-terrain-hillshade-z14',
name: 'aerial-3857-mount-taranaki-terrain-z14',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -39.3031717, lng: 174.0585208, z: 14, p: 43 },
location: { ...Locs.MountTaranaki, z: 14, p: 43 },
tileSet: 'aerial',
style: 'aerial',
terrain: 'LINZ-Terrain',
},
/**
* topographic-v2: terrain + hillshade, hillshade
*/
{
name: 'topographic-3857-terrain-hillshade-z12',
name: 'topographic-v2-3857-mainland-terrain-hillshade-z5',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -42.4146988, lng: 174.1766669, z: 5 },
tileSet: 'topographic',
style: 'topographic',
location: { ...Locs.Mainland, z: 5 },
tileSet: 'topographic-v2',
style: 'topographic-v2',
terrain: 'LINZ-Terrain',
hillshade: 'LINZ-Terrain',
},
/**
* topolite-v2: hillshade
*/
{
name: 'topolite-3857-hillshade-z4',
name: 'topolite-v2-3857-mainland-hillshade-z4',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.6092133, lng: 173.0748696, z: 4 },
tileSet: 'topographic',
style: 'topolite',
location: { ...Locs.Mainland, z: 4 },
tileSet: 'topographic-v2',
style: 'topolite-v2',
hillshade: 'LINZ-Terrain',
},
/**
* topo-raster: specific locations
*/
{
// verify the absence of black edge artifacts around the imagery's perimeter
name: 'nz-topo-gridless-maps-2193-nz-250k-z4',
name: 'topo-gridless-maps-2193-mainland-250k-z4',
tileMatrix: TileMatrixIdentifier.Nztm2000Quad,
location: { lat: -40.7899231, lng: 172.2977984, z: 4 },
location: { ...Locs.Mainland, z: 4 },
tileSet: 'topo-raster',
style: 'topo-raster',
},
{
// verify the location and re-projection of the chatham islands imagery
name: 'nz-topo-gridless-maps-3857-chatham-islands-250k-z10',
name: 'topo-gridless-maps-3857-chatham-islands-250k-z10',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.9090948, lng: -176.540438, z: 10 },
location: { ...Locs.ChathamIslands, z: 10 },
tileSet: 'topo-raster',
style: 'topo-raster',
},
{
// verify the tileset displays the 50k imagery
name: 'nz-topo-gridless-maps-3857-wellington-50k-z12',
name: 'topo-gridless-maps-3857-wellington-urban-50k-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.299807, lng: 174.8041651, z: 12 },
location: { ...Locs.WellingtonUrban, z: 12 },
tileSet: 'topo-raster',
style: 'topo-raster',
},

// TODO: We will keep support for these tilesets for 90 days, please remove the tests after deprecating

/**
* topographic: north island
*/
{
name: 'topographic-3857-north-island-z8',
tileMatrix: TileMatrixIdentifier.Google,
location: { ...Locs.NorthIsland, z: 8 },
tileSet: 'topographic',
style: 'topographic',
},
/**
* topolite: north island
*/
{
name: 'topolite-3857-north-island-z8',
tileMatrix: TileMatrixIdentifier.Google,
location: { ...Locs.NorthIsland, z: 8 },
tileSet: 'topographic',
style: 'topolite',
},
/**
* topographic: specific locations
*/
{
name: 'topographic-3857-mount-cook-village-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { ...Locs.MountCookVillage, z: 12 },
tileSet: 'topographic',
style: 'topographic',
},
{
name: 'topolite-3857-ngauranga-z15',
tileMatrix: TileMatrixIdentifier.Google,
location: { ...Locs.Ngauranga, z: 15 },
tileSet: 'topographic',
style: 'topolite',
},
];