forked from burritojustice/xyz_space_invader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsatellite.yaml
84 lines (77 loc) · 3.13 KB
/
satellite.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import:
- https://www.nextzen.org/carto/refill-style/refill-style.zip
- https://s3.amazonaws.com/xyz-demo/data/demo.yaml
# - https://www.nextzen.org/carto/refill-style/11/themes/label-4.zip
sources:
terrain_normals:
type: Raster
url: https://tile.nextzen.org/tilezen/terrain/v1/512/normal/{z}/{x}/{y}.png
tile_size: 512
max_zoom: 14
url_params: { api_key: global.sdk_api_key }
_satellite:
# url: https://1.aerial.maps.api.here.com/maptile/2.1/maptile/newest/satellite.day/{z}/{x}/{y}/512/png
#url: https://services.digitalglobe.com/mapservice/wmtsaccess?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=DigitalGlobe:ImageryTileService&featureProfile=Accuracy_Profile&FORMAT=image/png&STYLE=&CONNECTID=1b207260-1627-4a35-945e-089b8cf09f78&TileMatrixSet=EPSG:3857&TileMatrix=EPSG:3857:{z}&TileRow={y}&TileCol={x}
type: Raster
rasters: [terrain_normals]
url_params:
app_id: 0VeWPmMuUeMebnjNVGz9
app_code: MVqjbI661R5lC2DqkAZpNg
mapzen:
url: https://tile.nextzen.org/tilezen/vector/v1/256/all/{z}/{x}/{y}.mvt
url_params: { api_key: global.sdk_api_key }
type: MVT
max_zoom: 15
styles:
# applying terrain lighting with normal map to raster
# raster layer to light is raster 0, normal map is raster 1
terrain_raster:
base: raster
lighting: false # don't use scene lighting, use custom lighting in shader
shaders:
uniforms:
u_light: [-0.5, 0.5, -0.5] # lights are flipped to match sat hillshade
u_ambient: 0.5
blocks:
filter: |
// simple directional light with Lambert shading
vec3 terrain = normalize(sampleRaster(1).xyz *2. - 1.4); // terrain surface normal
float diffuse = clamp(dot(terrain, normalize(-u_light)), 0., 1.);
color.rgb = clamp((color.rgb * u_ambient) + (color.rgb * diffuse), 0., 1.);
layers:
water:
enabled: false
earth:
enabled: false
landuse:
enabled: false
buildings:
enabled: false
filter: function(){ return false } # set this to permanently turn off all buildings, since Invader will re-enable layer
roads:
filter:
not:
kind: ferry
# enabled: false
# fake out road lines and just leave labels
z:
y:
no_lines:
# enabled: false
# if no_lines is enabled, it will NOT draw road lines, just labels (inheritance overrides basemap default). uncomment 'enabled: false' if you *do* want road lines
draw:
lines:
width: 0px
_satellite:
enabled: false
data: {source: _satellite}
draw:
raster:
order: 0
_satellite_shader:
# slight enhancement of terrain with shaders and Nextzen terrain tiles
# enabled: false
data: {source: _satellite}
draw:
terrain_raster:
order: 0