Hello, How can I create a wms image (e.g. png or gif ) from a set of postgis geometry objects ? Which java classes does geoserver use to do this ? I need to this because i intend to use pgrouting as part of a new web application I am working on. In the application, I need to execute pgrouting queries that returns a set of postgis geometry objects, this geometry objects will have to be converted to a wms image and sent to the clients web browser. I know geoserver does this for other spatial queries as part of its wms implementation. I will like to know which classes geoserver uses to this. Thanks, Roman. |
---|
Hi, you may want to use the geotools renderer directly instead of loading up geoserver deps as a library, which it is not designed for. Yet, it would be possible to use geoserver's GetMapResponse from the wms module that way, but from what you tell I would be hesitant of carring out all the geoserver dependencies in a custom app just for that.
The geotools users guide contain some information on renderer and styling: http://docs.codehaus.org/display/GEOTDOC/12+Render
It should be quite simple to set up and more a library as you expect. Basically you just create a renderer, set it up with a map context holding the layers, styles, extent, map dimensions, etc you want your map rendered as, and get back a renderedimage.
hope that helps,
Gabriel
Roman Isitua escribió:
Hello,
How can I create a wms image (e.g. png or gif ) from a set of postgis geometry objects ? Which java classes does geoserver use to do this ?
I need to this because i intend to use pgrouting as part of a new web application I am working on. In the application, I need to execute pgrouting queries that returns a set of postgis geometry objects, this geometry objects will have to be converted to a wms image and sent to the clients web browser. I know geoserver does this for other spatial queries as part of its wms implementation. I will like to know which classes geoserver uses to this.
Thanks,
Roman.
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Roman Isitua wrote:
Hello,
How can I create a wms image (e.g. png or gif ) from a set of postgis geometry objects ? Which java classes does geoserver use to do this ?
I need to this because i intend to use pgrouting as part of a new web application I am working on. In the application, I need to execute pgrouting queries that returns a set of postgis geometry objects, this geometry objects will have to be converted to a wms image and sent to the clients web browser. I know geoserver does this for other spatial queries as part of its wms implementation. I will like to know which classes geoserver uses to this.
Basically we're using the PostgisDataStore to read the
database, and the the StreamingRenderer to render them into an image.
Both classes are actually in GeoTools.
Cheers
Andrea