class Directory extends Workspace
A Directory Workspace can contain one or more Shapefiles.
Directory dir = new Directory("shapefiles")
Layer layer = dir.get("states")
| Modifiers | Name | Description |
|---|---|---|
static class |
Directory.Factory |
The Directory WorkspaceFactory |
| Constructor and description |
|---|
Directory
(java.io.File dir)Create a Directory Workspace from a File directory |
Directory
(java.lang.String dir)Create a Directory Workspace from a File directory |
Directory
(DirectoryDataStore ds)Create a Directory Workspace from a GeoTools DirectoryDataStore |
Directory
(ShapefileDataStore ds)Create a Directory Workspace from a GeoTools ShapefileDataStore |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static Directory |
fromURL(Map options, java.net.URL url, java.io.File dir)Get a Directory from a zipped Shapefile |
|
Layer |
get(java.lang.String name)Get a Layer by name |
|
java.io.File |
getFile()Get the File or Directory |
|
java.lang.String |
getFormat()Get the format |
|
void |
remove(java.lang.String name)Remove a Layer by name from this Workspace |
|
java.lang.String |
toString()The string representation |
| Methods inherited from class | Name |
|---|---|
class Workspace |
add, add, close, create, create, get, getAt, getFormat, getLayers, getNames, getParameters, getWorkspace, getWorkspace, getWorkspaceNames, getWorkspaceParameters, has, readFeatures, remove, remove, withWorkspace, withWorkspace, withWorkspace, wrap |
Create a Directory Workspace from a File directory
dir - The File directoryCreate a Directory Workspace from a File directory
dir - The File directory as a StringCreate a Directory Workspace from a GeoTools DirectoryDataStore
ds - The GeoTools DirectoryDataStoreCreate a Directory Workspace from a GeoTools ShapefileDataStore
ds - The GeoTools ShapefileDataStoreGet a Directory from a zipped Shapefile
options - Optional named parameters:
url - The URL of the zipped Shapefiledir - The File directory where we will unzip the zip fileGet a Layer by name
The - Layer nameGet the File or Directory
Get the format
Remove a Layer by name from this Workspace
name - The Layer nameThe string representation