public abstract class Rasterizer
extends java.lang.Object
| Constructor and Description |
|---|
Rasterizer() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration conf)
Configures this rasterizer according to the MapReduce program.
|
abstract RasterLayer |
createRaster(int width,
int height,
Rectangle mbr)
Creates an empty raster layer of the given width and height.
|
int |
getRadius()
Returns the radius in pixels that one object might affect in the image.
|
java.lang.Class<? extends RasterLayer> |
getRasterClass()
Returns the raster class associated with this rasterizer
|
static Rasterizer |
getRasterizer(Configuration job) |
boolean |
isSmooth()
Tells whether this rasterizer supports a smooth function or not.
|
abstract void |
merge(RasterLayer finalLayer,
RasterLayer intermediateLayer)
Merges an intermediate layer into the final layer based on its location
|
void |
rasterize(RasterLayer layer,
java.lang.Iterable<? extends Shape> shapes)
Rasterizes a set of shapes to the given layer
|
void |
rasterize(RasterLayer layer,
java.util.Iterator<? extends Shape> shapes)
Rasterize a set of records by calling the rasterize function on each one.
|
abstract void |
rasterize(RasterLayer layer,
Shape shape)
Rasterizes one shape to the given layer
|
static void |
setRasterizer(Configuration job,
java.lang.Class<? extends Rasterizer> rasterizerClass) |
<S extends Shape> |
smooth(java.lang.Iterable<S> r)
Smooth a set of records that are spatially close to each other and returns
a new set of smoothed records.
|
abstract void |
writeImage(RasterLayer layer,
java.io.DataOutputStream out,
boolean vflip)
Writes a raster layer as an image to the output.
|
public static void setRasterizer(Configuration job,
java.lang.Class<? extends Rasterizer> rasterizerClass)
public static Rasterizer getRasterizer(Configuration job)
public void configure(Configuration conf)
conf - public abstract RasterLayer createRaster(int width, int height, Rectangle mbr)
width - - Width of the created layer in pixelsheight - - Height of the created layer in pixelsmbr - - The minimal bounding rectangle of the layer in the inputpublic void rasterize(RasterLayer layer, java.lang.Iterable<? extends Shape> shapes)
layer - - the layer to rasterize to. This layer has to be created
using the method createRaster(int, int, Rectangle).shapes - - a set of shapes to rasterizepublic void rasterize(RasterLayer layer, java.util.Iterator<? extends Shape> shapes)
layer - shapes - public abstract void rasterize(RasterLayer layer, Shape shape)
layer - - the layer to rasterize to. This layer has to be created
using the method createRaster(int, int, Rectangle).shape - - the shape to rasterizepublic java.lang.Class<? extends RasterLayer> getRasterClass()
public abstract void merge(RasterLayer finalLayer, RasterLayer intermediateLayer)
finalLayer - intermediateLayer - public abstract void writeImage(RasterLayer layer, java.io.DataOutputStream out, boolean vflip) throws java.io.IOException
layer - - the layer to be written to the output as an imageout - - the output stream to which the image will be writtenvflip - - if true, the image is vertically flipped before writtenjava.io.IOExceptionpublic int getRadius()
public <S extends Shape> java.lang.Iterable<S> smooth(java.lang.Iterable<S> r)
r - public boolean isSmooth()