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.shape
Class ESRIPoly.ESRIFloatPoly

    java.lang.Object
      com.bbn.openmap.layer.shape.ShapeUtils
          com.bbn.openmap.layer.shape.ESRIPoly
              com.bbn.openmap.layer.shape.ESRIPoly.ESRIFloatPoly

All Implemented Interfaces:
  ShapeConstants

Enclosing class:
  ESRIPoly

public static class ESRIPoly.ESRIFloatPoly
extends ESRIPoly

Poly with data stored in floating point format. This ESRIPoly has been optimized for reading data in the OpenMap environment. By default, The internal points are stored in y,x,y,x (lat,lon,...) order as radian values. There have been allowances made to allow internal coordinates to be stored as decimal degree values, but this is not the best way to do things. The projection libraries are tuned for polygons holding radian point coordinates.

Nested Class Summary

Nested classes inherited from class com.bbn.openmap.layer.shape.ESRIPoly
`ESRIPoly.ESRIFloatPoly`

Field Summary
`protected boolean` | `isRadians` Flag noting if the internal representation of coordinates is in RADIANS, or DECIMAL_DEGREES.
`protected float[]` | `radians` A vector of vertices, stored as RADIAN y,x,y,x, (lat,lon,...).

Fields inherited from class com.bbn.openmap.layer.shape.ESRIPoly
`nPoints`

Fields inherited from interface com.bbn.openmap.dataAccess.shape.ShapeConstants
`DBF_ATTRIBUTE, DBF_CHARACTER, DBF_DATE, DBF_LOGICAL, DBF_MEMO, DBF_NUMERIC, DBF_TYPE_CHARACTER, DBF_TYPE_DATE, DBF_TYPE_LOGICAL, DBF_TYPE_MEMO, DBF_TYPE_NUMERIC, PARAM_DBF, PARAM_SHP, PARAM_SHX, SHAPE_BOUNDS_ATTRIBUTE, SHAPE_DBF_DASHPATTERN, SHAPE_DBF_DASHPHASE, SHAPE_DBF_DESCRIPTION, SHAPE_DBF_FILLCOLOR, SHAPE_DBF_INFO_ATTRIBUTE, SHAPE_DBF_LINECOLOR, SHAPE_DBF_LINEWIDTH, SHAPE_DBF_SELECTCOLOR, SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_INDEX_ATTRIBUTE, SHAPE_MAX_MEASURE_ATTRIBUTE, SHAPE_MAX_Z_ATTRIBUTE, SHAPE_MEASURE_ATTRIBUTE, SHAPE_MIN_MEASURE_ATTRIBUTE, SHAPE_MIN_Z_ATTRIBUTE, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPATCH, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_MULTIPOINTM, SHAPE_TYPE_MULTIPOINTZ, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINTM, SHAPE_TYPE_POINTZ, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGONM, SHAPE_TYPE_POLYGONZ, SHAPE_TYPE_POLYLINE, SHAPE_TYPE_POLYLINEM, SHAPE_TYPE_POLYLINEZ, SHAPE_Z_ATTRIBUTE`

Constructor Summary
`ESRIPoly.ESRIFloatPoly(float[] radians)` Construct an ESRIFloatPoly.
`ESRIPoly.ESRIFloatPoly(float[] radians, boolean isRadians)` Construct an ESRIFloatPoly.
`ESRIPoly.ESRIFloatPoly(int nPts)` Construct a poly with the given number of points.

Method Summary
`float[]` | `getDecimalDegrees()` Get the internal points array.
`float[]` | `getRadians()` Get the internal points array.
`float` | `getX(int index)` Returns the x coordinate of the indicated vertex.
`float` | `getY(int index)` Returns the y coordinate of the indicated vertex.
`int` | `read(byte[] b, int off, boolean connect)` Reads a polygon from the given buffer starting at the given offset.

Methods inherited from class com.bbn.openmap.layer.shape.ShapeUtils
`readBEInt, readBox, readLEDouble, readLEInt, readLEInt, readLELong, readPoint, writeBEInt, writeBox, writeLEDouble, writeLEInt, writeLELong, writePoint`

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

Field Detail

### radians

    protected float[] radians

  A vector of vertices, stored as RADIAN y,x,y,x, (lat,lon,...). This is to allow for optimized processing by OpenMap.

### isRadians

    protected boolean isRadians

  Flag noting if the internal representation of coordinates is in RADIANS, or DECIMAL_DEGREES. By default, the coordinates are in radians. But, a constructor is available to let them be noted as DECIMAL_DEGREES. Also, if you ask for the coordinates as radians, they get converted to radians internally, and this flag gets set accordingly. Likewise, if you as for recimal degrees coordinates, the coordinates internally will be changed to reflect that.

Constructor Detail

### ESRIPoly.ESRIFloatPoly

    public ESRIPoly.ESRIFloatPoly(int nPts)

  Construct a poly with the given number of points. Remember to `+2' if you want all vertices for a polygon.

Parameters:
  `nPts` - the number of (y,x) pairs

### ESRIPoly.ESRIFloatPoly

    public ESRIPoly.ESRIFloatPoly(float[] radians)

  Construct an ESRIFloatPoly. Remember to `+2' if you want all vertices for a polygon.

Parameters:
  `radians` - float[] coordinates: y,x,y,x,... (lat,lon) order in RADIANS!

### ESRIPoly.ESRIFloatPoly

    public ESRIPoly.ESRIFloatPoly(float[] radians,
                                  boolean isRadians)

  Construct an ESRIFloatPoly. Remember to `+2' if you want all vertices for a polygon.

Parameters:
  `radians` - float[] coordinates: y,x,y,x,... (lat,lon) order in RADIANS!

Method Detail

### getRadians

    public float[] getRadians()

  Get the internal points array. If the internal points are not presently stored as radians, they will be permanently converted.

  Returns:
    float[] RADIAN y,x,y,x,... (lat,lon)

### getDecimalDegrees

    public float[] getDecimalDegrees()

  Get the internal points array. If the internal points are not presently stored as decimal degree values, the will be permanently.

  Returns:
    float[] DECIMAL_DEGREES y,x,y,x,... (lat,lon)

### read

    public int read(byte[] b,
                    int off,
                    boolean connect)

  Reads a polygon from the given buffer starting at the given offset.

  Specified by:
    `read` in class `ESRIPoly`
  Parameters:
    `b` - the buffer
    `off` - the offset
    `connect` - connect the points (polygon)
  Returns:
    the number of bytes read

### getX

    public float getX(int index)

  Returns the x coordinate of the indicated vertex.

  Parameters:
    `index` - the ordinal of the vertex of interest
  Returns:
    the x (longitude) coordinate in decimal degrees

### getY

    public float getY(int index)

  Returns the y coordinate of the indicated vertex.

  Parameters:
    `index` - the ordinal of the vertex of interest
  Returns:
    the y (latitude) coordinate in decimal degrees

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