Class VectorizeAlgorithm
java.lang.Object
org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidtoContours(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 rastertoGridPoint(GridWrapperNotInterpolated gwrapper, int numBands) toGridPolygon(GridWrapperNotInterpolated gwrapper, int maxCells, int numBands) toLines(GridWrapperNotInterpolated gwrapper, String attributeName) Convert a line raster a feature collection of linestrings defining a GridWrapperNotInterpolated and an attribute.toPoint(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 Details
-
frame
-
-
Constructor Details
-
VectorizeAlgorithm
public VectorizeAlgorithm()
-
-
Method Details
-
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
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
-
toPoint
-
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
-