Ancient versions of GeoTools had two rendering systems:
- One that set up a cache of Java2D Shapes; and had very complicated code to
detect when they went stale. It did offer very smooth pans if remember; but got
upset when zooming (ie when its cached shapes would go "stale" and it would
need to re-read and decimate.
- StreamingRenderer (which you apparently know and love) equaled its draw
performance when working from a Features in memory; and would probably exceeds
it if using the SpatialFeatureCollection available today (that uses a JTS
spatial index etc...)
And 1/2:
- ShapefileRenderer tried as many tricks as possible to make shapefiles go
fast; I think all the tricks have been adopted by StreamingRenderer so
ShapefileRenderer can probably retired (as an experiment it was very
successful).
You are welcome to start up an unsupported module that uses a Cache of Java2D
shapes if you like. There are some other techniques that have been tried:
- Rendering into a buffered image; and then using that buffered image as a
polygon texture in OpenGL (there is a google summer of code project in "spike"
which took this technique; and a uDig renderer that was taken down for license
incompatibility; and someone tries it every couple of years or so ...)
- Write a Graphics2D interface that emits OpenGL lines into a scene graph on
the back end. This is my own idea that nobody has paid me to try yet; you are
welcome to do the work if you like :D The idea is to use the fact that
StreamingRenderer can draw good stuff into a Graphics2D - and abuse the fact to
quickly populate an OpenGL scene. There are lots of examples of people doing
the work (http://klomp.org/mark/classpath/Agile2D.pdf) but life is short and I
have not tried any of them. You may do better just to go nuts and copy
StreamingRenderer and write the wrapper yourself; or issue the open gl commands
yourself
(http://wiki.tankaar.com/index.php?title=Drawing_First_2D_Graphics_in_JOGL).
So you say you can sacrifice some memory; can you sacrifice some time? (Or
money as Andrea is very much recommended on these matters).
Other than that can you define what you want to hit for a performance target?
Like if panning is a trouble; introducing tiled rendering is a great "fix" (we
did that as an experimental branch of uDig to show smooth panning while
tracking vehicles ).
You may also wish to look into the world wind code; there have been some good
example of GeoTools integration with world wind - Tisham can tell you more.
--
Jody Garnett
On Tuesday, 12 July 2011 at 8:18 PM, LSA wrote:
> Is it hard to implement GTRenderer interface? What can be said about it?
>
> Standard renderer used is StreamingRenderer, and comments in the source code
> say this:
> Use this class if you need a stateless renderer that provides low memory
> * footprint and decent rendering performance on the first call but don't need
> * good optimal performance on subsequent calls on the same data.
>
> I am in quite opposite situation: I can sacrifice some memory in order to
> gain performance.
>
> Did someone tried to implement GTRenderer which will have better performance
> on subsequent calls on the same data?
>
> Thanks,
> Sergey
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users