public class gvsig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
LOGGER_ERROR |
static int |
LOGGER_INFO |
static int |
LOGGER_WARN |
Constructor and Description |
---|
gvsig() |
Modifier and Type | Method and Description |
---|---|
static FLayer |
createDBF(FeatureType schema,
java.lang.Object... parameters) |
static FeatureType |
createFeatureType()
Returns a new and empty attributes definition.
|
static FeatureType |
createFeatureType(FeatureType featureType)
Returns a new and empty attributes definition based in an existing
FeatureType.
|
static FLayer |
createLayer(FeatureType schema,
java.lang.String layerType,
java.lang.Object... parameters)
Create a new layer with the specified parameters.
|
static FLayer |
createLayer(FeatureType schema,
java.lang.String serverType,
java.lang.String layerType,
java.lang.Object... parameters)
Create a new layer with the specified parameters.
|
static FLayer |
createShape(FeatureType schema,
java.lang.Object... parameters)
Create a new shape with the specified parameters.
|
static FLayer |
createTable(FeatureType schema,
java.lang.String servertype,
java.lang.String layerType,
java.lang.Object... parameters)
Create a new table with the specified parameters.
|
IProjection |
getCRS(java.lang.String name)
Create a new projectionobject associated with the passed name of
the projection.
|
java.lang.String |
getDataFolder()
Return the default data folder of gvSIG.
|
java.lang.String |
getProjectsFolder()
Return the default projects folder of gvSIG.
|
java.lang.String |
getResource(java.lang.String... parameters)
Create the path to a resource.
|
static FLayer |
loadDBF(java.lang.String dbffile)
Load an existing table file.
|
static FLayer |
loadLayer(java.lang.String layerType,
java.lang.Object... parameters)
Load an existing layer and return it.
|
static FLayer |
loadRasterFile(java.lang.String path)
Load an existing raster file in the current view.
|
static FLayer |
loadRasterFile(java.lang.String path,
java.lang.String projection)
Load an existing raster file in the current view.
|
static FLayer |
loadShapeFile(java.lang.String path)
Load an existing shape file in the current view.
|
static FLayer |
loadShapeFile(java.lang.String path,
java.lang.String projection)
Load an existing shape file in the current view.
|
static FLayer |
loadTable(java.lang.String format,
java.lang.Object... parameters)
Load an existing table file.
|
static void |
logger(java.lang.String msg,
int mode,
java.lang.Throwable exception)
Send a message to the log system.
|
DataStore |
openStore(java.lang.String storeType,
java.lang.Object... parameters)
Open an existen data store an return it.
|
public static int LOGGER_INFO
public static int LOGGER_WARN
public static int LOGGER_ERROR
public static FeatureType createFeatureType()
public static FeatureType createFeatureType(FeatureType featureType)
featureType
- from the new attributes are copiedpublic static FLayer createLayer(FeatureType schema, java.lang.String serverType, java.lang.String layerType, java.lang.Object... parameters)
layer = createLayer(schema=schema,
servertype="FilesystemExplorer",
layertype="Shape",
shpFile="/home/osc/temp/test1.shp",
CRS="EPSG:25830",
geometryType=POINT
)
schema
- the schema to use to create la layer.serverType
- The server type (filesystem, BBDD, ...)layerType
- The layer type to create (Shape, ...)parameters
- the specific parameters to create the new layerpublic static FLayer createLayer(FeatureType schema, java.lang.String layerType, java.lang.Object... parameters)
schema
- layerType
- parameters
- public static FLayer createShape(FeatureType schema, java.lang.Object... parameters)
schema
- filename,
- string, optionalgeometryType,
- optional, integer, established in the schemaCRS,
- optional, string epsg codeprefixname,
- optional, string layer name with a prefix if filename is not establishedpublic static FLayer createTable(FeatureType schema, java.lang.String servertype, java.lang.String layerType, java.lang.Object... parameters)
schema
- servertype
- layerType
- parameters
- public static FLayer createDBF(FeatureType schema, java.lang.Object... parameters)
public static FLayer loadDBF(java.lang.String dbffile)
dbffile,
- string, path to the table file to loadpublic static FLayer loadTable(java.lang.String format, java.lang.Object... parameters)
format,
- stringpath,
- string, path to the table file to loadpublic static FLayer loadShapeFile(java.lang.String path, java.lang.String projection)
path
- path to the shape file to loadprojection
- to use to load the shape filepublic static FLayer loadShapeFile(java.lang.String path)
path
- path to the shape file to loadpublic static FLayer loadRasterFile(java.lang.String path, java.lang.String projection)
path
- path to the raster file to loadprojection
- to use to load the raster filepublic static FLayer loadRasterFile(java.lang.String path)
path
- path to the raster file to loadpublic static FLayer loadLayer(java.lang.String layerType, java.lang.Object... parameters)
layerType
- parameters
- public static void logger(java.lang.String msg, int mode, java.lang.Throwable exception)
msg
- to send to logmode
- message type, is optional with default of LOGGER_INFO.exception
- an exception to log, is optional.public java.lang.String getResource(java.lang.String... parameters)
pathname = getResource(__file__,"data","icon.png")
parameters
- parts of path to the resource.public DataStore openStore(java.lang.String storeType, java.lang.Object... parameters)
from gvsig.utils import openStore
os = openStore('PostgreSQL',_entity_='Persistence%3APostgreSQLStoreParameters',
port='5432',
JDBCDriverClass='org.postgresql.Driver',
UseSSL='false',
Schema='public',
Catalog='',
URL='jdbc%3Apostgresql%3A%2F%2Flocalhost%3A5432%2Fej1',
BaseOrder='',
Workingarea=None,
CRS='EPSG:23030',
PKFields='gid',
BaseFilter='',
DefaultGeometryField='geom',
Fields='gid%2Cnombre%2Cpoblacion%2Cgeom',
Table='ciudades',
SQL='',
password='postgres',
dbname='ej1',
host='localhost',
dbuser='postgres',
ProviderName='PostgreSQL')
storeType
- the type of store to open.parameters
- to open the store.public IProjection getCRS(java.lang.String name)
CRSFactory.getCRS(name)
instead.name
- abbreviation of the projectionpublic java.lang.String getDataFolder()
public java.lang.String getProjectsFolder()