Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.layer.link
Class LinkBoundingPoly

    java.lang.Object
      com.bbn.openmap.layer.link.LinkBoundingPoly

public class LinkBoundingPoly
extends java.lang.Object

LinkBoundingPoly objects are used to describe simple polygons that cover a certain area. If the area described is in coordinates, the polygon should not be sued for areas covering a pole or straddling the dateline. More than one LinkBoundingPolys should be used for areas like that.

Field Summary
`float` | `maxX`
`float` | `maxY`
`float` | `minX`
`float` | `minY`
`protected float[]` | `points`

Constructor Summary
`LinkBoundingPoly(java.io.DataInput dis)` The constructor to use when reading the bounding polygon off an input stream.
`LinkBoundingPoly(float[] poly)` The constructor to use to create a LinkBoundingPoly to write to an output stream.
`LinkBoundingPoly(float minX, float minY, float maxX, float maxY)` Create a LinkBoundingPoly out of minimum and max x, y, values.

Method Summary
`LatLonPoint[]` | `getLatLonPoints()` Convert the points to Lat/Lon points.
`float[]` | `getPoints()` Return the polygon points, as a series of alternating x and y values.
`void` | `read(java.io.DataInput dis)` Read the bounding polygon off the input stream.
`java.lang.String` | `toString()`
`void` | `write(java.io.DataOutput dos)` Write the polygon on the output stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### maxX

    public float maxX

### maxY

    public float maxY

### minX

    public float minX

### minY

    public float minY

### points

    protected float[] points

Constructor Detail

### LinkBoundingPoly

    public LinkBoundingPoly(java.io.DataInput dis)
                     throws java.io.IOException

  The constructor to use when reading the bounding polygon off an input stream.

Parameters:
  `dis` - DataInputStream to read from.

### LinkBoundingPoly

    public LinkBoundingPoly(float[] poly)

  The constructor to use to create a LinkBoundingPoly to write to an output stream.

Parameters:
  `poly` - a series of alternating x, y points describing a polygon.

### LinkBoundingPoly

    public LinkBoundingPoly(float minX,
                            float minY,
                            float maxX,
                            float maxY)

  Create a LinkBoundingPoly out of minimum and max x, y, values.

Parameters:
  `minX` - minimum X value.
  `minY` - minimum Y value.
  `maxX` - maximum X value.
  `maxY` - maximum Y value.

Method Detail

### write

    public void write(java.io.DataOutput dos)
               throws java.io.IOException

  Write the polygon on the output stream. If the number of points is an odd number, the last number will be left off.

  Parameters:
    `dos` - the DataOutput to write to.
  Throws:
    `java.io.IOException`

### read

    public void read(java.io.DataInput dis)
              throws java.io.IOException

  Read the bounding polygon off the input stream.

  Parameters:
    `dis` - DataInputStream to read from.
  Throws:
    `java.io.IOException`

### getPoints

    public float[] getPoints()

  Return the polygon points, as a series of alternating x and y values.

  Returns:
    float[] of alternating x, y, points.

### getLatLonPoints

    public LatLonPoint[] getLatLonPoints()

  Convert the points to Lat/Lon points. There is no guarantee that the points really translate into latitude and longitude points.

  Returns:
    LatLonPoints

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details