|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gdal.ogr.Feature
public class Feature
A simple feature, including geometry and attributes.
The Feature class is a binding for the C++ OGRFeature class.
Constructor Summary | |
---|---|
Feature(FeatureDefn feature_def)
Constructor. |
Method Summary | |
---|---|
Object |
clone()
|
Feature |
Clone()
Duplicate feature. |
void |
delete()
Delete (in memory) a feature. |
void |
DumpReadable()
Dump this feature in a human readable form. |
boolean |
Equal(Feature feature)
Test if two features are the same. |
boolean |
equals(Object obj)
|
FeatureDefn |
GetDefnRef()
Fetch feature definition. |
int |
GetFID()
Get feature identifier. |
void |
GetFieldAsDateTime(int ifield,
int[] pnYear,
int[] pnMonth,
int[] pnDay,
int[] pnHour,
int[] pnMinute,
int[] pnSecond,
int[] pnTZFlag)
Fetch field value as date and time. |
double |
GetFieldAsDouble(int ifield)
Fetch field value as a double. |
double |
GetFieldAsDouble(String name)
Fetch field value as a double. |
double[] |
GetFieldAsDoubleList(int ifield)
Fetch field value as a list of doubles. |
int |
GetFieldAsInteger(int ifield)
Fetch field value as integer. |
int |
GetFieldAsInteger(String name)
Fetch field value as integer. |
int[] |
GetFieldAsIntegerList(int ifield)
Fetch field value as a list of integers. |
String |
GetFieldAsString(int ifield)
Fetch field value as a string. |
String |
GetFieldAsString(String name)
Fetch field value as a string. |
String[] |
GetFieldAsStringList(int ifield)
Fetch field value as a list of strings. |
int |
GetFieldCount()
Fetch number of fields on this feature. |
FieldDefn |
GetFieldDefnRef(int ifield)
Fetch definition for this field. |
FieldDefn |
GetFieldDefnRef(String name)
Fetch definition for this field. |
int |
GetFieldIndex(String name)
Fetch the field index given field name. |
int |
GetFieldType(int ifield)
Fetch the field type. |
int |
GetFieldType(String name)
Fetch the field type. |
Geometry |
GetGeometryRef()
Fetch pointer to feature geometry. |
String |
GetStyleString()
Fetch style string for this feature. |
int |
hashCode()
|
boolean |
IsFieldSet(int ifield)
Test if a field has ever been assigned a value or not. |
boolean |
IsFieldSet(String name)
Test if a field has ever been assigned a value or not. |
int |
SetFID(int fid)
Set the feature identifier. |
void |
SetField(int ifield,
double val)
Set field to double value. |
void |
SetField(int ifield,
int val)
Set field to integer value. |
void |
SetField(int ifield,
int year,
int month,
int day,
int hour,
int minute,
int second,
int tzflag)
Set field to date. |
void |
SetField(int ifield,
String val)
Set field to string value. |
void |
SetField(String name,
double val)
Set field to double value. |
void |
SetField(String name,
int val)
Set field to integer value. |
void |
SetField(String name,
int year,
int month,
int day,
int hour,
int minute,
int second,
int tzflag)
Set field to date. |
void |
SetField(String name,
String val)
Set field to string value. |
void |
SetFieldDoubleList(int ifield,
double[] values)
Set field to list of doubles value. |
void |
SetFieldIntegerList(int ifield,
int[] values)
Set field to list of integers value. |
void |
SetFieldStringList(int ifield,
Vector values)
Set field to list of strings value. |
int |
SetFrom(Feature srcFeature)
Set one feature from another. |
int |
SetFrom(Feature srcFeature,
int forgiving)
Set one feature from another. |
int |
SetGeometry(Geometry geom)
Set feature geometry. |
int |
SetGeometryDirectly(Geometry geom)
Set feature geometry. |
void |
SetStyleString(String style_string)
Set feature style string. |
void |
UnsetField(int ifield)
Clear a field, marking it as unset. |
void |
UnsetField(String name)
Clear a field, marking it as unset. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Feature(FeatureDefn feature_def)
feature_def
- feature class (layer) definition to which the feature will
adhere.Method Detail |
---|
public void delete()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Object clone()
clone
in class Object
public FeatureDefn GetDefnRef()
public int SetGeometry(Geometry geom)
geom
- new geometry to apply to feature. Passing null value here
is correct and it will result in deallocation of currently assigned geometry
without assigning new one.
public int SetGeometryDirectly(Geometry geom)
geom
- new geometry to apply to feature. Passing null value here
is correct and it will result in deallocation of currently assigned geometry
without assigning new one.
public Geometry GetGeometryRef()
public Feature Clone()
public boolean Equal(Feature feature)
feature
- the other feature to test this one against.
public int GetFieldCount()
public FieldDefn GetFieldDefnRef(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public FieldDefn GetFieldDefnRef(String name)
name
- the name of the field to fetch.
public String GetFieldAsString(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public String GetFieldAsString(String name)
name
- the name of the field to fetch.
public int GetFieldAsInteger(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public int GetFieldAsInteger(String name)
name
- the name of the field to fetch.
public double GetFieldAsDouble(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public double GetFieldAsDouble(String name)
name
- the name of the field to fetch.
public void GetFieldAsDateTime(int ifield, int[] pnYear, int[] pnMonth, int[] pnDay, int[] pnHour, int[] pnMinute, int[] pnSecond, int[] pnTZFlag)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.pnYear
- an allocated array of 1 integer to put the year (including century)pnMonth
- an allocated array of 1 integer to put the month (1-12)pnDay
- an allocated array of 1 integer to put the day (1-31)pnHour
- an allocated array of 1 integer to put the hour (0-23)pnMinute
- an allocated array of 1 integer to put the minute (0-59)pnSecond
- an allocated array of 1 integer to put the second (0-59)pnTZFlag
- an allocated array of 1 integer to put the time zone flag (0=unknown, 1=localtime, 100=GMT, see data model for details)public int[] GetFieldAsIntegerList(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public double[] GetFieldAsDoubleList(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public String[] GetFieldAsStringList(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public boolean IsFieldSet(int ifield)
ifield
- the field to test.
public boolean IsFieldSet(String name)
name
- the name of the field to test.
public int GetFieldIndex(String name)
name
- the name of the field to search for.
public int GetFID()
public int SetFID(int fid)
fid
- the new feature identifier value to assign.
public void DumpReadable()
public void UnsetField(int ifield)
ifield
- the field to unset, from 0 to GetFieldCount()-1.public void UnsetField(String name)
name
- the name of the field to unset.public void SetField(int ifield, String val)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.val
- the value to assign.public void SetField(String name, String val)
name
- the name of the field to set.val
- the value to assign.public void SetField(int ifield, int val)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.val
- the value to assign.public void SetField(String name, int val)
name
- the name of the field to set.val
- the value to assign.public void SetField(int ifield, double val)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.val
- the value to assign.public void SetField(String name, double val)
name
- the name of the field to set.val
- the value to assign.public void SetField(int ifield, int year, int month, int day, int hour, int minute, int second, int tzflag)
ifield
- the field to set, from 0 to GetFieldCount()-1.year
- (including century)month
- (1-12)day
- (1-31)hour
- (0-23)minute
- (0-59)second
- (0-59)tzflag
- (0=unknown, 1=localtime, 100=GMT, see data model for details)public void SetField(String name, int year, int month, int day, int hour, int minute, int second, int tzflag)
name
- the name of the field to set.year
- (including century)month
- (1-12)day
- (1-31)hour
- (0-23)minute
- (0-59)second
- (0-59)tzflag
- (0=unknown, 1=localtime, 100=GMT, see data model for details)public void SetFieldIntegerList(int ifield, int[] values)
ifield
- the field to set, from 0 to GetFieldCount()-1.values
- the values to assign.public void SetFieldDoubleList(int ifield, double[] values)
ifield
- the field to set, from 0 to GetFieldCount()-1.values
- the values to assign.public void SetFieldStringList(int ifield, Vector values)
ifield
- the field to set, from 0 to GetFieldCount()-1.values
- the values to assign (vector of strings).public int SetFrom(Feature srcFeature, int forgiving)
srcFeature
- the feature from which geometry, and field values will
be copied.forgiving
- 1 if the operation should continue despite lacking
output fields matching some of the source fields.
public int SetFrom(Feature srcFeature)
SetFrom(Feature srcFeature, int forgiving)
public String GetStyleString()
public void SetStyleString(String style_string)
style_string
- the style string to apply to this feature, cannot be null.public int GetFieldType(int ifield)
ifield
- the field to fetch, from 0 to GetFieldCount()-1.
public int GetFieldType(String name)
name
- the name of the field to fetch.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |