Class VectorizeAlgorithm
- java.lang.Object
-
- org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm
-
public class VectorizeAlgorithm extends Object
This class provides a complete set to transform a grid (GridWrapperNotInterpolated.class) derived from a RasterImageLayer.class into vector objetcs. All methods derived from AdbToolbox project, from Sextante and from OpenJUMP inner methods. To build a grid from RasterImageLayer: OpenJUMPSextanteRasterLayer rstLayer = new OpenJUMPSextanteRasterLayer(); rstLayer.create(rLayer, false); GridWrapperNotInterpolated gwrapper = new GridWrapperNotInterpolated(rstLayer, rstLayer.getLayerGridExtent());- Author:
- Beppe
-
-
Field Summary
Fields Modifier and Type Field Description static WorkbenchFrameframe
-
Constructor Summary
Constructors Constructor Description VectorizeAlgorithm()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)FeatureCollectiontoContours(GridWrapperNotInterpolated gwrapper, double zMin, double zMax, double dDistance, String attributeName, int band)Convert a DTM raster to a feature collection of contours (linestrings) defining a GridWrapperNotInterpolated, a minimum and maximun elevations, a vertical distance between each contour, an attribute name and the band of the rasterFeatureCollectiontoGridPoint(GridWrapperNotInterpolated gwrapper, int numBands)FeatureCollectiontoGridPolygon(GridWrapperNotInterpolated gwrapper, int maxCells, int numBands)FeatureCollectiontoLines(GridWrapperNotInterpolated gwrapper, String attributeName)Convert a line raster a feature collection of linestrings defining a GridWrapperNotInterpolated and an attribute.FeatureCollectiontoPoint(GridWrapperNotInterpolated gwrapper, int band)static FeatureCollectiontoPolygons(GridWrapperNotInterpolated gwrapper, boolean explodeMultipolygons, String attributeName, int band)Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band Sextante algorithm - compatible with OpenKLEM methodsstatic FeatureCollectiontoPolygonsAdbToolBox(GridWrapperNotInterpolated gwrapper, boolean explodeMultipolygons, String attributeName, int band)Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band AdbToolbox algorithmstatic FeatureCollectiontoPolygonsMikeToolBox(GridWrapperNotInterpolated gwrapper, boolean simplify, String attributeName, int band)static FeatureCollectiontoPolygonsSextante(GridWrapperNotInterpolated gwrapper, String attributeName, int band)Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band Sextante algorithm
-
-
-
Field Detail
-
frame
public static WorkbenchFrame frame
-
-
Method Detail
-
toPolygonsAdbToolBox
public static FeatureCollection toPolygonsAdbToolBox(GridWrapperNotInterpolated gwrapper, boolean explodeMultipolygons, String attributeName, int band)
Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band AdbToolbox algorithm- Parameters:
gwrapper- GridWrapperNotInterpolatedexplodeMultipolygons- Explode MultiPolygons in Polygonsband- Number of band (0,1,2,etc)- Returns:
- a FeatureCollection containing vectorized polygons
-
toPolygonsMikeToolBox
public static FeatureCollection toPolygonsMikeToolBox(GridWrapperNotInterpolated gwrapper, boolean simplify, String attributeName, int band)
-
toPolygonsSextante
public static FeatureCollection toPolygonsSextante(GridWrapperNotInterpolated gwrapper, String attributeName, int band)
Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band Sextante algorithm- Parameters:
gwrapper- a GridWrapperNotInterpolatedattributeName- an attribute nameband- the image band to use- Returns:
- a FeatureCollection containing vectorized polygons
-
toContours
public FeatureCollection toContours(GridWrapperNotInterpolated gwrapper, double zMin, double zMax, double dDistance, String attributeName, int band)
Convert a DTM raster to a feature collection of contours (linestrings) defining a GridWrapperNotInterpolated, a minimum and maximun elevations, a vertical distance between each contour, an attribute name and the band of the raster- Parameters:
gwrapper- a GridWrapperNotInterpolatedzMin- minimum elevationzMax- maximum elevationdDistance- vertical distance between contour linesattributeName- attribute nameband- the band containing elevation data- Returns:
- a FeatureCollection containing vectorized contour lines
-
toLines
public FeatureCollection toLines(GridWrapperNotInterpolated gwrapper, String attributeName)
Convert a line raster a feature collection of linestrings defining a GridWrapperNotInterpolated and an attribute. [Currently not working possibly due to a bug of OpenJUMPSextanteRasterLayer.create method]- Parameters:
gwrapper- a GridWrapperNotInterpolatedattributeName- attribute name- Returns:
-
toGridPoint
public FeatureCollection toGridPoint(GridWrapperNotInterpolated gwrapper, int numBands)
-
toPoint
public FeatureCollection toPoint(GridWrapperNotInterpolated gwrapper, int band)
-
toGridPolygon
public FeatureCollection toGridPolygon(GridWrapperNotInterpolated gwrapper, int maxCells, int numBands)
-
toPolygons
public static FeatureCollection toPolygons(GridWrapperNotInterpolated gwrapper, boolean explodeMultipolygons, String attributeName, int band)
Create a FeatureCollection of polygons defining a GridWrapperNotInterpolated and number of band Sextante algorithm - compatible with OpenKLEM methods- Parameters:
gwrapper- a GridWrapperNotInterpolatedexplodeMultipolygons- true to separate disjointed polygonsattributeName- an attribute nameband- the image band to use- Returns:
- a FeatureCollection containing vectorized polygons
-
main
public static void main(String[] args)
-
-