renderer

net.refractions.udig.render.renderer

0.1.0

A Renderer interprets spatial data and represents the data in a visual manner. In UDIG there are different types of renderers that can render different types of data. For example, a feature renderer can render features data. A WMS renderer can communicate with and render images from a web map server.

The API requires that a Renderer extension must create a RenderMetrics class, which can provide metrics about how fast a renderer can provide its service, a RenderMetricsFactory class, which can determine if a data source can be rendered by the renderer and can create RenderMetrics that provide metrics with regard to a particular data source and, last, a renderer extension must provide an implementation of the Renderer Interface. Normally by extending the abstract superclass which handles threading and event notification for the renderer.

For the sake of simplicity and security a toolkit object is provided that the renderer can use. This provides the user with a buffered image that the renderer can write on and provide a single interface for obtaining all information that the renderer may need.

<!ELEMENT extension (renderer+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>

This extension point is used to list renderer extensions. Renderer extentions are options the RendererManager can when visualizing a Layer. Often several Renderer extenentions could be used for a given Layer. The RendererCreationDecisive is used to provide enough metadata to RendererManager so an informed choice can be made. Note PrintManager will also make use of this extention point.



<!ELEMENT renderer (description)?>

<!ATTLIST renderer

class CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>

Declares a renderer extension. Make sure that the body of the extension provides a description of the renderer as it is used in User interfaces.



<!ELEMENT description (#PCDATA)>



A renderer extension must implement three interfaces:

In addition to implementing these three interfaces a renderer may optionally implement the FeatureRenderer, GridCoverageRenderer, or WMSRenderer interfaces.

The RenderMetric's renderer creation method is supplied with a toolkit object. The toolkit object is a facade for the renderers into the UDIG system. It provides access to the current map, project, viewport, display and the command factories. It provides methods for sending commands objects to UDIG also provides support methods such as pixelToWorld() which calculates the world location corresponding to a pixel in the display. Lastly, the renderer toolkit provides acess to the layer to render and the service object that will provide the spatial data.

net.refractions.udig.render.feature.basic