Hello Akos,

Rendering a map in GeoTools involves adding your layers to a
MapContent object, linking this to a GTRenderer object (almost always
an instance of StreamingRenderer), and then asking the renderer to
draw into a Graphics2D object.
Each layer has an associated Style object, created either from a SLD
file or programmatically.

For on-screen display there are the (very basic) gt-swing and gt-swt
widget modules. Alternatively, if you only need to render into an
image you can just pass a graphics object created from your image to
the renderer.

Have a look at the GeoTools tutorials. The Map Style tutorial
introduces the basics of creating Style objects from SLD or
programmatically:
http://docs.geotools.org/latest/userguide/tutorial/map/style.html

Hope this helps,

Michael


On 26 October 2012 23:04, Ákos Maróy <[email protected]> wrote:
> Hi,
>
> I wonder how easy would it be do programmatically render a map using
> geotools?
>
> Basically I want to achieve the same kind of rendering as done by
> geoserver, but for the whole area that my spacial data covers. I have a
> PostGIS database (basically OSM), and SLD files that define who to
> render it. I'm also using some custom imagery that are referenced by the
> SLD files as external graphic resources.
>
> Is there a simple sample code that demonstrates how this would be done?
>
> Any pointers welcome,
>
>
> Akos
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to