@basemaps/landing 7.8.0 → 7.10.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/build/components/debug.d.ts +5 -1
- package/build/components/debug.js +41 -2
- package/build/components/debug.js.map +1 -1
- package/build/components/map.d.ts +0 -2
- package/build/components/map.js +5 -65
- package/build/components/map.js.map +1 -1
- package/build/components/map.label.d.ts +15 -0
- package/build/components/map.label.js +106 -0
- package/build/components/map.label.js.map +1 -0
- package/build/components/map.switcher.js +4 -6
- package/build/components/map.switcher.js.map +1 -1
- package/build/config.map.d.ts +5 -0
- package/build/config.map.js +21 -1
- package/build/config.map.js.map +1 -1
- package/build/tile.matrix.d.ts +8 -2
- package/build/tile.matrix.js +6 -6
- package/build/tile.matrix.js.map +1 -1
- package/build/url.d.ts +1 -0
- package/build/url.js +7 -1
- package/build/url.js.map +1 -1
- package/dist/docs/404.html +22 -0
- package/dist/docs/configuration/index.html +7 -0
- package/dist/docs/deployment/index.html +7 -0
- package/dist/docs/developer-guide/index.html +7 -0
- package/dist/docs/examples/_overview/index.html +7 -0
- package/dist/docs/examples/leaflet.xyz.3857/index.html +7 -0
- package/dist/docs/examples/maplibre.opacity.3857/index.html +7 -0
- package/dist/docs/examples/maplibre.vector.3857/index.html +7 -0
- package/dist/docs/index.html +7 -0
- package/dist/docs/operator-guide/cog-quality/index.html +7 -0
- package/dist/docs/operator-guide/empty-tiles/index.html +7 -0
- package/dist/docs/operator-guide/gebco/index.html +7 -0
- package/dist/docs/operator-guide/index.html +7 -0
- package/dist/docs/operator-guide/quick-start/index.html +7 -0
- package/dist/docs/operator-guide/relief-shade/index.html +7 -0
- package/dist/docs/operator-guide/static/projection_beehive_fakenztm2000.webp +0 -0
- package/dist/docs/operator-guide/static/projection_beehive_nztm2000quad.webp +0 -0
- package/dist/docs/operator-guide/static/projection_nztm2000quad_0_0_0.webp +0 -0
- package/dist/docs/operator-guide/texture-shade/index.html +8 -1
- package/dist/docs/operator-guide/xyz-projection/index.html +533 -0
- package/dist/docs/quick-start/index.html +7 -0
- package/dist/docs/sitemap.xml +24 -19
- package/dist/docs/sitemap.xml.gz +0 -0
- package/dist/docs/user-guide/_get-started/index.html +8 -1
- package/dist/docs/user-guide/api-documentation/index.html +8 -1
- package/dist/docs/user-guide/api-documentation/{swagger-9e70fa04.html → swagger-a5588c46.html} +1 -1
- package/dist/docs/user-guide/technical-documentation/index.html +7 -0
- package/package.json +5 -5
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
|
|
4
|
+
<html class="no-js" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta charset="utf-8"/>
|
|
7
|
+
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
|
8
|
+
<link href="http://localhost:8000/docs/operator-guide/xyz-projection/" rel="canonical"/>
|
|
9
|
+
<link href="../texture-shade/" rel="prev"/>
|
|
10
|
+
<link href="../../user-guide/_get-started/" rel="next"/>
|
|
11
|
+
<link href="../../assets/images/favicon.png" rel="icon"/>
|
|
12
|
+
<meta content="mkdocs-1.5.3, mkdocs-material-9.4.10" name="generator"/>
|
|
13
|
+
<title>XYZ and projection math - LINZ Basemaps</title>
|
|
14
|
+
<link href="../../assets/stylesheets/main.fad675c6.min.css" rel="stylesheet"/>
|
|
15
|
+
<link href="../../assets/stylesheets/palette.356b1318.min.css" rel="stylesheet"/>
|
|
16
|
+
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i%7COpen+Sans+Mono:400,400i,700,700i&display=fallback" rel="stylesheet"/>
|
|
18
|
+
<style>:root{--md-text-font:"Open Sans";--md-code-font:"Open Sans Mono"}</style>
|
|
19
|
+
<link href="../../index.css" rel="stylesheet"/>
|
|
20
|
+
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
21
|
+
<script id="__analytics">function __md_analytics(){function n(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",""),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){this.value&&n("event","search",{search_term:this.value})}),document$.subscribe(function(){var a=document.forms.feedback;if(void 0!==a)for(var e of a.querySelectorAll("[type=submit]"))e.addEventListener("click",function(e){e.preventDefault();var t=document.location.pathname,e=this.getAttribute("data-md-value");n("event","feedback",{page:t,data:e}),a.firstElementChild.disabled=!0;e=a.querySelector(".md-feedback__note [data-md-value='"+e+"']");e&&(e.hidden=!1)}),a.hidden=!1}),location$.subscribe(function(e){n("config","",{page_path:e.pathname})})});var e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=",document.getElementById("__analytics").insertAdjacentElement("afterEnd",e)}</script>
|
|
22
|
+
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
|
|
23
|
+
</head>
|
|
24
|
+
<body data-md-color-accent="indigo" data-md-color-primary="indigo" data-md-color-scheme="default" dir="ltr">
|
|
25
|
+
<script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
|
|
26
|
+
<input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
|
|
27
|
+
<input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
|
|
28
|
+
<label class="md-overlay" for="__drawer"></label>
|
|
29
|
+
<div data-md-component="skip">
|
|
30
|
+
<a class="md-skip" href="#xyz-and-projection-math">
|
|
31
|
+
Skip to content
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
<div data-md-component="announce">
|
|
35
|
+
</div>
|
|
36
|
+
<header class="md-header md-header--shadow" data-md-component="header">
|
|
37
|
+
<nav aria-label="Header" class="md-header__inner md-grid">
|
|
38
|
+
<a aria-label="LINZ Basemaps" class="md-header__button md-logo" data-md-component="logo" href="../.." title="LINZ Basemaps">
|
|
39
|
+
<img alt="logo" src="../../linz-motif.svg"/>
|
|
40
|
+
</a>
|
|
41
|
+
<label class="md-header__button md-icon" for="__drawer">
|
|
42
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"></path></svg>
|
|
43
|
+
</label>
|
|
44
|
+
<div class="md-header__title" data-md-component="header-title">
|
|
45
|
+
<div class="md-header__ellipsis">
|
|
46
|
+
<div class="md-header__topic">
|
|
47
|
+
<span class="md-ellipsis">
|
|
48
|
+
LINZ Basemaps
|
|
49
|
+
</span>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="md-header__topic" data-md-component="header-topic">
|
|
52
|
+
<span class="md-ellipsis">
|
|
53
|
+
|
|
54
|
+
XYZ and projection math
|
|
55
|
+
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<form class="md-header__option" data-md-component="palette">
|
|
61
|
+
<input aria-label="Switch to dark mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="(prefers-color-scheme: light)" data-md-color-primary="indigo" data-md-color-scheme="default" id="__palette_1" name="__palette" type="radio"/>
|
|
62
|
+
<label class="md-header__button md-icon" for="__palette_2" hidden="" title="Switch to dark mode">
|
|
63
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"></path></svg>
|
|
64
|
+
</label>
|
|
65
|
+
<input aria-label="Switch to light mode" class="md-option" data-md-color-accent="indigo" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-primary="indigo" data-md-color-scheme="slate" id="__palette_2" name="__palette" type="radio"/>
|
|
66
|
+
<label class="md-header__button md-icon" for="__palette_1" hidden="" title="Switch to light mode">
|
|
67
|
+
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"></path></svg>
|
|
68
|
+
</label>
|
|
69
|
+
</form>
|
|
70
|
+
<div class="md-header__source">
|
|
71
|
+
<a class="md-source" data-md-component="source" href="https://github.com/linz/basemaps" title="Go to repository">
|
|
72
|
+
<div class="md-source__icon md-icon">
|
|
73
|
+
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"></path></svg>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="md-source__repository">
|
|
76
|
+
GitHub
|
|
77
|
+
</div>
|
|
78
|
+
</a>
|
|
79
|
+
</div>
|
|
80
|
+
</nav>
|
|
81
|
+
</header>
|
|
82
|
+
<div class="md-container" data-md-component="container">
|
|
83
|
+
<main class="md-main" data-md-component="main">
|
|
84
|
+
<div class="md-main__inner md-grid">
|
|
85
|
+
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation">
|
|
86
|
+
<div class="md-sidebar__scrollwrap">
|
|
87
|
+
<div class="md-sidebar__inner">
|
|
88
|
+
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
|
|
89
|
+
<label class="md-nav__title" for="__drawer">
|
|
90
|
+
<a aria-label="LINZ Basemaps" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="LINZ Basemaps">
|
|
91
|
+
<img alt="logo" src="../../linz-motif.svg"/>
|
|
92
|
+
</a>
|
|
93
|
+
LINZ Basemaps
|
|
94
|
+
</label>
|
|
95
|
+
<div class="md-nav__source">
|
|
96
|
+
<a class="md-source" data-md-component="source" href="https://github.com/linz/basemaps" title="Go to repository">
|
|
97
|
+
<div class="md-source__icon md-icon">
|
|
98
|
+
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"></path></svg>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="md-source__repository">
|
|
101
|
+
GitHub
|
|
102
|
+
</div>
|
|
103
|
+
</a>
|
|
104
|
+
</div>
|
|
105
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
106
|
+
<li class="md-nav__item">
|
|
107
|
+
<a class="md-nav__link" href="../..">
|
|
108
|
+
<span class="md-ellipsis">
|
|
109
|
+
LINZ Basemaps
|
|
110
|
+
</span>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li class="md-nav__item">
|
|
114
|
+
<a class="md-nav__link" href="../../configuration/">
|
|
115
|
+
<span class="md-ellipsis">
|
|
116
|
+
Configuration
|
|
117
|
+
</span>
|
|
118
|
+
</a>
|
|
119
|
+
</li>
|
|
120
|
+
<li class="md-nav__item">
|
|
121
|
+
<a class="md-nav__link" href="../../deployment/">
|
|
122
|
+
<span class="md-ellipsis">
|
|
123
|
+
Deployment
|
|
124
|
+
</span>
|
|
125
|
+
</a>
|
|
126
|
+
</li>
|
|
127
|
+
<li class="md-nav__item">
|
|
128
|
+
<a class="md-nav__link" href="../../quick-start/">
|
|
129
|
+
<span class="md-ellipsis">
|
|
130
|
+
Quick start guide
|
|
131
|
+
</span>
|
|
132
|
+
</a>
|
|
133
|
+
</li>
|
|
134
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
135
|
+
<input class="md-nav__toggle md-toggle" id="__nav_5" type="checkbox"/>
|
|
136
|
+
<div class="md-nav__link md-nav__container">
|
|
137
|
+
<a class="md-nav__link" href="../../developer-guide/">
|
|
138
|
+
<span class="md-ellipsis">
|
|
139
|
+
Developer guide
|
|
140
|
+
</span>
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
<nav aria-expanded="false" aria-labelledby="__nav_5_label" class="md-nav" data-md-level="1">
|
|
144
|
+
<label class="md-nav__title" for="__nav_5">
|
|
145
|
+
<span class="md-nav__icon md-icon"></span>
|
|
146
|
+
Developer guide
|
|
147
|
+
</label>
|
|
148
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
149
|
+
</ul>
|
|
150
|
+
</nav>
|
|
151
|
+
</li>
|
|
152
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
153
|
+
<input class="md-nav__toggle md-toggle" id="__nav_6" type="checkbox"/>
|
|
154
|
+
<label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
|
|
155
|
+
<span class="md-ellipsis">
|
|
156
|
+
Examples
|
|
157
|
+
</span>
|
|
158
|
+
<span class="md-nav__icon md-icon"></span>
|
|
159
|
+
</label>
|
|
160
|
+
<nav aria-expanded="false" aria-labelledby="__nav_6_label" class="md-nav" data-md-level="1">
|
|
161
|
+
<label class="md-nav__title" for="__nav_6">
|
|
162
|
+
<span class="md-nav__icon md-icon"></span>
|
|
163
|
+
Examples
|
|
164
|
+
</label>
|
|
165
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
166
|
+
<li class="md-nav__item">
|
|
167
|
+
<a class="md-nav__link" href="../../examples/_overview/">
|
|
168
|
+
<span class="md-ellipsis">
|
|
169
|
+
Overview
|
|
170
|
+
</span>
|
|
171
|
+
</a>
|
|
172
|
+
</li>
|
|
173
|
+
<li class="md-nav__item">
|
|
174
|
+
<a class="md-nav__link" href="../../examples/leaflet.xyz.3857/">
|
|
175
|
+
<span class="md-ellipsis">
|
|
176
|
+
Leaflet Raster Map
|
|
177
|
+
</span>
|
|
178
|
+
</a>
|
|
179
|
+
</li>
|
|
180
|
+
<li class="md-nav__item">
|
|
181
|
+
<a class="md-nav__link" href="../../examples/maplibre.opacity.3857/">
|
|
182
|
+
<span class="md-ellipsis">
|
|
183
|
+
Maplibre Opacity Slider
|
|
184
|
+
</span>
|
|
185
|
+
</a>
|
|
186
|
+
</li>
|
|
187
|
+
<li class="md-nav__item">
|
|
188
|
+
<a class="md-nav__link" href="../../examples/maplibre.vector.3857/">
|
|
189
|
+
<span class="md-ellipsis">
|
|
190
|
+
Maplibre Vector Map
|
|
191
|
+
</span>
|
|
192
|
+
</a>
|
|
193
|
+
</li>
|
|
194
|
+
</ul>
|
|
195
|
+
</nav>
|
|
196
|
+
</li>
|
|
197
|
+
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
198
|
+
<input checked="" class="md-nav__toggle md-toggle" id="__nav_7" type="checkbox"/>
|
|
199
|
+
<div class="md-nav__link md-nav__container">
|
|
200
|
+
<a class="md-nav__link" href="../">
|
|
201
|
+
<span class="md-ellipsis">
|
|
202
|
+
Operator guide
|
|
203
|
+
</span>
|
|
204
|
+
</a>
|
|
205
|
+
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
|
|
206
|
+
<span class="md-nav__icon md-icon"></span>
|
|
207
|
+
</label>
|
|
208
|
+
</div>
|
|
209
|
+
<nav aria-expanded="true" aria-labelledby="__nav_7_label" class="md-nav" data-md-level="1">
|
|
210
|
+
<label class="md-nav__title" for="__nav_7">
|
|
211
|
+
<span class="md-nav__icon md-icon"></span>
|
|
212
|
+
Operator guide
|
|
213
|
+
</label>
|
|
214
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
215
|
+
<li class="md-nav__item">
|
|
216
|
+
<a class="md-nav__link" href="../cog-quality/">
|
|
217
|
+
<span class="md-ellipsis">
|
|
218
|
+
COG Quality
|
|
219
|
+
</span>
|
|
220
|
+
</a>
|
|
221
|
+
</li>
|
|
222
|
+
<li class="md-nav__item">
|
|
223
|
+
<a class="md-nav__link" href="../empty-tiles/">
|
|
224
|
+
<span class="md-ellipsis">
|
|
225
|
+
Sparse Datasets and empty tiles
|
|
226
|
+
</span>
|
|
227
|
+
</a>
|
|
228
|
+
</li>
|
|
229
|
+
<li class="md-nav__item">
|
|
230
|
+
<a class="md-nav__link" href="../gebco/">
|
|
231
|
+
<span class="md-ellipsis">
|
|
232
|
+
Gebco re-project to NZTM2000Quad cog file
|
|
233
|
+
</span>
|
|
234
|
+
</a>
|
|
235
|
+
</li>
|
|
236
|
+
<li class="md-nav__item">
|
|
237
|
+
<a class="md-nav__link" href="../quick-start/">
|
|
238
|
+
<span class="md-ellipsis">
|
|
239
|
+
Running LINZ Basemaps - Quick Start
|
|
240
|
+
</span>
|
|
241
|
+
</a>
|
|
242
|
+
</li>
|
|
243
|
+
<li class="md-nav__item">
|
|
244
|
+
<a class="md-nav__link" href="../relief-shade/">
|
|
245
|
+
<span class="md-ellipsis">
|
|
246
|
+
Relief shade
|
|
247
|
+
</span>
|
|
248
|
+
</a>
|
|
249
|
+
</li>
|
|
250
|
+
<li class="md-nav__item">
|
|
251
|
+
<a class="md-nav__link" href="../texture-shade/">
|
|
252
|
+
<span class="md-ellipsis">
|
|
253
|
+
Texture shading
|
|
254
|
+
</span>
|
|
255
|
+
</a>
|
|
256
|
+
</li>
|
|
257
|
+
<li class="md-nav__item md-nav__item--active">
|
|
258
|
+
<input class="md-nav__toggle md-toggle" id="__toc" type="checkbox"/>
|
|
259
|
+
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
<span class="md-nav__icon md-icon"></span>
|
|
264
|
+
</label>
|
|
265
|
+
<a class="md-nav__link md-nav__link--active" href="./">
|
|
266
|
+
<span class="md-ellipsis">
|
|
267
|
+
XYZ and projection math
|
|
268
|
+
</span>
|
|
269
|
+
</a>
|
|
270
|
+
<nav aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
271
|
+
<label class="md-nav__title" for="__toc">
|
|
272
|
+
<span class="md-nav__icon md-icon"></span>
|
|
273
|
+
Table of contents
|
|
274
|
+
</label>
|
|
275
|
+
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
|
|
276
|
+
<li class="md-nav__item">
|
|
277
|
+
<a class="md-nav__link" href="#background">
|
|
278
|
+
<span class="md-ellipsis">
|
|
279
|
+
Background
|
|
280
|
+
</span>
|
|
281
|
+
</a>
|
|
282
|
+
</li>
|
|
283
|
+
<li class="md-nav__item">
|
|
284
|
+
<a class="md-nav__link" href="#process">
|
|
285
|
+
<span class="md-ellipsis">
|
|
286
|
+
Process
|
|
287
|
+
</span>
|
|
288
|
+
</a>
|
|
289
|
+
</li>
|
|
290
|
+
<li class="md-nav__item">
|
|
291
|
+
<a class="md-nav__link" href="#example">
|
|
292
|
+
<span class="md-ellipsis">
|
|
293
|
+
Example
|
|
294
|
+
</span>
|
|
295
|
+
</a>
|
|
296
|
+
<nav aria-label="Example" class="md-nav">
|
|
297
|
+
<ul class="md-nav__list">
|
|
298
|
+
<li class="md-nav__item">
|
|
299
|
+
<a class="md-nav__link" href="#example-code">
|
|
300
|
+
<span class="md-ellipsis">
|
|
301
|
+
Example Code
|
|
302
|
+
</span>
|
|
303
|
+
</a>
|
|
304
|
+
</li>
|
|
305
|
+
</ul>
|
|
306
|
+
</nav>
|
|
307
|
+
</li>
|
|
308
|
+
</ul>
|
|
309
|
+
</nav>
|
|
310
|
+
</li>
|
|
311
|
+
</ul>
|
|
312
|
+
</nav>
|
|
313
|
+
</li>
|
|
314
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
315
|
+
<input class="md-nav__toggle md-toggle" id="__nav_8" type="checkbox"/>
|
|
316
|
+
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
|
|
317
|
+
<span class="md-ellipsis">
|
|
318
|
+
User guide
|
|
319
|
+
</span>
|
|
320
|
+
<span class="md-nav__icon md-icon"></span>
|
|
321
|
+
</label>
|
|
322
|
+
<nav aria-expanded="false" aria-labelledby="__nav_8_label" class="md-nav" data-md-level="1">
|
|
323
|
+
<label class="md-nav__title" for="__nav_8">
|
|
324
|
+
<span class="md-nav__icon md-icon"></span>
|
|
325
|
+
User guide
|
|
326
|
+
</label>
|
|
327
|
+
<ul class="md-nav__list" data-md-scrollfix="">
|
|
328
|
+
<li class="md-nav__item">
|
|
329
|
+
<a class="md-nav__link" href="../../user-guide/_get-started/">
|
|
330
|
+
<span class="md-ellipsis">
|
|
331
|
+
Get started with LINZ Basemaps
|
|
332
|
+
</span>
|
|
333
|
+
</a>
|
|
334
|
+
</li>
|
|
335
|
+
<li class="md-nav__item">
|
|
336
|
+
<a class="md-nav__link" href="../../user-guide/api-documentation/">
|
|
337
|
+
<span class="md-ellipsis">
|
|
338
|
+
API documentation
|
|
339
|
+
</span>
|
|
340
|
+
</a>
|
|
341
|
+
</li>
|
|
342
|
+
<li class="md-nav__item">
|
|
343
|
+
<a class="md-nav__link" href="../../user-guide/technical-documentation/">
|
|
344
|
+
<span class="md-ellipsis">
|
|
345
|
+
Technical documentation and specifications
|
|
346
|
+
</span>
|
|
347
|
+
</a>
|
|
348
|
+
</li>
|
|
349
|
+
</ul>
|
|
350
|
+
</nav>
|
|
351
|
+
</li>
|
|
352
|
+
</ul>
|
|
353
|
+
</nav>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc">
|
|
358
|
+
<div class="md-sidebar__scrollwrap">
|
|
359
|
+
<div class="md-sidebar__inner">
|
|
360
|
+
<nav aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
361
|
+
<label class="md-nav__title" for="__toc">
|
|
362
|
+
<span class="md-nav__icon md-icon"></span>
|
|
363
|
+
Table of contents
|
|
364
|
+
</label>
|
|
365
|
+
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix="">
|
|
366
|
+
<li class="md-nav__item">
|
|
367
|
+
<a class="md-nav__link" href="#background">
|
|
368
|
+
<span class="md-ellipsis">
|
|
369
|
+
Background
|
|
370
|
+
</span>
|
|
371
|
+
</a>
|
|
372
|
+
</li>
|
|
373
|
+
<li class="md-nav__item">
|
|
374
|
+
<a class="md-nav__link" href="#process">
|
|
375
|
+
<span class="md-ellipsis">
|
|
376
|
+
Process
|
|
377
|
+
</span>
|
|
378
|
+
</a>
|
|
379
|
+
</li>
|
|
380
|
+
<li class="md-nav__item">
|
|
381
|
+
<a class="md-nav__link" href="#example">
|
|
382
|
+
<span class="md-ellipsis">
|
|
383
|
+
Example
|
|
384
|
+
</span>
|
|
385
|
+
</a>
|
|
386
|
+
<nav aria-label="Example" class="md-nav">
|
|
387
|
+
<ul class="md-nav__list">
|
|
388
|
+
<li class="md-nav__item">
|
|
389
|
+
<a class="md-nav__link" href="#example-code">
|
|
390
|
+
<span class="md-ellipsis">
|
|
391
|
+
Example Code
|
|
392
|
+
</span>
|
|
393
|
+
</a>
|
|
394
|
+
</li>
|
|
395
|
+
</ul>
|
|
396
|
+
</nav>
|
|
397
|
+
</li>
|
|
398
|
+
</ul>
|
|
399
|
+
</nav>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
<div class="md-content" data-md-component="content">
|
|
404
|
+
<article class="md-content__inner md-typeset">
|
|
405
|
+
<h1 id="xyz-and-projection-math">XYZ and projection math</h1>
|
|
406
|
+
<p><a href="https://github.com/linz/NZTM2000TileMatrixSet">NZTM2000Quad</a> is not supported by many third party tools especially inside the Vector Tile space. Often tools expect tiles to be served as <code>/{z}/{x}/{y}.mvt</code> and assume the projection is <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html#63">WebMercatorQuad</a>.</p>
|
|
407
|
+
<p>Basemaps uses the lack of built in projection information to allow tools to work with NZTM2000Quad tiles without knowing they are in a different tile matrix set.</p>
|
|
408
|
+
<p>This is how basemaps provides <a href="https://epsg.io/2193">NZTM2000 EPSG:2193</a> support to Aerial imagery on https://basemaps.linz.govt.nz using custom projection logic <a href="https://github.com/linz/basemaps/blob/master/packages/landing/src/tile.matrix.ts#L56">basemaps/landing</a></p>
|
|
409
|
+
<h2 id="background">Background</h2>
|
|
410
|
+
<p>Tile mapping services use a <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html">TileMatrixSet</a> to describe where the tiles are meant to be positioned on the globe using a origin point and scale information per zoom level, most web mapping systems assume the tile matrix set is <a href="https://docs.ogc.org/is/17-083r2/17-083r2.html#63">WebMercatorQuad</a>.</p>
|
|
411
|
+
<p>Assuming the target tile matrix set is similar to WebMercatorQuad, which has a square tile grid, with zoom levels increasing at a factor of 2 and starting with a single tile z:0, x:0, y:0 points can be projected into a "fake" version of the tile matrix set and then used with any tool that supports <a href="https://epsg.io/4326">EPSG:4326</a> to <a href="https://epsg.io/3857">EPSG:3857</a> math such as tippecanoe.</p>
|
|
412
|
+
<h2 id="process">Process</h2>
|
|
413
|
+
<p>To create a fake projection from a tile grid the process is</p>
|
|
414
|
+
<ul>
|
|
415
|
+
<li>Take a lat, lon pair (<a href="https://epsg.io/4326">EPSG:4326</a> degrees) and project into the target projection (eg <a href="https://epsg.io/2193">EPSG:2193</a>)</li>
|
|
416
|
+
<li>Take the target x,y pair (<a href="https://epsg.io/2193">EPSG:2193</a> metres) and project where in the tile grid the point would be located (px)</li>
|
|
417
|
+
<li>Take the x,y pixels pair and assume it is now a WebMercatorQuad tile then project it to <a href="https://epsg.io/3857">EPSG:3857</a></li>
|
|
418
|
+
<li>Take the x,y (<a href="https://epsg.io/3857">EPSG:3857</a> metres) and project it into lat, lon (<a href="https://epsg.io/4326">EPSG:4326</a>)</li>
|
|
419
|
+
</ul>
|
|
420
|
+
<p>The point is now in the fake projection and can be combined with applications that consume XYZ tiles</p>
|
|
421
|
+
<h2 id="example">Example</h2>
|
|
422
|
+
<p>To convert an example point, such as the <a href="https://en.wikipedia.org/wiki/Beehive_(New_Zealand)">Beehive</a> is located at <code>-41.2784°</code>, <code>174.7767°</code> (<a href="https://epsg.io/4326">EPSG:4326</a>) <img alt="Beehive NZTM2000Quad" src="../static/projection_beehive_nztm2000quad.webp"/></p>
|
|
423
|
+
<p>Converting to <a href="https://epsg.io/2193">NZTM2000 EPSG:2193</a> <code>x: 1748795.82...</code>, <code>y: 5428814.899...</code></p>
|
|
424
|
+
<p>Using NZTM2000Quad to convert to pixel cooridantes of tile z:0, x:0, y:0 yields <code>x:128.0001..., y:127.999...</code></p>
|
|
425
|
+
<p><img alt="Beehive NZTM2000Quad" src="../static/projection_nztm2000quad_0_0_0.webp"/></p>
|
|
426
|
+
<p>converting to metres EPSG:3857 x: <code>21.883...</code>, y: <code>7.2815...</code> and then into lat,lon (<a href="https://epsg.io/4326">EPSG:4326</a>) <code>0.0001...</code>, <code>0.0000...</code> as NZTM2000Quad is centred on the beehive the result of lat,lon approx 0,0 is expected!</p>
|
|
427
|
+
<p><img alt="Beehive FakeNZTM2000Quad" src="../static/projection_beehive_fakenztm2000.webp"/></p>
|
|
428
|
+
<p>These lat,lon coordinates can now be used in a system that works with XYZ tiles but assumes that they are in WebMercatorQuad</p>
|
|
429
|
+
<h3 id="example-code">Example Code</h3>
|
|
430
|
+
<p>Using <a href="https://github.com/linz/basemaps/tree/master/packages/geo">@basemaps/geo</a></p>
|
|
431
|
+
<div class="language-typescript highlight"><pre><span></span><code><span id="__span-0-1"><a href="#__codelineno-0-1" id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="k">import</span><span class="w"> </span><span class="p">{</span><span class="nx">NZTM2000QuadTms</span><span class="p">,</span><span class="w"> </span><span class="nx">GoogleTms</span><span class="p">,</span><span class="w"> </span><span class="nx">Projection</span><span class="p">}</span><span class="w"> </span><span class="kr">from</span><span class="w"> </span><span class="s1">'@basemaps/geo'</span>
|
|
432
|
+
</span><span id="__span-0-2"><a href="#__codelineno-0-2" id="__codelineno-0-2" name="__codelineno-0-2"></a>
|
|
433
|
+
</span><span id="__span-0-3"><a href="#__codelineno-0-3" id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="c1">// Convert to NZTMQuad pixel location</span>
|
|
434
|
+
</span><span id="__span-0-4"><a href="#__codelineno-0-4" id="__codelineno-0-4" name="__codelineno-0-4"></a><span class="kd">const</span><span class="w"> </span><span class="nx">nztmXy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Projection</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">Nztm2000QuadTms</span><span class="p">).</span><span class="nx">fromWgs84</span><span class="p">([</span><span class="mf">174.7767</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mf">41.2784</span><span class="p">])</span>
|
|
435
|
+
</span><span id="__span-0-5"><a href="#__codelineno-0-5" id="__codelineno-0-5" name="__codelineno-0-5"></a><span class="kd">const</span><span class="w"> </span><span class="nx">nztmPixels</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Nztm2000QuadTms</span><span class="p">.</span><span class="nx">sourceToPixels</span><span class="p">(</span><span class="nx">nztmXy</span><span class="p">[</span><span class="mf">0</span><span class="p">],</span><span class="w"> </span><span class="nx">nztmXy</span><span class="p">[</span><span class="mf">1</span><span class="p">],</span><span class="mf">0</span><span class="p">)</span>
|
|
436
|
+
</span><span id="__span-0-6"><a href="#__codelineno-0-6" id="__codelineno-0-6" name="__codelineno-0-6"></a>
|
|
437
|
+
</span><span id="__span-0-7"><a href="#__codelineno-0-7" id="__codelineno-0-7" name="__codelineno-0-7"></a><span class="c1">// Convert from pixels assuming EPSG:3857 WebMercatorQuad</span>
|
|
438
|
+
</span><span id="__span-0-8"><a href="#__codelineno-0-8" id="__codelineno-0-8" name="__codelineno-0-8"></a><span class="kd">const</span><span class="w"> </span><span class="nx">googleXy</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">GoogleTms</span><span class="p">.</span><span class="nx">pixelsToSource</span><span class="p">(</span><span class="nx">nztmPixels</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span><span class="w"> </span><span class="nx">nztmPixels</span><span class="p">.</span><span class="nx">y</span><span class="p">,</span><span class="w"> </span><span class="mf">0</span><span class="p">)</span>
|
|
439
|
+
</span><span id="__span-0-9"><a href="#__codelineno-0-9" id="__codelineno-0-9" name="__codelineno-0-9"></a><span class="kd">const</span><span class="w"> </span><span class="nx">latLon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">Projection</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">GoogleTms</span><span class="p">).</span><span class="nx">toWgs84</span><span class="p">([</span><span class="nx">googleXy</span><span class="p">.</span><span class="nx">x</span><span class="p">,</span><span class="w"> </span><span class="nx">googleXy</span><span class="p">.</span><span class="nx">y</span><span class="p">])</span><span class="sb">```</span>
|
|
440
|
+
</span></code></pre></div>
|
|
441
|
+
</article>
|
|
442
|
+
</div>
|
|
443
|
+
</div>
|
|
444
|
+
</main>
|
|
445
|
+
<footer class="md-footer">
|
|
446
|
+
<div class="md-footer-meta md-typeset">
|
|
447
|
+
<div class="md-footer-meta__inner md-grid">
|
|
448
|
+
<div class="md-copyright">
|
|
449
|
+
<div class="md-copyright__highlight">
|
|
450
|
+
<a href="https://www.linz.govt.nz/copyright">© CC BY 4.0 LINZ</a>
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
Made with
|
|
455
|
+
<a href="https://squidfunk.github.io/mkdocs-material/" rel="noopener" target="_blank">
|
|
456
|
+
Material for MkDocs
|
|
457
|
+
</a>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
</footer>
|
|
462
|
+
</div>
|
|
463
|
+
<div class="md-dialog" data-md-component="dialog">
|
|
464
|
+
<div class="md-dialog__inner md-typeset"></div>
|
|
465
|
+
</div>
|
|
466
|
+
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.indexes", "content.code.copy"], "search": "../../assets/javascripts/workers/search.f886a092.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
467
|
+
<script src="../../assets/javascripts/bundle.6c14ae12.min.js"></script>
|
|
468
|
+
<script>document$.subscribe(() => {
|
|
469
|
+
window.update_swagger_ui_iframe_height = function (id) {
|
|
470
|
+
var iFrameID = document.getElementById(id);
|
|
471
|
+
if (iFrameID) {
|
|
472
|
+
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
|
|
473
|
+
iFrameID.height = full_height;
|
|
474
|
+
iFrameID.style.height = full_height;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
let iframe_id_list = []
|
|
479
|
+
var iframes = document.getElementsByClassName("swagger-ui-iframe");
|
|
480
|
+
for (var i = 0; i < iframes.length; i++) {
|
|
481
|
+
iframe_id_list.push(iframes[i].getAttribute("id"))
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
let ticking = true;
|
|
485
|
+
|
|
486
|
+
document.addEventListener('scroll', function(e) {
|
|
487
|
+
if (!ticking) {
|
|
488
|
+
window.requestAnimationFrame(()=> {
|
|
489
|
+
let half_vh = window.innerHeight/2;
|
|
490
|
+
for(var i = 0; i < iframe_id_list.length; i++) {
|
|
491
|
+
let element = document.getElementById(iframe_id_list[i])
|
|
492
|
+
if(element==null){
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
let diff = element.getBoundingClientRect().top
|
|
496
|
+
if(element.contentWindow.update_top_val){
|
|
497
|
+
element.contentWindow.update_top_val(half_vh - diff)
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
ticking = false;
|
|
501
|
+
});
|
|
502
|
+
ticking = true;
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
const dark_scheme_name = "slate"
|
|
507
|
+
|
|
508
|
+
window.scheme = document.body.getAttribute("data-md-color-scheme")
|
|
509
|
+
const options = {
|
|
510
|
+
attributeFilter: ['data-md-color-scheme'],
|
|
511
|
+
};
|
|
512
|
+
function color_scheme_callback(mutations) {
|
|
513
|
+
for (let mutation of mutations) {
|
|
514
|
+
if (mutation.attributeName === "data-md-color-scheme") {
|
|
515
|
+
scheme = document.body.getAttribute("data-md-color-scheme")
|
|
516
|
+
var iframe_list = document.getElementsByClassName("swagger-ui-iframe")
|
|
517
|
+
for(var i = 0; i < iframe_list.length; i++) {
|
|
518
|
+
var ele = iframe_list.item(i);
|
|
519
|
+
if (ele) {
|
|
520
|
+
if (scheme === dark_scheme_name) {
|
|
521
|
+
ele.contentWindow.enable_dark_mode();
|
|
522
|
+
} else {
|
|
523
|
+
ele.contentWindow.disable_dark_mode();
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
observer = new MutationObserver(color_scheme_callback);
|
|
531
|
+
observer.observe(document.body, options);
|
|
532
|
+
})</script></body>
|
|
533
|
+
</html>
|
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
</span>
|
|
256
256
|
</a>
|
|
257
257
|
</li>
|
|
258
|
+
<li class="md-nav__item">
|
|
259
|
+
<a class="md-nav__link" href="../operator-guide/xyz-projection/">
|
|
260
|
+
<span class="md-ellipsis">
|
|
261
|
+
XYZ and projection math
|
|
262
|
+
</span>
|
|
263
|
+
</a>
|
|
264
|
+
</li>
|
|
258
265
|
</ul>
|
|
259
266
|
</nav>
|
|
260
267
|
</li>
|