Class TLcdVPFFeatureClass

java.lang.Object
com.luciad.format.vpf.TLcdVPFFeatureClass

public class TLcdVPFFeatureClass extends Object
Models the VPF feature class level.

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 Details

  • Method Details

    • getPathName

      public 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.
      Returns:
      the path to the location of this feature class.
    • getCoverage

      public TLcdVPFCoverage 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 of POINT, LINE, AREA, TEXT or COMPLEX.
      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

      public int getFeatureAttributeIndex(String aAttributeName)
      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

      public String getFeatureAttributeName(int aAttributeIndex)
      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 - if aAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
    • getFeatureAttributeNames

      public String[] 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

      public String getFeatureAttributeDescription(int aAttributeIndex)
      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 - if aAttributeIndex < 0 || aAttributeIndex >= getAttributeCount()
    • getFeatureAttributeDescriptions

      public String[] 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

      public Class getFeatureAttributeClass(int aAttributeIndex)
      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

      public Class[] 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

      public 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. The VPF feature ID count starts at one, not zero. The attribute value will be represented using an object of the class getFeatureAttributeClass(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 index aAttributeIndex</code> of the feature with id <code>aFeatureId.
      Throws:
      IndexOutOfBoundsException - if aFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getAttributeCount()
      See Also:
    • getFeatureAttributeValue

      public Object[] getFeatureAttributeValue(int aFeatureId)
      Returns an array of objects representing the values of all attributes of the feature with id aFeatureId. 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

      public int getUserFeatureAttributeIndex(String aAttributeName)
      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

      public String getUserFeatureAttributeName(int aAttributeIndex)
      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 - if aAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
    • getUserFeatureAttributeNames

      public String[] 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

      public String getUserFeatureAttributeDescription(int aAttributeIndex)
      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 - if aAttributeIndex < 0 || aAttributeIndex >= getUserAttributeCount()
    • getUserFeatureAttributeDescriptions

      public String[] 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

      public Class getUserFeatureAttributeClass(int aAttributeIndex)
      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

      public Class[] 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

      public 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. 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.
      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 index aAttributeIndex</code> of the feature with id <code>aFeatureId.
      Throws:
      IndexOutOfBoundsException - if aFeatureId < 1 || aFeatureId > getVPFFeatureCount() || aAttributeIndex < 0 || aAttributeIndex > getUserAttributeCount()
      See Also:
    • getUserFeatureAttributeValue

      public Object[] getUserFeatureAttributeValue(int aFeatureId)
      Returns an array of objects representing the values of all user attributes of the feature with id aFeatureId. 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

      public String 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, the getName()</code> or <code>getDescription() might be used as a good source of a textual description for this feature class.
      Overrides:
      toString in class Object
      Returns:
      a brief textual description for this feature class.
    • equals

      public boolean equals(Object o)
      Returns 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.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare this feature class with.
      Returns:
      true</code> if this object and {@code o} are equal, <code>false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getAttributeCount

      public int getAttributeCount()
      Deprecated.
      Use getFeatureAttributeCount() 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.
      Use getUserFeatureAttributeCount() 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

      public TLcdVPFCoverage getVPFCoverage()
      Deprecated.
      use getCoverage()
      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 either 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.
      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.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • getName

      public String 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

      public String getDescription()
      Returns a brief textual description for this entity.
      Returns:
      a brief textual description for this entity.