Hi Timon,

I'm suspect I don't understand your question properly because of my
ignorance of WMS so I'm copying this reply to Andrea and Jody (core
GeoTools and GeoServer developers) in the hope that they can give you
more assistance.

> I will try to provide the information about my task, which is to
> implement an extension to Geoserver.
> We have our data saved as a blob in a postgre database and i shall
> implement a Web Map Service.
> To be OGC conform i have to implement the methods GetMap and GetCapabilities.
>
> That is my task.
> When there is a getMap-Request, i read the data from the database and
> create a BufferedImage with a
> ColorMap, which is also saved in the database.
> My Problem occur when i try to render the BufferedImage to a map.

I'm assuming that your WMS is serving an image in response to a GetMap
request and so by "render the image to a map" you mean create a new
output image showing your raster data in the required projection,
possibly also with other layers displayed. Is that correct ?

If your input image does not need to be reprojected, you can render it
by using a DirectLayer. This is a Layer class with an abstract draw
method which you implement in a sub-class to display whatever you
want...

http://docs.geotools.org/latest/javadocs/org/geotools/map/DirectLayer.html

You could draw your buffered image into the Graphics2D instance which
is passed as an arg to the draw method.

The general approach is then much as in my original reply: create a
MapContent, add required layers including your DirectLayer sub-class
to draw the image, and associated the MapContent with a
StreamingRenderer.

I hope that helps more. If not, perhaps Andrea and Jody can pick up
the story - they know infinitely more than me :)

Michael

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to