Class ShapeConverter

java.lang.Object
com.treemap.swing.voronoi.ShapeConverter

public class ShapeConverter extends Object
A polygon converter for Voronoi raster output
  • Constructor Details

    • ShapeConverter

      public ShapeConverter()
  • Method Details

    • getShapeByMarchingSquares

      public static void getShapeByMarchingSquares(VoronoiCell[] cells, VoronoiOutputRaster outputRaster, List<Vertex> vertexes, com.macrofocus.geom.Shape parent)
      Generates the polygon shape of Voronoi cells according to raster data using the marching squares algorithm. If the vertexes parameter is null un-smooth polygons are created. Other wise smooth GenralPaths are creaed.
      Parameters:
      cells - the cells to calculate there polygons
      outputRaster - the raster outputRaster
      vertexes - a list of vertexes (or vertexes) of the diagram. If this parameter is null, un-smooth polygons are generated.
      parent -