twaver.gis
Interface GeographyFeature


public interface GeographyFeature

This interface is used to manage feature attributes.

Each feature should have default geometry and zero or more non-geometry attributes. The geometry attribute not only describes how to draw the feature, but also can be used in spatial calculation. Non-geometry attribute describes some accessional attribute, such as name,area,length,width, and so on. At present, all attributes stored in a feature are read-only .


Method Summary
 java.lang.Object getAttribute(int attributeIndex)
          Gets the value of the attribute specified by the index
 java.lang.Object getAttribute(java.lang.String attributeName)
          Gets the specified attribute value
 java.lang.Object[] getAttributes()
          Gets all the values of the feature's attributes include geometry and non-geometry ones.
 java.awt.geom.Rectangle2D getBounds()
          Gets the bounds of the feature's default geometry.
 java.lang.String getID()
          Gets feature id.
 

Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
Gets the specified attribute value

Parameters:
attributeName - the specified attribute name
Returns:
the value of the attribute.

getAttribute

public java.lang.Object getAttribute(int attributeIndex)
Gets the value of the attribute specified by the index

Parameters:
attributeIndex - the index of the attribute in the attribute list of the feature.
Returns:
the value of the attribute.

getAttributes

public java.lang.Object[] getAttributes()
Gets all the values of the feature's attributes include geometry and non-geometry ones.

Returns:
the values in the sequence of the attribute list.

getID

public java.lang.String getID()
Gets feature id.

Returns:
the feature id.

getBounds

public java.awt.geom.Rectangle2D getBounds()
Gets the bounds of the feature's default geometry.

Returns:
the bounds of the feature's default geometry