Heightfield caching

classic Classic list List threaded Threaded
2 messages Options
jwils jwils
Reply | Threaded
Open this post in threaded view
|

Heightfield caching

Hello,

I am using osgEarth rev 670 (close to most recent) and I'm experiencing a problem when caching heightfield data.  I am specifying tiff as the format, which has worked previously, but it's always being saved as png.  Using this earth file, I see the terrain being displayed in "live" mode, but the earth does not appear in cache only mode, giving the error "Couldn't get tile fo 0_0_0_0".  Here is my earth file:

<map type="geocentric"> 
   <preemptive_lod>false</preemptive_lod>
   <cache type="tms">
      <path>cache</path>
      <format>tiff</format>
   </cache>

   <heightfield name="terrain" driver = "gdal">
      <url>C:\height</url>
      <extensions>tif</extensions>     
    </heightfield>

</map> 

Any thoughts on what I might be doing wrong?  This general setup has previously worked for me before, but I hadn't updated to the trunk in a while, so I'm hoping I'm missing some obvious config thing, but nothing jumped out at me in the documentation.
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Heightfield caching

Hi jwilis,

We're currently working on some refactoring to simplify caching in osgEarth osgEarth so that a Map only has one shared cache vs being able to define a cache per layer as well as a Map cache.

You can still override the format that a layer caches to, but you need to do it for each layer using the "cache_format" tag.

You should be able to get your map working again by modifying it like so:

<map type="geocentric">
   <preemptive_lod>false</
preemptive_lod>
   <cache type="tms">
      <path>cache</path>
   </cache>

   <heightfield name="terrain" driver = "gdal">
      <url>C:\height</url>
      <extensions>tif</extensions>      
      <!-- Specify what format to cache this layer in -->
      <cache_format>tiff</cache_format>
    </heightfield>

</map>


On Sat, Oct 3, 2009 at 3:55 PM, jwils (via Nabble) <[hidden email]> wrote:
Hello,

I am using osgEarth rev 670 (close to most recent) and I'm experiencing a problem when caching heightfield data.  I am specifying tiff as the format, which has worked previously, but it's always being saved as png.  Using this earth file, I see the terrain being displayed in "live" mode, but the earth does not appear in cache only mode, giving the error "Couldn't get tile fo 0_0_0_0".  Here is my earth file:

<map type="geocentric">
   <preemptive_lod>false</preemptive_lod>
   <cache type="tms">
      <path>cache</path>
      <format>tiff</format>
   </cache>

   <heightfield name="terrain" driver = "gdal">
      <url>C:\height</url>
      <extensions>tif</extensions>      
    </heightfield>

</map>

Any thoughts on what I might be doing wrong?  This general setup has previously worked for me before, but I hadn't updated to the trunk in a while, so I'm hoping I'm missing some obvious config thing, but nothing jumped out at me in the documentation.


View message @ http://n2.nabble.com/Heightfield-caching-tp3761454p3761454.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.