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.dataAccess.shape.input
Class ShpInputStream

    java.lang.Object
      com.bbn.openmap.dataAccess.shape.input.ShpInputStream

All Implemented Interfaces:
  ShapeConstants

public class ShpInputStream
extends java.lang.Object
implements ShapeConstants

Reads geometry data from a .shp file.

Author:
  Doug Van Auken

Field Summary
`protected DrawingAttributes` | `drawingAttributes`

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
`ShpInputStream(java.io.InputStream is)` Constructor

Method Summary
`DrawingAttributes` | `getDrawingAttributes()` Get the DrawingAttributes used for drawing the graphics.
`EsriGraphicList` | `getGeometry()` Reads geometry from a .shp file.
`EsriGraphicList` | `getGeometry(EsriGraphicFactory factory)` Reads geometry from a .shp file.
`EsriGraphicList` | `getGeometry(int[][] indexData)` Deprecated. use getGeometry() instead, indexData isn't used.
`protected int[]` | `getPartOffsets(OMGraphicList sublist)` Deprecated. not used.
`EsriGraphicList` | `getPointGeometry(int[][] indexData)` Deprecated. not used.
`protected int` | `getPointsPerShape(OMGraphicList sublist)` Deprecated. not used.
`EsriGraphicList` | `getPolyGeometry(int[][] indexData, int shapeType)` Deprecated. not used.
`int` | `readHeader()` Deprecated. not used.
`void` | `setDrawingAttributes(DrawingAttributes da)` Set the DrawingAttributes to use for drawing the graphics.

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

Field Detail

### drawingAttributes

    protected DrawingAttributes drawingAttributes

Constructor Detail

### ShpInputStream

    public ShpInputStream(java.io.InputStream is)

  Constructor

Parameters:
  `is` - An inputstream to chain with LittleEndianInputStream

Method Detail

### setDrawingAttributes

    public void setDrawingAttributes(DrawingAttributes da)

  Set the DrawingAttributes to use for drawing the graphics.

### getDrawingAttributes

    public DrawingAttributes getDrawingAttributes()

  Get the DrawingAttributes used for drawing the graphics.

### getGeometry

    public EsriGraphicList getGeometry(int[][] indexData)
                                throws java.lang.Exception

  Deprecated. use getGeometry() instead, indexData isn't used.

  Reads geometry from a .shp file

  Parameters:
    `indexData` - The index data retreived from the .shx file
  Returns:
    EsriGraphicList A list of geometry
  Throws:
    `java.lang.Exception`

### getGeometry

    public EsriGraphicList getGeometry()
                                throws java.lang.Exception

  Reads geometry from a .shp file. This method will create an EsriGraphicFactory with the default settings (LINETYPE_STRAIGHT and no data projection available).

  Returns:
    EsriGraphicList A list of geometry
  Throws:
    `java.lang.Exception`

### getGeometry

    public EsriGraphicList getGeometry(EsriGraphicFactory factory)
                                throws java.lang.Exception

  Reads geometry from a .shp file. This method will use the provided EsriGraphicFactory.

  Parameters:
    `factory` - an EsriGraphicFactory to be used to read from the internal stream.
  Returns:
    EsriGraphicList A list of geometry
  Throws:
    `java.lang.Exception`

### getPartOffsets

    protected int[] getPartOffsets(OMGraphicList sublist)

  Deprecated. not used.

  Creates an array that specifies at what index a parts geometry begins with

  Returns:
    An array whose elements denote the position where a part begins witin an array of point data for a given shape

### getPointGeometry

    public EsriGraphicList getPointGeometry(int[][] indexData)
                                     throws java.lang.Exception

  Deprecated. not used.

  Iterates through the given input stream to contruct geometry objects

  Parameters:
    `indexData` - A list of offsets obtained by iterating through the associated SHX file
  Returns:
    list An OMGraphicList that contains the collection of objects created by iterating through this input stream *
  Throws:
    `java.lang.Exception`

### getPointsPerShape

    protected int getPointsPerShape(OMGraphicList sublist)

  Deprecated. not used.

  Iterates through each part of shape to obtain the total number of points

  Parameters:
    `sublist` - A list that contains multiple parts
  Returns:
    The total number of points for a given shape

### getPolyGeometry

    public EsriGraphicList getPolyGeometry(int[][] indexData,
                                           int shapeType)
                                    throws java.lang.Exception

  Deprecated. not used.

  Iterates through the given input stream to contruct geometry objects

  Parameters:
    `shapeType` - the type of shape to read
    `indexData` - A list of offsets obtained by iterating through the associated SHX file
  Returns:
    list An OMGraphicList that contains the collection of objects created by iterating through this input stream *
  Throws:
    `java.lang.Exception`

### readHeader

    public int readHeader()
                   throws java.io.IOException

  Deprecated. not used.

  Reads the header section of a .shp file

  Returns:
    the shape type
  Throws:
    `java.io.IOException`

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