deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.dataaccess.shape
Class SHPReader

java.lang.Object
  extended by org.deegree.commons.dataaccess.shape.SHPReader

public class SHPReader
extends Object

SHPReader

Version:
$Revision: 22498 $, $Date: 2010-02-10 17:41:39 +0100 (Mi, 10 Feb 2010) $
Author:
Andreas Schmitz, last edited by: $Author: mschneider $

Field Summary
static int FILETYPE
          The file type number.
static int FIRST_RING
          First ring of a polygon part type.
static int INNER_RING
          Inner polygon ring part type.
static int MULTIPATCH
          The multipatch shape.
static int MULTIPOINT
          The normal multipoint.
static int MULTIPOINTM
          The multipoint with measures.
static int MULTIPOINTZ
          The multipoint with z coordinates.
static int NULL
          The NULL shape.
static int OUTER_RING
          Outer polygon ring part type.
static int POINT
          The normal point.
static int POINTM
          The point with measure.
static int POINTZ
          The point with z coordinates.
static int POLYGON
          The normal polygon.
static int POLYGONM
          The polygon with measures.
static int POLYGONZ
          The polygon with z coordinates.
static int POLYLINE
          The normal polyline.
static int POLYLINEM
          The polyline with measures.
static int POLYLINEZ
          The polyline with z coordinates.
static int RING
          Polygon ring part type.
static int TRIANGLE_FAN
          Triangle fan part type.
static int TRIANGLE_STRIP
          Triangle strip part type.
static int VERSION
          The shape file version.
 
Constructor Summary
SHPReader(RandomAccessFile in, CRS crs, SpatialIndex<Long> rtree, boolean startsWithZero)
           
 
Method Summary
 void close()
          Closes the underlying input stream.
 Envelope getEnvelope()
           
 LinkedList<Pair<Integer,Geometry>> query(Envelope bbox, boolean withGeometry, boolean exact)
           
 Pair<ArrayList<Pair<Envelope,Long>>,Boolean> readEnvelopes()
          He Who Needs It As Double, is welcome to implement/copy it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILETYPE

public static final int FILETYPE
The file type number.

See Also:
Constant Field Values

VERSION

public static final int VERSION
The shape file version.

See Also:
Constant Field Values

NULL

public static final int NULL
The NULL shape.

See Also:
Constant Field Values

POINT

public static final int POINT
The normal point.

See Also:
Constant Field Values

POLYLINE

public static final int POLYLINE
The normal polyline.

See Also:
Constant Field Values

POLYGON

public static final int POLYGON
The normal polygon.

See Also:
Constant Field Values

MULTIPOINT

public static final int MULTIPOINT
The normal multipoint.

See Also:
Constant Field Values

POINTZ

public static final int POINTZ
The point with z coordinates.

See Also:
Constant Field Values

POLYLINEZ

public static final int POLYLINEZ
The polyline with z coordinates.

See Also:
Constant Field Values

POLYGONZ

public static final int POLYGONZ
The polygon with z coordinates.

See Also:
Constant Field Values

MULTIPOINTZ

public static final int MULTIPOINTZ
The multipoint with z coordinates.

See Also:
Constant Field Values

POINTM

public static final int POINTM
The point with measure.

See Also:
Constant Field Values

POLYLINEM

public static final int POLYLINEM
The polyline with measures.

See Also:
Constant Field Values

POLYGONM

public static final int POLYGONM
The polygon with measures.

See Also:
Constant Field Values

MULTIPOINTM

public static final int MULTIPOINTM
The multipoint with measures.

See Also:
Constant Field Values

MULTIPATCH

public static final int MULTIPATCH
The multipatch shape.

See Also:
Constant Field Values

TRIANGLE_STRIP

public static final int TRIANGLE_STRIP
Triangle strip part type.

See Also:
Constant Field Values

TRIANGLE_FAN

public static final int TRIANGLE_FAN
Triangle fan part type.

See Also:
Constant Field Values

OUTER_RING

public static final int OUTER_RING
Outer polygon ring part type.

See Also:
Constant Field Values

INNER_RING

public static final int INNER_RING
Inner polygon ring part type.

See Also:
Constant Field Values

FIRST_RING

public static final int FIRST_RING
First ring of a polygon part type.

See Also:
Constant Field Values

RING

public static final int RING
Polygon ring part type.

See Also:
Constant Field Values
Constructor Detail

SHPReader

public SHPReader(RandomAccessFile in,
                 CRS crs,
                 SpatialIndex<Long> rtree,
                 boolean startsWithZero)
          throws IOException
Parameters:
in -
crs -
rtree -
startsWithZero -
Throws:
IOException
Method Detail

query

public LinkedList<Pair<Integer,Geometry>> query(Envelope bbox,
                                                boolean withGeometry,
                                                boolean exact)
                                         throws IOException
Parameters:
bbox -
withGeometry -
exact -
Returns:
the list of contained geometries
Throws:
IOException

readEnvelopes

public Pair<ArrayList<Pair<Envelope,Long>>,Boolean> readEnvelopes()
                                                           throws IOException
He Who Needs It As Double, is welcome to implement/copy it.

Returns:
a list of all envelopes (minx, miny, maxx, maxy)
Throws:
IOException

getEnvelope

public Envelope getEnvelope()
Returns:
the overall bbox of the shape file

close

public void close()
           throws IOException
Closes the underlying input stream.

Throws:
IOException

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>