Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.shpapi
Class ShapeUtils

    java.lang.Object
      org.deegree.io.shpapi.ShapeUtils

    public class ShapeUtils

extends Object

Utilities for reading and writing the components of shape files. Last changes:
25.11.1999 ap: memory allocation dynaminized
17.1.2000 ap: method SHPPoint readPoint(byte[] b, int off) modified
17.1.2000 ap: method SHPEnvelope readBox(byte[] b, int off) modified
17.1.2000 ap: method writePoint(..) modified

Version:
  25.1.2000
Author:
  Andreas Poth

Constructor Summary
`ShapeUtils()`

Method Summary
`static SHPEnvelope` | `readBox(byte[] b, int off)` method: readBox(byte[] b, int off) Reads a bounding box record.
`static SHPPoint` | `readPoint(byte[] b, int off)` readPoint(byte[] b, int off) Reads a point record.
`static int` | `writeBox(byte[] b, int off, SHPEnvelope box)` method: writeBox(byte[] b, int off, ESRIBoundingBox box) Writes the given bounding box to the given buffer at the given location.
`static int` | `writePoint(byte[] b, int off, SHPPoint point)` method: writePoint(byte[] b, int off, ESRIPoint point) Writes the given point to the given buffer at the given location.

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

Constructor Detail

### ShapeUtils

    public ShapeUtils()

Method Detail

### readPoint

    public static SHPPoint readPoint(byte[] b,
                                     int off)

  readPoint(byte[] b, int off)
  Reads a point record. A point record is a double representing the x value and a double representing a y value.

  Parameters:
    `b` - the raw data buffer
    `off` - the offset into the buffer where the int resides
  Returns:
    the point read from the buffer at the offset location

### readBox

    public static SHPEnvelope readBox(byte[] b,
                                      int off)

  method: readBox(byte[] b, int off)
  Reads a bounding box record. A bounding box is four double representing, in order, xmin, ymin, xmax, ymax.

  Parameters:
    `b` - the raw data buffer
    `off` - the offset into the buffer where the int resides
  Returns:
    the point read from the buffer at the offset location

### writePoint

    public static int writePoint(byte[] b,
                                 int off,
                                 SHPPoint point)

  method: writePoint(byte[] b, int off, ESRIPoint point)
  Writes the given point to the given buffer at the given location. The point is written as a double representing x followed by a double representing y.

  Parameters:
    `b` - the data buffer
    `off` - the offset into the buffer where writing should occur
    `point` - the point to write
  Returns:
    the number of bytes written

### writeBox

    public static int writeBox(byte[] b,
                               int off,
                               SHPEnvelope box)

  method: writeBox(byte[] b, int off, ESRIBoundingBox box)
  Writes the given bounding box to the given buffer at the given location. The bounding box is written as four doubles representing, in order, xmin, ymin, xmax, ymax.

  Parameters:
    `b` - the data buffer
    `off` - the offset into the buffer where writing should occur
    `box` - the bounding box to write
  Returns:
    the number of bytes written

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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