deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.shpapi.shape_new
Class ShapeMultiPatch

java.lang.Object
  extended by org.deegree.io.shpapi.shape_new.ShapeMultiPatch
All Implemented Interfaces:
Shape

public class ShapeMultiPatch
extends java.lang.Object
implements Shape

ShapeMultiPatch corresponds to a shapefile MultiPatch object.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Schmitz, last edited by: $Author: mschneider $

Field Summary
static int FIRST_RING
          First ring of a polygon part type.
static int INNER_RING
          Inner polygon ring part type.
static int OUTER_RING
          Outer polygon ring part type.
static int RING
          Polygon ring part type.
static int TRIANGLE_FAN
          Triangle fan part type.
static int TRIANGLE_STRIP
          Triangle strip part type.
 
Constructor Summary
ShapeMultiPatch(int length)
          Empty constructor, used for reading.
ShapeMultiPatch(int length, CoordinateSystem crs)
          Empty constructor, used for reading.
ShapeMultiPatch(MultiSurface f)
          Constructs one from deegree MultiSurface.
 
Method Summary
 int getByteLength()
           
 ShapeEnvelope getEnvelope()
           
 Geometry getGeometry()
          Creates a MultiSurface object.
 int getType()
           
 int read(byte[] bytes, int offset)
          Reads the object from a byte array.
 java.lang.String toString()
           
 int write(byte[] bytes, int offset)
          Writes the object to a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

ShapeMultiPatch

public ShapeMultiPatch(int length)
Empty constructor, used for reading.

Parameters:
length - expected length for reading

ShapeMultiPatch

public ShapeMultiPatch(int length,
                       CoordinateSystem crs)
Empty constructor, used for reading.

Parameters:
length - expected length for reading
crs - CoordinateSystem for shape

ShapeMultiPatch

public ShapeMultiPatch(MultiSurface f)
Constructs one from deegree MultiSurface. Every Surface is stored as an OUTER_RING followed by its INNER_RINGs (these are the only two part types used here).

Parameters:
f -
Method Detail

getByteLength

public int getByteLength()
Specified by:
getByteLength in interface Shape
Returns:
the number of bytes necessary to write this instance.

getEnvelope

public ShapeEnvelope getEnvelope()
Specified by:
getEnvelope in interface Shape
Returns:
the shapes' envelope, or null, if it has none

getType

public int getType()
Specified by:
getType in interface Shape
Returns:
the type of the shape

read

public int read(byte[] bytes,
                int offset)
Description copied from interface: Shape
Reads the object from a byte array.

Specified by:
read in interface Shape
offset - where to start reading
Returns:
the new offset or -1, if the type was wrong.

write

public int write(byte[] bytes,
                 int offset)
Description copied from interface: Shape
Writes the object to a byte array.

Specified by:
write in interface Shape
Returns:
the new offset.

getGeometry

public Geometry getGeometry()
                     throws ShapeGeometryException
Creates a MultiSurface object.

Specified by:
getGeometry in interface Shape
Returns:
the shape as deegree Geometry
Throws:
ShapeGeometryException - if the deegree geometry could not be constructed
See Also:
Shape.getGeometry()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

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