Package de.dlr.proseo.geotools.rest
Class ShpFile
java.lang.Object
de.dlr.proseo.geotools.rest.ShpFile
Hold a shape file and initialized data like feature source, filter, geometry,
...
- Author:
- Melchinger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enumeration of different types of geographic file formats, i.e. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opengis.filter.FilterFactory2org.locationtech.jts.geom.GeometryFactoryorg.geotools.data.simple.SimpleFeatureSourcegetType()openFileAndCreate(String filename, ShpFile.GeoFileType type) Open and initialize a shape filevoidsetFilename(String filename) voidsetFilter(org.opengis.filter.FilterFactory2 filter) voidsetGeometry(org.locationtech.jts.geom.GeometryFactory geometry) voidsetSource(org.geotools.data.simple.SimpleFeatureSource source) voidsetType(ShpFile.GeoFileType type)
-
Constructor Details
-
ShpFile
public ShpFile()
-
-
Method Details
-
getFilename
- Returns:
- the filename
-
getType
- Returns:
- the type
-
getSource
public org.geotools.data.simple.SimpleFeatureSource getSource()- Returns:
- the source
-
getFilter
public org.opengis.filter.FilterFactory2 getFilter()- Returns:
- the filter
-
getGeometry
public org.locationtech.jts.geom.GeometryFactory getGeometry()- Returns:
- the geometry factory
-
setFilename
- Parameters:
filename- the filename to set
-
setType
- Parameters:
type- the type to set
-
setSource
public void setSource(org.geotools.data.simple.SimpleFeatureSource source) - Parameters:
source- the source to set
-
setFilter
public void setFilter(org.opengis.filter.FilterFactory2 filter) - Parameters:
filter- the filter to set
-
setGeometry
public void setGeometry(org.locationtech.jts.geom.GeometryFactory geometry) - Parameters:
geometry- the geometry factory to set
-
openFileAndCreate
public ShpFile openFileAndCreate(String filename, ShpFile.GeoFileType type) throws UnsupportedOperationException, IllegalArgumentException, IOException Open and initialize a shape file- Parameters:
filename- The file nametype- The file type (currently only SHP supported)- Returns:
- The initialized instance
- Throws:
UnsupportedOperationException- if a valid, but not yet handled file type was givenIllegalArgumentException- if an invalid file type was givenIOException- if the shape file could not be opened created successfully
-