Create a new driver, questions...

classic Classic list List threaded Threaded
6 messages Options
Aurelien Aurelien
Reply | Threaded
Open this post in threaded view
|

Create a new driver, questions...

Hello !

I'm creating a new driver for osgEarth, and I'm facing a little problem.

The profile of my driver is TileGridProfile::GLOBAL_MERCATOR

I tried with the TileGridProfile::GLOBAL_GEODETIC profile, but I get the message : "Removing incompatible TileSource"

With GLOBAL_MERCATOR, I get these values for the Tile's geoextents :

key->getGeoExtents(minLon, minLat, maxLon, maxLat);
minLon =  -2.00375e+07
maxLon =  0
minLat =  -2.00375e+07
maxLat =  0


But how can I convert these values to Geodetic (longitude / latitude) values ?

Thanks a lot !
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Create a new driver, questions...

Aurelien,

You are using a version of osgEarth that did not yet (officially) support mixing Mercator and Geodetic profiles. Upgrade to the newest version (either 1.1 or SVN HEAD) to get this support. Once you do, you can just write a driver that reports a global mercator profile, and osgEarth will render it in geodetic context automatically.
Glenn Waldron / Pelican Mapping
Aurelien Aurelien
Reply | Threaded
Open this post in threaded view
|

Re: Create a new driver, questions...

Thanks for the answer !

I'll switch to new version tomorrow !

Another question :

Images created by createImage(const osgEarth::TileKey* pKey) seems to be cached (not on the hard drive, but in memory).

Is there anyway to "flush" the cache and force createImage to be called again ?

(I need to generate new images after GUI interaction...)
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Create a new driver, questions...

Hi Aurelien,

osgEarth keeps a small memory cache around that really speeds up compositing operations that are necessary when using mixed profiles.

There are a couple of ways we could probably get around your issue.  One would be to provide a way to configure the number of tiles that are kept around in the memory cache.  You could then set the number of tiles to 0 would effectively disable the memory cache and you would always get the freshest data.

We could also provide a "flush" function that would effectively empty the cache, which would also be nice to have for disk based caches.

Both are probably good things to have.  I'll add a ticket for both of these to osgEarth.

Thanks!

Jason



On Tue, Apr 28, 2009 at 8:11 AM, Aurelien (via Nabble) <[hidden email]> wrote:
Thanks for the answer !

I'll switch to new version tomorrow !

Another question :

Images created by createImage(const osgEarth::TileKey* pKey) seems to be cached (not on the hard drive, but in memory).

Is there anyway to "flush" the cache and force createImage to be called again ?

(I need to generate new images after GUI interaction...)


View message @ http://n2.nabble.com/Create-a-new-driver%2C-questions...-tp2731921p2732981.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


Aurelien Aurelien
Reply | Threaded
Open this post in threaded view
|

Re: Create a new driver, questions...

Thanks a lot !

For my issue, the best solution should be a "flush" function, per driver

For exemple, defined in the TileSource interface, and when called, flush only the tiles created by this TileSource.

Where can I find your ticket to track it ?
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Create a new driver, questions...

Hi Aurelien,

You can find our trac page at:  http://wush.net/trac/osgearth/report/1.

I entered 2 tickets, #35 and #36, for these issues.

Thanks!

Jason

On Tue, Apr 28, 2009 at 9:18 AM, Aurelien (via Nabble) <[hidden email]> wrote:
Thanks a lot !

For my issue, the best solution should be a "flush" function, per driver

For exemple, defined in the TileSource interface, and when called, flush only the tiles created by this TileSource.

Where can I find your ticket to track it ?


View message @ http://n2.nabble.com/Create-a-new-driver%2C-questions...-tp2731921p2733374.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.