public class EasyFeature extends Object
| Constructor and Description |
|---|
EasyFeature(org.opengis.feature.simple.SimpleFeature feature)
Constructor of this easy feature, define the SimpleFeature here
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeDescriptor(org.opengis.feature.type.AttributeDescriptor attributeDescriptor)
Used for extended AttributeType adding.
|
void |
addAttributeDescriptor(String name,
Class binding) |
static org.opengis.feature.type.AttributeDescriptor |
buildGeometryAttributeDescriptor(String attributeName,
Class binding,
boolean isNillable,
org.opengis.referencing.crs.CoordinateReferenceSystem crs) |
boolean |
containsAttributeDescriptor(int attributeID)
Check if attributeID is legal (above zero and above attributeCount)
|
boolean |
containsAttributeDescriptor(String attributeName) |
void |
convertGeomTo2D() |
EasyFeature |
copy() |
EasyFeature |
copy(String ID) |
EasyFeature |
copy(String name,
String ID) |
Object |
getAttribute(int attributeID) |
Object |
getAttribute(String name) |
int |
getAttributeCount()
Get number of Attributes
|
int |
getAttributeDescriptorIDbyName(String name)
Lookup attributeID of AttributeType name
|
String |
getAttributeDescriptorNameByID(int attributeID)
Get name of AttributeType at given position
|
List<Object> |
getAttributes() |
org.opengis.feature.type.AttributeType |
getAttributeType(int attributeID)
Get attribute using attributeID as location in attribute array
|
org.opengis.feature.type.AttributeType |
getAttributeType(String name)
Get attribute with given atrributename
|
org.opengis.feature.simple.SimpleFeature |
getFeature()
Release a usable OpenGIS feature
|
org.opengis.feature.simple.SimpleFeatureType |
getFeatureType() |
String |
getID() |
String |
getTypeName() |
void |
insertAttributeDescriptor(int attributeID,
org.opengis.feature.type.AttributeDescriptor attributeDescriptor)
Used for extended AttributeType inserting.
|
void |
insertAttributeDescriptor(int attributeID,
String name,
Class binding)
Insert default attribute at a given postition, with name and classtype
|
boolean |
isSkipped() |
void |
removeAllAttributeDescriptors(boolean keepGeom)
Remove all AttributeTypes with values
|
void |
removeAttributeDescriptor(int attributeID)
Remove AttributeType at attributeTypeID
|
void |
removeAttributeDescriptor(String name)
Remove AttributeType by name
|
void |
repairGeometry() |
void |
setAttribute(int attributeID,
Object attribute)
Set Attribute at a specified position
|
void |
setAttribute(String name,
Object attribute)
Set Attribute at a specified name
|
void |
setAttributeDescriptor(int attributeID,
org.opengis.feature.type.AttributeDescriptor attributeDescriptor,
boolean keepValue)
Extended way to set a AttributeType; overwrites the current AttributeType
at that index
|
void |
setAttributeDescriptor(int attributeID,
String name,
Class binding,
boolean keepValue)
Default way to set AttributeType at specified attributeID, overwrites the
current AttributeType at that index
|
void |
setAttributeDescriptor(String attributeName,
org.opengis.feature.type.AttributeDescriptor attributeDescriptor) |
void |
setCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs) |
void |
setSkipped(boolean skipped) |
void |
setTypeName(String name) |
String |
toString() |
public EasyFeature(org.opengis.feature.simple.SimpleFeature feature)
feature - The SimpleFeature to usepublic org.opengis.feature.simple.SimpleFeature getFeature()
public org.opengis.feature.type.AttributeType getAttributeType(int attributeID)
attributeID - public org.opengis.feature.type.AttributeType getAttributeType(String name)
name - public void insertAttributeDescriptor(int attributeID,
String name,
Class binding)
attributeID - name - binding - public void insertAttributeDescriptor(int attributeID,
org.opengis.feature.type.AttributeDescriptor attributeDescriptor)
attributeID - attributeDescriptor - public void addAttributeDescriptor(org.opengis.feature.type.AttributeDescriptor attributeDescriptor)
attributeDescriptor - public void removeAllAttributeDescriptors(boolean keepGeom)
throws Exception
boolean - keepGeom do not remove geometry columnExceptionpublic void removeAttributeDescriptor(int attributeID)
throws Exception
attributeID - Exceptionpublic void removeAttributeDescriptor(String name) throws Exception
name - Exceptionpublic void setAttributeDescriptor(int attributeID,
String name,
Class binding,
boolean keepValue)
attributeID - name - binding - public void setAttributeDescriptor(int attributeID,
org.opengis.feature.type.AttributeDescriptor attributeDescriptor,
boolean keepValue)
attributeID - attributeDescriptor - public void setAttributeDescriptor(String attributeName, org.opengis.feature.type.AttributeDescriptor attributeDescriptor) throws Exception
Exceptionpublic int getAttributeDescriptorIDbyName(String name) throws FeatureException
name - ExceptionFeatureExceptionpublic String getAttributeDescriptorNameByID(int attributeID) throws Exception
attributeID - Exceptionpublic int getAttributeCount()
public void setAttribute(int attributeID,
Object attribute)
attributeID - attribute - public void setAttribute(String name, Object attribute)
name - attribute - public Object getAttribute(int attributeID)
public String getTypeName()
public void setTypeName(String name)
public EasyFeature copy()
public EasyFeature copy(String ID)
public EasyFeature copy(String name, String ID)
public String getID()
public org.opengis.feature.simple.SimpleFeatureType getFeatureType()
public boolean containsAttributeDescriptor(int attributeID)
attributeID - public boolean containsAttributeDescriptor(String attributeName)
public static org.opengis.feature.type.AttributeDescriptor buildGeometryAttributeDescriptor(String attributeName, Class binding, boolean isNillable, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
public void setCRS(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
throws Exception
Exceptionpublic void repairGeometry()
throws FeatureException
FeatureExceptionpublic void convertGeomTo2D()
public boolean isSkipped()
public void setSkipped(boolean skipped)
skipped - the skipped to setCopyright © 2016. All rights reserved.