Class TLcdVPFFeatureClass
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:
- FACC feature class code
- FACC attributes
- custom attributes
- internal VPF attributes (tile_id, edg_id, ...)
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] |
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this VPF feature class is equal to the given object.int
Deprecated.Returns the coverage to which this feature class belongs.Returns a brief textual description for this entity.getFeatureAttributeClass
(int aAttributeIndex) Returns the Java class used to represent the attribute at the given index.Class[]
Returns an array containing Java classes use to represent the attributes in this VPF feature class.int
Returns the number of feature attributes available in this feature class.getFeatureAttributeDescription
(int aAttributeIndex) Returns a textual description of the attribute at the given index.String[]
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.getFeatureAttributeName
(int aAttributeIndex) Returns the name of the attribute at the given index, used as identifier in this feature class.String[]
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 idaFeatureId
.getFeatureAttributeValue
(int aFeatureId, int aAttributeIndex) Returns anObject
representing the value of the attribute with indexaAttributeIndex</code> of the feature with id <code>aFeatureId
.int
Returns the feature class type of this feature class, one ofPOINT, LINE, AREA, TEXT
orCOMPLEX
.getName()
Returns the short name of this entity, used as identifier in the VPF database.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
Deprecated.UsegetUserFeatureAttributeCount()
instead.getUserFeatureAttributeClass
(int aAttributeIndex) Returns the Java class used to represent the user attribute at the given index.Class[]
Returns an array containing Java classes use to represent the user attributes in this VPF feature class.int
Returns the number of user feature attributes available in this feature class.getUserFeatureAttributeDescription
(int aAttributeIndex) Returns a textual description of the user attribute at the given index.String[]
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.getUserFeatureAttributeName
(int aAttributeIndex) Returns the name of the user attribute at the given index, used as identifier in this feature class.String[]
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 idaFeatureId
.getUserFeatureAttributeValue
(int aFeatureId, int aAttributeIndex) Returns anObject
representing the value of the user attribute with indexaAttributeIndex</code> of the feature with id <code>aFeatureId
.Deprecated.usegetCoverage()
int
Returns the number of VPF features contained in this feature class.int
hashCode()
boolean
Deprecated.This method has been deprecated.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.toString()
Returns a brief textual description for this feature class.
-
Field Details
-
POINT
public static final int POINTPoint feature class type.- See Also:
-
LINE
public static final int LINELine feature class type.- See Also:
-
AREA
public static final int AREAArea feature class type.- See Also:
-
TEXT
public static final int TEXTText feature class type.- See Also:
-
COMPLEX
public static final int COMPLEXComplex feature class type.- See Also:
-
-
Method Details
-
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.- Returns:
- the path to the location of this feature class.
-
getCoverage
Returns the coverage to which this feature class belongs.- Returns:
- the coverage to which this feature class belongs.
-
getFeatureClassType
public int getFeatureClassType()Returns the feature class type of this feature class, one ofPOINT, LINE, AREA, TEXT
orCOMPLEX
.- Returns:
- the feature class type of this feature class.
-
getVPFFeatureCount
public int getVPFFeatureCount()Returns the number of VPF features contained in this feature class.- Returns:
- the number of VPF features contained in this feature class.
-
getFeatureAttributeCount
public int getFeatureAttributeCount()Returns the number of feature attributes available in this feature class.- Returns:
- the number of feature attributes available in this feature class.
-
getFeatureAttributeIndex
Returns the index of the attribute with the given name, or-1
if no such attribute exists.- Parameters:
aAttributeName
- the name of the attribute whose index is to be returned.- Returns:
- the index of the attribute with the given name.
-
getFeatureAttributeName
Returns the name of the attribute at the given index, used as identifier in this feature class.- Parameters:
aAttributeIndex
- the index of the attribute whose name is to be returned.- Returns:
- the name of the (
aAttributeIndex
)th attribute. - Throws:
IndexOutOfBoundsException
- ifaAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
-
getFeatureAttributeNames
Returns an array containing the names of all attributes in this VPF feature class. The order of the attributes in the feature class table is preserved.- Returns:
- a array of
String
containing the names of all the attributes.
-
getFeatureAttributeDescription
Returns a textual description of the attribute at the given index.- Parameters:
aAttributeIndex
- the index of the attribute for which to return a description.- Returns:
- a textual description of the (
aAttributeIndex
)th attribute. - Throws:
IndexOutOfBoundsException
- ifaAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
-
getFeatureAttributeDescriptions
Returns an array containing textual descriptions of all attribute in this VPF feature class. If no attributes are present, an array of length zero is returned. The order of the attributes in the feature class table is preserved.- Returns:
- a array of
String
containing descriptions of all the attributes.
-
getFeatureAttributeClass
Returns the Java class used to represent the attribute at the given index. See the class documentation of this class for an overview of how VPF field types are mapped on Java classes.- Parameters:
aAttributeIndex
- the index of the attribute whose Java class representation to return.- Returns:
- the Java class used to represent the attribute at the given index.
-
getFeatureAttributeClasses
Returns an array containing Java classes use to represent the attributes in this VPF feature class. If no attributes are present, an array of length zero is returned. The order of the attributes in the feature class table is preserved. See the class documentation of this class for an overview of how VPF field types are mapped on Java classes.- Returns:
- an array of
Class
objects, containing Java classes use to represent the attributes in this VPF feature class.
-
getFeatureAttributeValue
Returns anObject
representing the value of the attribute with indexaAttributeIndex</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 classgetFeatureAttributeClass(aAttributeIndex
.- Parameters:
aFeatureId
- the ID of the feature for which to return an attribute value.aAttributeIndex
- the attribute index for which to return a value.- Returns:
- an
Object
representing the value of the attribute with indexaAttributeIndex</code> of the feature with id <code>aFeatureId
. - Throws:
IndexOutOfBoundsException
- ifaFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getAttributeCount()
- See Also:
-
getFeatureAttributeValue
Returns an array of objects representing the values of all attributes of the feature with idaFeatureId
. The attribute values are ordered according to their attributes index.- Parameters:
aFeatureId
- the ID of the feature for which to return its attribute values.- Returns:
- an array of objects representing the values of all attributes of the feature with id
aFeatureId
. - Throws:
IndexOutOfBoundsException
-aFeatureId < 1 || aFeatureId > getVPFFeatureCount()
.
-
getUserFeatureAttributeCount
public int getUserFeatureAttributeCount()Returns the number of user feature attributes available in this feature class.- Returns:
- the number of user feature attributes available in this feature class.
-
getUserFeatureAttributeIndex
Returns the index of the user attribute with the given name, or-1
if no such attribute exists.- Parameters:
aAttributeName
- the name of the attribute whose index is to be returned.- Returns:
- the index of the attribute with the given name.
-
getUserFeatureAttributeName
Returns the name of the user attribute at the given index, used as identifier in this feature class.- Parameters:
aAttributeIndex
- the index of the user attribute whose name is to be returned.- Returns:
- the name of the (
aAttributeIndex
)th user attribute. - Throws:
IndexOutOfBoundsException
- ifaAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
-
getUserFeatureAttributeNames
Returns an array containing the names of all user attributes in this VPF feature class. The order of the attributes in the feature class table is preserved.- Returns:
- a array of
String
containing the names of all the user attributes.
-
getUserFeatureAttributeDescription
Returns a textual description of the user attribute at the given index.- Parameters:
aAttributeIndex
- the index of the user attribute for which to return a description.- Returns:
- a textual description of the (
aAttributeIndex
)th user attribute. - Throws:
IndexOutOfBoundsException
- ifaAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
-
getUserFeatureAttributeDescriptions
Returns an array containing textual descriptions of all user attribute in this VPF feature class. If no user attributes are present, an array of length zero is returned. The order of the attributes in the feature class table is preserved.- Returns:
- an array of
String
containing the descriptions of the all the user attributes.
-
getUserFeatureAttributeClass
Returns the Java class used to represent the user attribute at the given index. See the class documentation of this class for an overview of how VPF field types are mapped on Java classes.- Parameters:
aAttributeIndex
- the index of the user attribute whose Java class representation to return.- Returns:
- the Java class used to represent the user attribute at the given index.
-
getUserFeatureAttributeClasses
Returns an array containing Java classes use to represent the user attributes in this VPF feature class. If no user attributes are present, an array of length zero is returned. The order of the attributes in the feature class table is preserved. See the class documentation of this class for an overview of how VPF field types are mapped on Java classes.- Returns:
- an array of
Class
objects, containing Java classes use to represent the user attributes in this VPF feature class.
-
getUserFeatureAttributeValue
Returns anObject
representing the value of the user attribute with indexaAttributeIndex</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 classgetUserFeatureAttributeClass(aAttributeIndex
.- Parameters:
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.- Returns:
- an
Object
representing the value of the user attribute with indexaAttributeIndex</code> of the feature with id <code>aFeatureId
. - Throws:
IndexOutOfBoundsException
- ifaFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getUserAttributeCount()
- See Also:
-
getUserFeatureAttributeValue
Returns an array of objects representing the values of all user attributes of the feature with idaFeatureId
. The user attribute values are ordered according to their attributes index.- Parameters:
aFeatureId
- the ID of the feature for which to return its user attribute values.- Returns:
- an array of objects representing the values of all user attributes of the feature with
id
aFeatureId
. - Throws:
IndexOutOfBoundsException
-aFeatureId < 1 || aFeatureId > getVPFFeatureCount()
.
-
toString
Returns a brief textual description for this feature class. The exact details of the representation are unspecified and subject to change. Depending on the application, thegetName()</code> or <code>getDescription()
might be used as a good source of a textual description for this feature class. -
equals
Returnstrue
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. -
hashCode
public int hashCode() -
getAttributeCount
public int getAttributeCount()Deprecated.UsegetFeatureAttributeCount()
instead.Returns the number of feature attributes available in this feature class.- Returns:
- the number of feature attributes available in this feature class.
-
getUserAttributeCount
public int getUserAttributeCount()Deprecated.UsegetUserFeatureAttributeCount()
instead.Returns the number of user feature attributes available in this feature class.- Returns:
- the number of user feature attributes available in this feature class.
-
getVPFCoverage
Deprecated.usegetCoverage()
Returns the coverage to which this feature class belongs.- Returns:
- the coverage to which this feature class belongs.
- See Also:
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn</code> has not been called. If the argument is <code>false
then only the informative, warning and error log messages are recorded.- Parameters:
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.
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
getName
Returns the short name of this entity, used as identifier in the VPF database. For example:- vmaplv0 for a database
- eusproto for a library
- trans for a coverage
- roadl for a feature class
- Returns:
- the short name of this entity.
-
getDescription
Returns a brief textual description for this entity.- Returns:
- a brief textual description for this entity.
-
getFeatureAttributeCount()
instead.