forked from gwaldron/osgearth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroads-flattened.earth
138 lines (128 loc) · 5 KB
/
roads-flattened.earth
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<map>
<xi:include href="readymap_elevation.xml"/>
<xi:include href="readymap_imagery.xml"/>
<!-- Elevation layer that will "flatten" the terrain along the roads -->
<FlattenedElevation name="Road Flattener" min_level="14" max_data_level="16">
<features>roads:data</features>
<script language="javascript">
<![CDATA[
// width of the road surface
function getLineWidth() {
var hwy = feature.properties["highway"];
if (hwy === "motorway" || hwy === "trunk" || hwy == "primary" || hwy === "secondary") {
return 12.0;
}
return 4.0;
}
// buffer around the road
function getBufferWidth() {
return 24.0;
}
]]>
</script>
<line_width>getLineWidth()</line_width>
<buffer_width>getBufferWidth()</buffer_width>
</FlattenedElevation>
<!-- Road surface rendering -->
<RoadSurface name="Road Surface" min_level="14" max_data_level="19" shared="true" enabled="false">
<features>roads:data</features>
<buffer_width>15m</buffer_width>
<Styles name="roads:stylesheet">
<script language="javascript">
<![CDATA[
function selectStyle() {
if ("highway" in feature.properties) {
var hwy = feature.properties["highway"];
if (hwy === "motorway" || hwy === "trunk" || hwy == "primary" || hwy === "secondary") {
return "lined";
}
}
return "paved";
}
]]>
</script>
<selector name="default" style_expr="selectStyle()"/>
<style type="text/css">
lined {
stroke: #ffffff;
stroke-width: 12m;
stroke-image: "'../data/road.png'";
}
paved {
stroke: #ffffff;
stroke-width: 4m;
stroke-image: "'../data/asphalt.jpg'";
}
</style>
</Styles>
</RoadSurface>
<viewpoints>
<viewpoint name="Rainier">
<heading>17.33521725357022</heading>
<height>2462.60273069609</height>
<lat>46.82181702111031</lat>
<long>-121.7814936386096</long>
<pitch>-21.29241356548601</pitch>
<range>23926.75258864516</range>
</viewpoint>
<viewpoint name="Road 1">
<heading>-20.9485</heading>
<pitch>-2.03292</pitch>
<range>129.689m</range>
<long>-121.6310413445486</long>
<lat>46.7629136754553</lat>
<height>933.7423594370484</height>
<srs>+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs </srs>
</viewpoint>
<viewpoint name="Driving">
<heading>-34.186</heading>
<pitch>-1.58811</pitch>
<range>45.1478m</range>
<long>-121.6310649135474</long>
<lat>46.76307438804317</lat>
<height>908.0183555409312</height>
<srs>+proj=longlat +datum=WGS84 +no_defs </srs>
</viewpoint>
<viewpoint name="Road 2">
<heading>7.34763</heading>
<pitch>-15.3353</pitch>
<range>1133.16m</range>
<long>-121.6146067722042</long>
<lat>46.73737123277496</lat>
<height>868.470358453691</height>
<srs>+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs </srs>
</viewpoint>
<viewpoint name="Junction">
<heading>-0.384023</heading>
<pitch>-65.4952</pitch>
<range>294.541m</range>
<long>-121.63970476221</long>
<lat>46.75991953164118</lat>
<height>953.2630590070039</height>
<srs>+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs </srs>
</viewpoint>
<viewpoint name="Overlap">
<heading>-57.5371</heading>
<pitch>-56.6654</pitch>
<range>95.9873m</range>
<long>-121.6366175925203</long>
<lat>46.76520332634789</lat>
<height>941.8131768433377</height>
<srs>+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs </srs>
</viewpoint>
</viewpoints>
<!-- Road features -->
<TFSFeatures name="roads:data">
<url>http://readymap.org/readymap/mbtiles/osm/</url>
<min_level>14</min_level>
<max_level>14</max_level>
<profile>spherical-mercator</profile>
<format>pbf</format>
<filters>
<script language="javascript">
<![CDATA[ ("highway" in feature.properties); ]]>
</script>
</filters>
</TFSFeatures>
<libraries>osgEarthProcedural</libraries>
</map>