deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.io.shpapi.shape_new
Interface Shape

All Known Implementing Classes:
ShapeEnvelope, ShapeMultiPatch, ShapeMultiPoint, ShapePoint, ShapePolygon, ShapePolyline

public interface Shape

Shape defines methods to read, write and use objects read from/written to a shapefile (as well as some basic information).

Version:
$Revision: 9342 $, $Date: 2007-12-27 13:32:57 +0100 (Do, 27 Dez 2007) $
Author:
Andreas Schmitz, last edited by: $Author: apoth $

Method Summary
 int getByteLength()
           
 ShapeEnvelope getEnvelope()
           
 Geometry getGeometry()
           
 int getType()
           
 int read(byte[] bytes, int offset)
          Reads the object from a byte array.
 int write(byte[] bytes, int offset)
          Writes the object to a byte array.
 

Method Detail

read

int read(byte[] bytes,
         int offset)
Reads the object from a byte array.

Parameters:
bytes -
offset - where to start reading
Returns:
the new offset or -1, if the type was wrong.

write

int write(byte[] bytes,
          int offset)
Writes the object to a byte array.

Parameters:
bytes -
offset -
Returns:
the new offset.

getByteLength

int getByteLength()
Returns:
the number of bytes necessary to write this instance.

getType

int getType()
Returns:
the type of the shape

getEnvelope

ShapeEnvelope getEnvelope()
Returns:
the shapes' envelope, or null, if it has none

getGeometry

Geometry getGeometry()
                     throws ShapeGeometryException
Returns:
the shape as deegree Geometry
Throws:
ShapeGeometryException - if the deegree geometry could not be constructed

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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