public class TLcdVPFFeatureClass extends Object
A VPF feature class is part of a coverage (TLcdVPFCoverage
) and contains a set of features of
the same type (for example, roads).
Each feature class has a feature type, defined by the geometry of its features; there are five different types of
features: points, lines, areas, texts and complex features.
Feature types cannot be mixed within one feature class.
Each feature has a number of attributes associated with it:
The attributes are ordered in a list, each having a index and name, unique within this feature class, and a textual description. Some of these attributes might be available in the VPF database as both a code and a human-readable text.
The following table gives an overview of the different ways to access the attribute data, which data are available in each of them, and in what form:
FACC feature class code | FACC attributes | custom attributes | internal VPF attributes | attribute value | |
---|---|---|---|---|---|
TLcdVPFFeatureClass.getFeatureX() | X | X | X | X | code |
TLcdVPFFeatureClass.getUserFeatureX() | X | X | X | textual description | |
ILdFeatured interface | X | X | X | textual description | |
ILcdVPFFACCFeature interface | separate method | X | X | code |
The table below shows how VPF attribute field types are mapped on Java classes:
VPF field type | Java class |
---|---|
All text field types (T,L,N,M) | java.lang.String |
Short floating point (F) | java.lang.Float |
Long floating point (R) | java.lang.Double |
Short integer (S) | java.lang.Short |
Long integer (L) | java.lang.Integer |
2-coordinate array/string, short floating point (C) | float[] |
2-coordinate array/string, long floating point (B) | double[] |
3-coordinate array/string, short floating point (Z) | float[] |
3-coordinate array/string, long floating point (Y) | double[] |
Date and time (D) | java.util.Date |
Triplet id (K) | int[3] |
Modifier and Type | Field and Description |
---|---|
static int |
AREA
Area feature class type.
|
static int |
COMPLEX
Complex feature class type.
|
static int |
LINE
Line feature class type.
|
static int |
POINT
Point feature class type.
|
static int |
TEXT
Text feature class type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Returns
true if this VPF feature class is equal to the given object. |
int |
getAttributeCount()
Deprecated.
Use
getFeatureAttributeCount() instead. |
TLcdVPFCoverage |
getCoverage()
Returns the coverage to which this feature class belongs.
|
String |
getDescription()
Returns a brief textual description for this entity.
|
Class |
getFeatureAttributeClass(int aAttributeIndex)
Returns the Java class used to represent the attribute at the given index.
|
Class[] |
getFeatureAttributeClasses()
Returns an array containing Java classes use to represent the attributes in this VPF feature
class.
|
int |
getFeatureAttributeCount()
Returns the number of feature attributes available in this feature class.
|
String |
getFeatureAttributeDescription(int aAttributeIndex)
Returns a textual description of the attribute at the given index.
|
String[] |
getFeatureAttributeDescriptions()
Returns an array containing textual descriptions of all attribute in this VPF feature class.
|
int |
getFeatureAttributeIndex(String aAttributeName)
Returns the index of the attribute with the given name, or
-1 if no such
attribute exists. |
String |
getFeatureAttributeName(int aAttributeIndex)
Returns the name of the attribute at the given index, used as identifier in this feature class.
|
String[] |
getFeatureAttributeNames()
Returns an array containing the names of all attributes in this
VPF feature class.
|
Object[] |
getFeatureAttributeValue(int aFeatureId)
Returns an array of objects representing the values of all attributes of the feature with id
aFeatureId . |
Object |
getFeatureAttributeValue(int aFeatureId,
int aAttributeIndex)
Returns an
Object representing the value of the attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId . |
int |
getFeatureClassType()
Returns the feature class type of this feature class, one of
POINT, LINE, AREA, TEXT or
COMPLEX . |
String |
getName()
Returns the short name of this entity, used as identifier in the VPF database.
|
String |
getPathName()
Returns the path to the location of this feature class, for example
/data/vmaplv0/eusproto/trans/roadl.lft for
the roads feature class in the transportation coverage in the eusproto library of the vmaplv0 database. |
int |
getUserAttributeCount()
Deprecated.
Use
getUserFeatureAttributeCount() instead. |
Class |
getUserFeatureAttributeClass(int aAttributeIndex)
Returns the Java class used to represent the user attribute at the given index.
|
Class[] |
getUserFeatureAttributeClasses()
Returns an array containing Java classes use to represent the user attributes in this VPF
feature class.
|
int |
getUserFeatureAttributeCount()
Returns the number of user feature attributes available in this feature class.
|
String |
getUserFeatureAttributeDescription(int aAttributeIndex)
Returns a textual description of the user attribute at the given index.
|
String[] |
getUserFeatureAttributeDescriptions()
Returns an array containing textual descriptions of all user attribute in this VPF feature
class.
|
int |
getUserFeatureAttributeIndex(String aAttributeName)
Returns the index of the user attribute with the given name, or
-1 if no such
attribute exists. |
String |
getUserFeatureAttributeName(int aAttributeIndex)
Returns the name of the user attribute at the given index, used as identifier in this feature
class.
|
String[] |
getUserFeatureAttributeNames()
Returns an array containing the names of all user attributes in this VPF feature class.
|
Object[] |
getUserFeatureAttributeValue(int aFeatureId)
Returns an array of objects representing the values of all user attributes of the feature with
id
aFeatureId . |
Object |
getUserFeatureAttributeValue(int aFeatureId,
int aAttributeIndex)
Returns an
Object representing the value of the user attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId . |
TLcdVPFCoverage |
getVPFCoverage()
Deprecated.
use
getCoverage() |
int |
getVPFFeatureCount()
Returns the number of VPF features contained in this feature class.
|
int |
hashCode() |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the standard Java logging
framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the standard Java logging
framework directly.
|
String |
toString()
Returns a brief textual description for this feature class.
|
public static final int POINT
public static final int LINE
public static final int AREA
public static final int TEXT
public static final int COMPLEX
public String getPathName()
/data/vmaplv0/eusproto/trans/roadl.lft
for
the roads feature class in the transportation coverage in the eusproto library of the vmaplv0 database.public TLcdVPFCoverage getCoverage()
public int getFeatureClassType()
POINT, LINE, AREA, TEXT
or
COMPLEX
.public int getVPFFeatureCount()
public int getFeatureAttributeCount()
public int getFeatureAttributeIndex(String aAttributeName)
-1
if no such
attribute exists.aAttributeName
- the name of the attribute whose index is to be returned.public String getFeatureAttributeName(int aAttributeIndex)
aAttributeIndex
- the index of the attribute whose name is to be returned.aAttributeIndex
)th attribute.IndexOutOfBoundsException
- if aAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
public String[] getFeatureAttributeNames()
String
containing the names of all the attributes.public String getFeatureAttributeDescription(int aAttributeIndex)
aAttributeIndex
- the index of the attribute for which to return a description.aAttributeIndex
)th attribute.IndexOutOfBoundsException
- if aAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
public String[] getFeatureAttributeDescriptions()
String
containing descriptions of all the attributes.public Class getFeatureAttributeClass(int aAttributeIndex)
aAttributeIndex
- the index of the attribute whose Java class representation to return.public Class[] getFeatureAttributeClasses()
Class
objects, containing Java classes use to represent the
attributes in this VPF feature class.public Object getFeatureAttributeValue(int aFeatureId, int aAttributeIndex)
Object
representing the value of the attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId
. The VPF feature ID
count starts at one, not zero. The attribute value will be represented using an object of the
class getFeatureAttributeClass(aAttributeIndex
.aFeatureId
- the ID of the feature for which to return an attribute value.aAttributeIndex
- the attribute index for which to return a value.Object
representing the value of the attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId
.IndexOutOfBoundsException
- if aFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getAttributeCount()
getFeatureAttributeClass(int)
public Object[] getFeatureAttributeValue(int aFeatureId)
aFeatureId
. The attribute values are ordered according to their attributes index.aFeatureId
- the ID of the feature for which to return its attribute values.aFeatureId
.IndexOutOfBoundsException
- aFeatureId < 1 || aFeatureId > getVPFFeatureCount()
.public int getUserFeatureAttributeCount()
public int getUserFeatureAttributeIndex(String aAttributeName)
-1
if no such
attribute exists.aAttributeName
- the name of the attribute whose index is to be returned.public String getUserFeatureAttributeName(int aAttributeIndex)
aAttributeIndex
- the index of the user attribute whose name is to be returned.aAttributeIndex
)th user attribute.IndexOutOfBoundsException
- if aAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
public String[] getUserFeatureAttributeNames()
String
containing the names of all the user attributes.public String getUserFeatureAttributeDescription(int aAttributeIndex)
aAttributeIndex
- the index of the user attribute for which to return a description.aAttributeIndex
)th user attribute.IndexOutOfBoundsException
- if aAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
public String[] getUserFeatureAttributeDescriptions()
String
containing the descriptions of the all the user
attributes.public Class getUserFeatureAttributeClass(int aAttributeIndex)
aAttributeIndex
- the index of the user attribute whose Java class representation to
return.public Class[] getUserFeatureAttributeClasses()
Class
objects, containing Java classes use to represent the
user attributes in this VPF feature class.public Object getUserFeatureAttributeValue(int aFeatureId, int aAttributeIndex)
Object
representing the value of the user attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId
. The VPF feature ID
count starts at one, not zero. The user attribute value will be represented using an object of
the class getUserFeatureAttributeClass(aAttributeIndex
.aFeatureId
- the ID of the feature for which to return a user attribute value.aAttributeIndex
- the user attribute index for which to return a value.Object
representing the value of the user attribute with index
aAttributeIndex</code> of the feature with id <code>aFeatureId
.IndexOutOfBoundsException
- if aFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getUserAttributeCount()
getFeatureAttributeClass(int)
public Object[] getUserFeatureAttributeValue(int aFeatureId)
aFeatureId
. The user attribute values are ordered according to their attributes
index.aFeatureId
- the ID of the feature for which to return its user attribute values.aFeatureId
.IndexOutOfBoundsException
- aFeatureId < 1 || aFeatureId > getVPFFeatureCount()
.public String toString()
getName()</code> or <code>getDescription()
might be used as a good source of a
textual description for this feature class.public boolean equals(Object o)
true
if this VPF feature class is equal to the given object. Two VPF
feature classes are considered equal if the coverages to which they belong are equal, and their
names are equal.public int getAttributeCount()
getFeatureAttributeCount()
instead.public int getUserAttributeCount()
getUserFeatureAttributeCount()
instead.public TLcdVPFCoverage getVPFCoverage()
getCoverage()
getCoverage()
public void setTraceOn(boolean aTraceOn)
true
or
false
as argument automatically turns off tracing for all other class instances
for which setTraceOn</code> has not been called. If the argument is <code>false
then only the informative, warning and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this instance. If false, then
only the informative, warning and error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public String getName()
public String getDescription()