public class WikiBrainShapeFile extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
EXTENSIONS |
static String |
WB_MAP_EXTENSINO |
Constructor and Description |
---|
WikiBrainShapeFile(File file)
Creates a new shapefile wrapper associated with the given file.
|
WikiBrainShapeFile(File file,
String encoding)
Creates a new shapefile wrapper associated with the given file.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(File file) |
static org.geotools.data.DataStore |
fileToDataStore(File file) |
static org.geotools.data.DataStore |
fileToDataStore(File file,
String encoding) |
static File |
getAlternateExtension(File file,
String ext) |
List<File> |
getComponentFiles() |
org.geotools.data.DataStore |
getDataStore() |
String |
getDefaultLayer()
Returns the name of the default layer
|
org.geotools.data.simple.SimpleFeatureCollection |
getFeatureCollection() |
org.geotools.data.simple.SimpleFeatureCollection |
getFeatureCollection(String layer) |
org.geotools.data.simple.SimpleFeatureIterator |
getFeatureIter()
Returns an iterator over rows for the default layer.
|
org.geotools.data.simple.SimpleFeatureIterator |
getFeatureIter(String layer)
Returns an iterator over rows for the specified layer.
|
List<String> |
getFeatureNames()
Returns all feature names (i.e.
|
List<String> |
getFeatureNames(String layer)
Returns all feature names (i.e.
|
File |
getFile() |
File |
getMappingFile() |
boolean |
hasComponentFiles() |
boolean |
hasMappingFile() |
static boolean |
hasShpExtension(File file) |
void |
initDataStoreIfNecessary() |
WikiBrainShapeFile |
move(File dest) |
Map<String,String> |
readMapping()
Reads in a mapping from shapefile key to title for all entries with status != U
|
public static final String[] EXTENSIONS
public static final String WB_MAP_EXTENSINO
public WikiBrainShapeFile(File file)
file
- Must end with ".shp"IOException
public WikiBrainShapeFile(File file, String encoding)
file
- Must end with ".shp"IOException
public void initDataStoreIfNecessary() throws IOException
IOException
public Map<String,String> readMapping() throws IOException
IOException
public List<String> getFeatureNames(String layer) throws IOException
layer
- IOException
public List<String> getFeatureNames() throws IOException
IOException
public org.geotools.data.simple.SimpleFeatureIterator getFeatureIter() throws IOException
IOException
public org.geotools.data.simple.SimpleFeatureIterator getFeatureIter(String layer) throws IOException
IOException
public org.geotools.data.simple.SimpleFeatureCollection getFeatureCollection(String layer) throws IOException
IOException
public org.geotools.data.simple.SimpleFeatureCollection getFeatureCollection() throws IOException
IOException
public String getDefaultLayer() throws IOException
IOException
public WikiBrainShapeFile move(File dest) throws IOException
IOException
public File getMappingFile()
public boolean hasMappingFile()
public File getFile()
public boolean hasComponentFiles()
public org.geotools.data.DataStore getDataStore()
public static org.geotools.data.DataStore fileToDataStore(File file) throws IOException
IOException
public static org.geotools.data.DataStore fileToDataStore(File file, String encoding) throws IOException
IOException
public static boolean exists(File file)
public static boolean hasShpExtension(File file)
Copyright © 2014. All rights reserved.