boston.earth 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!--
  2. osgEarth Sample.
  3. Demonstrates the use of a Resource Library in order to apply "typical" textures
  4. to extruded buildings.
  5. -->
  6. <map name="Boston Demo" type="geocentric" version="2">
  7. <options lighting="true" elevation_tile_size="15">
  8. <terrain lighting="false"/>
  9. <cache type="filesystem">
  10. <path>cache</path>
  11. </cache>
  12. <!-- <cache_policy usage="cache_only"/> -->
  13. </options>
  14. <image name="osm_mapnik" driver="xyz">
  15. <url>http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png</url>
  16. <profile>spherical-mercator</profile>
  17. </image>
  18. <external>
  19. <annotations>
  20. <model name="car">
  21. <url>car.osgb.20.scale</url>
  22. <position lat="42.3562004" long="-71.0677178"/>
  23. </model>
  24. <label text="Boston downtown">
  25. <position lat="42.35798" long="-71.06902" alt="10" mode="relative"/>
  26. <style type="text/css">
  27. text-align: center_center;
  28. text-size: 20;
  29. text-declutter: true;
  30. text-fill: #ff0000;
  31. </style>
  32. </label>
  33. </annotations>
  34. <!--
  35. <model name="buildings" driver="feature_geom">
  36. <features name="buildings" driver="ogr">
  37. <url>data/boston_buildings_utm19.shp</url>
  38. <build_spatial_index>true</build_spatial_index>
  39. </features>
  40. <layout tile_size_factor="52">
  41. <level name="default" max_range="20000" style="buildings"/>
  42. </layout>
  43. <styles>
  44. <library name="us_resources">
  45. <url>data/resources/textures_us/catalog.xml</url>
  46. </library>
  47. <style type="text/css">
  48. buildings {
  49. extrusion-height: 3.5 * max([story_ht_], 1);
  50. extrusion-flatten: true;
  51. extrusion-wall-style: building-wall;
  52. extrusion-wall-gradient: 0.8;
  53. extrusion-roof-style: building-rooftop;
  54. altitude-clamping: terrain;
  55. altitude-technique: map;
  56. altitude-binding: vertex;
  57. render-lighting: false;
  58. }
  59. building-wall {
  60. skin-library: us_resources;
  61. skin-tags: building;
  62. skin-random-seed: 1;
  63. fill: #ffffff;
  64. }
  65. building-rooftop {
  66. skin-library: us_resources;
  67. skin-tags: rooftop;
  68. skin-tiled: true;
  69. skin-random-seed: 1;
  70. fill: #ffffff;
  71. }
  72. </style>
  73. </styles>
  74. </model>
  75. -->
  76. <!-- <external> -->
  77. <viewpoints>
  78. <viewpoint name="Home" heading="-25" height="50" lat="42.355" long="-71.068" pitch="-90" range="480"/>
  79. <viewpoint name="Bird's eye" heading="24" height="50" lat="42.355" long="-71.068" pitch="-20" range="1000"/>
  80. <viewpoint name="Overview" heading="24.261" height="0" lat="42.34425" long="-71.076262" pitch="-21.6" range="3450"/>
  81. <viewpoint name="Downtown 1" heading="117" lat="42.3568" long="-71.0585" height="0" pitch="-20.4" range="1500" />
  82. <viewpoint name="Downtown 2" heading="-128.5" lat="42.3582" long="-71.0546" height="0" pitch="-19" range="1620" />
  83. <viewpoint name="Street Level" heading="-193" lat="42.3569" long="-71.07" pitch="0" height="20" range="85"/>
  84. </viewpoints>
  85. <sky hours="14.0"/>
  86. </external>
  87. </map>