public class TerraLib extends java.lang.Object implements TerraLibConstants
ARRAY_TYPE, BIT_TYPE, BOOLEAN_TYPE, BYTE_ARRAY_TYPE, CDOUBLE_TYPE, CFLOAT_TYPE, CHAR_TYPE, CINT16_TYPE, CINT32_TYPE, COMPOSITE_TYPE, DATAACCESS_TYPE, DATASET_TYPE, DATASETITEM_TYPE, DATETIME_TYPE, DOUBLE_TYPE, FLOAT_TYPE, GEOMETRY_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE, LAST_COMMON_DATATYPE_CODE, LAST_COMMON_EXCEPTION_CODE, NO_CONNECTION_AVAILABLE, NUMERIC_TYPE, POLYMORPHIC_TYPE, R1BIT_TYPE, R2BITS_TYPE, R4BITS_TYPE, RASTER_TYPE, STRING_TYPE, UCHAR_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE, UNKNOWN_EXCEPTION, UNKNOWN_TYPE, UOM_Acre, UOM_Degree, UOM_Foot, UOM_Hectare, UOM_Kilometre, UOM_Metre, UOM_NauticalMile, UOM_Radian, UOM_SquareFoot, UOM_SquareKilometre, UOM_SquareMetre, UOM_Unity, UOM_Yard, VOID_TYPE, XML_TYPE| Constructor and Description |
|---|
TerraLib() |
| Modifier and Type | Method and Description |
|---|---|
static void |
Finalize()
Finalizes the TerraLib modules.
|
static LayerVector |
GetDataSetsAsLayers(DataSource ds)
Returns all data sets in the data source as layers, each one as a single layer.
|
static DataSource |
GetDataSource(java.lang.String dSrcId)
Retrieves a previously opened data source.
|
static Layer |
GetFolderLayer()
Returns the selected layers as children of a single layer called a folder layer.
|
static byte[] |
GetLayersImage(LayerVector layers,
java.awt.geom.Rectangle2D.Double bbox,
int width,
int height,
long size,
java.awt.Color bckGround)
Returns a PNG image of the given layers.
|
static java.awt.geom.AffineTransform |
GetTransformation(java.awt.geom.Rectangle2D.Double vport,
java.awt.geom.Rectangle2D.Double win)
Returns the transformation matrix to map world coordinates to device coordinates.
|
static void |
Initialize()
Initializes the TerraLib modules.
|
static DataSource |
MakeDataSource(java.lang.String dsType,
java.lang.String uri)
Creates and opens an existent data source.
|
static LayerVector |
OpenLayers()
Opens a window for the user to select, from available datasources, some list of layers.
|
public static void Initialize()
throws java.io.IOException
java.io.IOException - Any problem on modules initialization will raise an java.io.IOException.public static void Finalize()
public static DataSource MakeDataSource(java.lang.String dsType, java.lang.String uri)
See the documentation of the data source plugins of the TerraLib for details of dsType and connInfo.
dsType - Name of the driver of the data source.uri - Information about the data source.public static DataSource GetDataSource(java.lang.String dSrcId)
dSrcId - Identifier of the data source to be searched.public static LayerVector GetDataSetsAsLayers(DataSource ds)
Note that all layers are visible.
ds - The data source to be processed.public static byte[] GetLayersImage(LayerVector layers, java.awt.geom.Rectangle2D.Double bbox, int width, int height, long size, java.awt.Color bckGround)
Note that the layers will be rendered at reverse order, it means that the last layer on the layers set will be the first to be rendered.
layers - Layers to be rendered.bbox - Bounding rectangle of the area to be rendered (return parameter). The rectangle must change to suit to the image dimensions.width - Image width.height - Image height.size - Size of the image (return parameter).bckGround - Background color of the image.public static java.awt.geom.AffineTransform GetTransformation(java.awt.geom.Rectangle2D.Double vport,
java.awt.geom.Rectangle2D.Double win)
vport - Bounding rectangle of the device (pixel coordinate).win - Bounding rectangle of the data (world coordinate).AffineTransformpublic static LayerVector OpenLayers() throws java.io.IOException
java.io.IOException - An exception will be raised if the operation fail.public static Layer GetFolderLayer() throws java.io.IOException
java.io.IOException - An exception will be raised if the operation fail.