Package com.esri.core.geometry
Class RasterizedGeometry2D
- java.lang.Object
-
- com.esri.core.geometry.RasterizedGeometry2D
-
- Direct Known Subclasses:
RasterizedGeometry2DImpl
public abstract class RasterizedGeometry2D extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RasterizedGeometry2D.HitType
-
Constructor Summary
Constructors Constructor Description RasterizedGeometry2D()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
canUseAccelerator(Geometry geom)
Checks whether the RasterizedGeometry2D accelerator can be used with the given geometry.static RasterizedGeometry2D
create(Geometry geom, double toleranceXY, int rasterSizeBytes)
Creates a rasterized geometry from a given Geometry.(package private) static RasterizedGeometry2D
create(MultiVertexGeometryImpl geom, double toleranceXY, int rasterSizeBytes)
abstract boolean
dbgSaveToBitmap(java.lang.String fileName)
Dumps the raster to a bmp file for debug purposes.abstract long
estimateMemorySize()
Returns an estimate of this object size in bytes.abstract int
getRasterSize()
Returns raster size in bytesabstract double
getToleranceXY()
Returns the tolerance for which the rasterized Geometry has been built.abstract RasterizedGeometry2D.HitType
queryEnvelopeInGeometry(Envelope2D env)
Test an envelope against the RasterizedGeometry.abstract RasterizedGeometry2D.HitType
queryPointInGeometry(double x, double y)
Test a point against the RasterizedGeometrystatic int
rasterSizeFromAccelerationDegree(Geometry.GeometryAccelerationDegree accelDegree)
-
-
-
Method Detail
-
queryPointInGeometry
public abstract RasterizedGeometry2D.HitType queryPointInGeometry(double x, double y)
Test a point against the RasterizedGeometry
-
queryEnvelopeInGeometry
public abstract RasterizedGeometry2D.HitType queryEnvelopeInGeometry(Envelope2D env)
Test an envelope against the RasterizedGeometry.
-
create
public static RasterizedGeometry2D create(Geometry geom, double toleranceXY, int rasterSizeBytes)
Creates a rasterized geometry from a given Geometry.- Parameters:
geom
- The input geometry to rasterize. It has to be a MultiVertexGeometry instance.toleranceXY
- The tolerance of the rasterization. Raster pixels that are closer than given tolerance to the Geometry will be set.rasterSizeBytes
- The max size of the raster in bytes. The raster has size of rasterSize x rasterSize. Polygons are rasterized into 2 bpp (bits per pixel) rasters while other geometries are rasterized into 1 bpp rasters. 32x32 pixel raster for a polygon would take 256 bytes of memory
-
create
static RasterizedGeometry2D create(MultiVertexGeometryImpl geom, double toleranceXY, int rasterSizeBytes)
-
rasterSizeFromAccelerationDegree
public static int rasterSizeFromAccelerationDegree(Geometry.GeometryAccelerationDegree accelDegree)
-
canUseAccelerator
static boolean canUseAccelerator(Geometry geom)
Checks whether the RasterizedGeometry2D accelerator can be used with the given geometry.
-
getToleranceXY
public abstract double getToleranceXY()
Returns the tolerance for which the rasterized Geometry has been built.
-
getRasterSize
public abstract int getRasterSize()
Returns raster size in bytes
-
dbgSaveToBitmap
public abstract boolean dbgSaveToBitmap(java.lang.String fileName)
Dumps the raster to a bmp file for debug purposes.- Parameters:
fileName
-- Returns:
- true if success, false otherwise.
-
estimateMemorySize
public abstract long estimateMemorySize()
Returns an estimate of this object size in bytes.- Returns:
- Returns an estimate of this object size in bytes.
-
-