Search code examples
geotools

Create isolines shape-file by Geotools


I have an array (grid) of points (coordinates x,y and attribute top). I need to build isolines by them (basis of attribute top values) and create a shape-file.

I use Geotools Java library and I'm able create a shape-file with set of LineString. But unfortunately I have no idea what to do with my array of point to get isolines.

Does Geotools have a way to build isolines automatically?


Solution

  • GeoTools considers contouring (which is what we geographers call isolines :-)) to be an imaging operation so it is outsourced to the JAI-tools library.

    The basic process is to convert your array of points into an Image and then call the Contouring process on it as a JAI op.

    There is a full demo here.