Skip to end of metadata
Go to start of metadata

The example I wished I had had when I started to work with Geotools.
It tries to show the basic things needed to render a shape file.
I adapted the LiteRendererTest2.java example.

This example

  • reads polylines from a shape file,
  • uses a LiteRenderer to render the polylines,
  • uses SLD (Styled Layer Descriptor) to describe the style to use,
  • includes a few buttons to zoom and pan the rendered image, and
  • additionally renders the image to a .png file.

1 Comment

  1. I found the exmple very useful, so thought I'd tweak it for gt2-2.3.0-M0 & JTS 1.7

    • uses no deprecated code
    • uses a StreamingRender to render the polylines
    • uses a file chooser to open a polyline shape file