New: "agglite" feature rasterizing driver

classic Classic list List threaded Threaded
10 messages Options
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

New: "agglite" feature rasterizing driver

The new "agglite" driver uses AGG-Lite to draw feature vectors on to image tiles. The AGG-Lite code is completely self-contained so there are no new dependencies.

The agglite driver works similarly to the feature_geom and feature_stencil drivers EXCEPT that it's an image driver, not a model driver. So you need to use an <image> tag in your .earth file to use it instead of a <model> tag. See feature_agglite.earth for an example.

Since it's an image driver, you can use osgEarth's tile caching to cache the results (unlike the model drivers). You can also adjust the <tile_size> to get better resolution.

It's not perfect yet, there are some issues:

* Lines don't look uniform on a globe because it does not adjust line width based on latitude or segment angle.
* There's no logic for properly joining line segments or capping line ends.
* No support for Points at all yet.
* AGG draws anti-aliased graphics. When your alpha is < 1.0, you will see "outlines" on the geometry. This may not be desirable.

I'm not planning to immediately address any of these issues; hopefully someone else can step up and tackle them :)

Glenn
Glenn Waldron / Pelican Mapping
Adam Adam
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

Glenn,

It looks like the websvn interface is not working, the tarball links go to blank pages.  Unfortunately this is how I have to get the source.

Thanks,
Adam
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

If you use wush.net/websvn/osgearth instead of websvn.osgearth.org, it appears to work. I'll file I support request for this in the meantime.

Thanks, Glenn
Glenn Waldron / Pelican Mapping
Adam Adam
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

Yep that did it, thanks.

-Adam
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

fyi, websvn.osgearth.org should be working for tarballs now.

Glenn
Glenn Waldron / Pelican Mapping
schultni schultni
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

In reply to this post by gwaldron
Hi Glenn,

I tried using the new driver and I am having some problems.  

It seems to work fine when the shapefiles are first rastered, but something happens after that either makes the raster layer completely opaque, or my base sat-imagery layer turns to black.  Attached are screen shots showing this.  When I first start osgearth with the shapefile cache empty, the earth turns completely black, but then quadrants begin to fill in.



As I zoom into the shapefile region, it takes a while for the tiles containing the shapefile to go into the correct LOD, which is acceptable since the cache is empty.  However once the shapefile is rasterized, a bit after, some wierd behavior starts,  I begin losing my base sat-imagery layer :







And then, when I close out and open osgviewer again(this time with the cache seeded), I get a completely black earth that won't load any tiles with sat-imagery.  If I zoom in close enough, a couple tiles do pop in, but then turn to black as I move around.
schultni schultni
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

Sorry, here is my .earth file.  The shapefile I was using is found at:

http://envision.bioe.orst.edu/StudyAreas/PugetSound/NC/NC_SQ_Runs.zip


demo_agg.earth
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

In reply to this post by schultni
What format are you caching in?   If you are caching to jpeg you will lose all transparency in the image.  Png should work though

Jason

On Feb 10, 2010, at 12:12 PM, "schultni [via osgEarth]" <[hidden email]> wrote:

Hi Glenn,

I tried using the new driver and I am having some problems.  

It seems to work fine when the shapefiles are first rastered, but something happens after that either makes the raster layer completely opaque, or my base sat-imagery layer turns to black.  Attached are screen shots showing this.  When I first start osgearth with the shapefile cache empty, the earth turns completely black, but then quadrants begin to fill in.



As I zoom into the shapefile region, it takes a while for the tiles containing the shapefile to go into the correct LOD, which is acceptable since the cache is empty.  However once the shapefile is rasterized, a bit after, some wierd behavior starts,  I begin losing my base sat-imagery layer :







And then, when I close out and open osgviewer again(this time with the cache seeded), I get a completely black earth that won't load any tiles with sat-imagery.  If I zoom in close enough, a couple tiles do pop in, but then turn to black as I move around.


View message @ http://n2.nabble.com/New-agglite-feature-rasterizing-driver-tp4541905p4549320.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.

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

Re: New: "agglite" feature rasterizing driver

it defaulted to jpeg...not sure why.  
So I added "<cache_format>png</cache_format>" for the image and it works now


thanks for the quick reply!

Nick
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: New: "agglite" feature rasterizing driver

Hey Nick,

Try an SVN update and remove your cache format specification.  I just
committed a change to the AGG driver that defaults to PNG, it was
defaulting to JPEG.

Thanks,

Jason

On Wed, Feb 10, 2010 at 12:24 PM, schultni [via osgEarth]
<[hidden email]> wrote:

> it defaulted to jpeg...not sure why.
> So I added "<cache_format>png</cache_format>" for the image and it works now
>
>
> thanks for the quick reply!
>
> Nick
>
> ________________________________
> View message @
> http://n2.nabble.com/New-agglite-feature-rasterizing-driver-tp4541905p4549385.html
> To start a new topic under osgEarth, email
> [hidden email]
> To unsubscribe from osgEarth, click here.
>