2D Map With TMS in osgEarth3.1

classic Classic list List threaded Threaded
3 messages Options
chuyanjun chuyanjun
Reply | Threaded
Open this post in threaded view

2D Map With TMS in osgEarth3.1

I am using TMSImageLayer with a tms package to display a 2D Map in osgEarth 3.1. The following is the tms file
<?xml version="1.0" ?>
<tilemap tilemapservice="http://tms.osgeo.org/1.0.0" version="1.0.0">
  <boundingbox maxx="20037508.3427892513573169708251953" maxy="20037508.3427892513573169708251953" minx="-20037508.3427892513573169708251953" miny="-20037508.3427892513573169708251953" />
  <origin x="-20037508.3427892513573169708251953" y="-20037508.3427892513573169708251953" />
  <tileformat extension="jpg" height="256" mime-type="image/jpeg" width="256" />
  <tilesets profile="global-mercator">
    <tileset href="" order="0" units-per-pixel="156543.0339280410262290388345718" />
    <tileset href="" order="1" units-per-pixel="78271.5169640205131145194172859" />
    <tileset href="" order="2" units-per-pixel="39135.7584820102565572597086430" />
    <tileset href="" order="3" units-per-pixel="19567.8792410051282786298543215" />
    <tileset href="" order="4" units-per-pixel="9783.9396205025641393149271607" />
    <tileset href="" order="5" units-per-pixel="4891.9698102512820696574635804" />
    <tileset href="" order="6" units-per-pixel="2445.9849051256410348287317902" />
    <tileset href="" order="7" units-per-pixel="1222.9924525628205174143658951" />
    <tileset href="" order="8" units-per-pixel="611.4962262814102587071829475" />
    <tileset href="" order="9" units-per-pixel="305.7481131407051293535914738" />
    <tileset href="" order="10" units-per-pixel="152.8740565703525646767957369" />
    <tileset href="" order="11" units-per-pixel="76.4370282851762823383978684" />
    <tileset href="" order="12" units-per-pixel="38.2185141425881411691989342" />
    <tileset href="" order="13" units-per-pixel="19.1092570712940705845994671" />
    <tileset href="" order="14" units-per-pixel="9.5546285356470352922997336" />
    <tileset href="" order="15" units-per-pixel="4.7773142678235176461498668" />
    <tileset href="" order="16" units-per-pixel="2.3886571339117588230749334" />
    <tileset href="" order="17" units-per-pixel="1.1943285669558794115374667" />
    <tileset href="" order="18" units-per-pixel="0.5971642834779397057687333" />
    <tileset href="" order="19" units-per-pixel="0.2985821417389698528843667" />
    <tileset href="" order="20" units-per-pixel="0.1492910708694849264421833" />
    <tileset href="" order="21" units-per-pixel="0.0746455354347424632210917" />
    <tileset href="" order="22" units-per-pixel="0.0373227677173712316105458" />

How to set 2D display mode. In tms file?  Or in the Map profile? Please give me an example.
 Thanks in advance.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view

Re: 2D Map With TMS in osgEarth3.1


You specify that in the earth file. Either directly, like so:


OR you can use the profile of a map layer, like so:

   <tmsimage name="main">

Hope this helps!
Glenn Waldron / Pelican Mapping
chuyanjun chuyanjun
Reply | Threaded
Open this post in threaded view

Re: 2D Map With TMS in osgEarth3.1

Thanks a lot