Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Question #3 - How the Shaperenderer works

Bernhard Kastner wrote:
Another question to be added to the FAQ as suggested in
http://lists.refractions.net/pipermail/udig-devel/2005-November/003189.html
----------

Hi,

I'm currently playing around with the org.geotools.renderer.shape.ShapefileRenderer and wondering how it works: Am I assuming correctly, that it tries to draw the image to a Graphics2D-object, which also may be an image?
It works exactly like LiteRenderer (it is a Streaming Renderer that is optimized for Shapefiles), indeed you can use StreamingRenderer with a ShapefileDataStore just fine, it just won't be as fast as what Jesse has done with ShapefileRenderer.
Which role does the GTRenderer play?
It is a common interface:
-http://udig.refractions.net/docs/api-geotools/org/geotools/renderer/GTRenderer.html

That way code that does not want to know about the difference, does not have to know.
I'm trying to get a rendering example to work, but get lost in some stupid dependencies. I'm using the ShapefileRenderer-libs (2.2M2) from uDig (dunno which version, I svn-checked it out at the beginning of last week) and trying to resolve the dependencies using the libs of geotools 2.2M2, but can't resolve them...
Ack, version hell - no fun. From later email it looks like you are un stuck.
There has to be a piece of code around in the uDig-source, where the ShapefileRenderer is being used, but I can't find it... btw: the shapefilerenderer from uDig is in the package org.geotools.renderer.shape, but I can't find it in any geotools-release. Where is the shapefilerenderer originally from?
We would have to look at uDig to see what RendererFactorys are available, that is how you teach uDig about new kinds of renderers. You can have more then one renderer for a kind of content, and the RenderManager gets to choose the "best" one.

Jody


Back to the top