org.deegree_impl.io.bnaapi
Class BNAFeature

java.lang.Object
  extended byorg.deegree_impl.io.bnaapi.BNAFeature

public class BNAFeature
extends java.lang.Object

A feature read from a BNA File. It may hold more than one Geometry.

Version:
2003.08.04
Author:
Emanuele Tajariol

Field Summary
private  GM_Envelope _envelope
          The bounding box for all the geometries of this feature
private  java.util.Vector _geometries
          The BNAGeometry'es of this feature
private  java.lang.String[] _headers
          The headers' names
 
Constructor Summary
BNAFeature(java.lang.String[] headers)
          Creates a new BNAFeature object.
 
Method Summary
 void addGeometry(BNAGeometry geom)
          Adds a geometry to this BNAFeature
 GM_Envelope getEnvelope()
          Returns the bounding box containing all the geometris of this feature.
 BNAGeometry getGeometry(int i)
          Method getGeometry
 java.lang.String getHeader(int i)
           
 int getHeaderSize()
           
 java.lang.String getHeads()
           
private static GM_Envelope merge(GM_Envelope a, GM_Envelope b)
          Merges two envelopes, computing the Envelope that contains both.
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_envelope

private GM_Envelope _envelope
The bounding box for all the geometries of this feature


_geometries

private java.util.Vector _geometries
The BNAGeometry'es of this feature


_headers

private java.lang.String[] _headers
The headers' names

Constructor Detail

BNAFeature

public BNAFeature(java.lang.String[] headers)
Creates a new BNAFeature object.

Parameters:
headers -
Method Detail

getHeader

public java.lang.String getHeader(int i)
Returns:
the i-th header as a String

getHeaderSize

public int getHeaderSize()
Returns:
the number of headers

size

public int size()
Returns:
the number of geometries of this Feature.

getEnvelope

public GM_Envelope getEnvelope()
Returns the bounding box containing all the geometris of this feature.

Returns:
a GM_Envelope that holds all the geometries of this feature.

getGeometry

public BNAGeometry getGeometry(int i)
Method getGeometry

Returns:
the i-th geometry

addGeometry

public void addGeometry(BNAGeometry geom)
Adds a geometry to this BNAFeature

Parameters:
geom - The BNAGeometry to be added

merge

private static GM_Envelope merge(GM_Envelope a,
                                 GM_Envelope b)
Merges two envelopes, computing the Envelope that contains both.

Returns:
the smallest GM_Envelope that contains both input envelopes.

toString

public java.lang.String toString()
Returns:

getHeads

public java.lang.String getHeads()
Returns:
a short identifier for this feature