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.shape_new
Class ShapePolyline

    java.lang.Object
      org.deegree.io.shpapi.shape_new.ShapePolyline

All Implemented Interfaces:
  Shape

Direct Known Subclasses:
  ShapePolygon

    public class ShapePolyline

extends Object
implements Shape

`ShapePolyline` corresponds to the Polyline, PolylineM and PolylineZ shapes of the shapefile spec.

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
`protected CoordinateSystem` | `crs`
`protected boolean` | `isM`
`protected boolean` | `isZ`
`protected ShapePoint[][]` | `points`

Constructor Summary
`ShapePolyline()` Empty constructor.
`ShapePolyline(boolean z, boolean m)` Creates a new Polyline/M/Z.
`ShapePolyline(boolean z, boolean m, CoordinateSystem crs)` Creates a new Polyline/M/Z.
`ShapePolyline(Curve c)` Creates a new PolylineZ from deegree Curve.
`ShapePolyline(List<Curve> cs)` Creates a new PolylineZ from deegree Curves.

Method Summary
`int` | `getByteLength()`
`ShapeEnvelope` | `getEnvelope()`
`Geometry` | `getGeometry()` This creates a MultiCurve object.
`int` | `getType()`
`int` | `read(byte[] bytes, int offset)` Reads the object from a byte array.
`protected int` | `readPolyline(byte[] bytes, int offset)`
`protected int` | `readPolylineM(byte[] bytes, int offset)`
`protected int` | `readPolylineZ(byte[] bytes, int offset)`
`String` | `toString()`
`int` | `write(byte[] bytes, int offset)` Writes the object to a byte array.
`protected int` | `writePolyline(byte[] bytes, int offset)`
`protected int` | `writePolylineM(byte[] bytes, int offset)`
`protected int` | `writePolylineZ(byte[] bytes, int offset)`

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

Field Detail

### crs

    protected CoordinateSystem crs

### isM

    protected boolean isM

### isZ

    protected boolean isZ

### points

    protected ShapePoint[][] points

Constructor Detail

### ShapePolyline

    public ShapePolyline()

  Empty constructor. Should be used in concert with read().

### ShapePolyline

    public ShapePolyline(boolean z,
                         boolean m)

  Creates a new Polyline/M/Z.

  Parameters:
    `z` -
    `m` -

### ShapePolyline

    public ShapePolyline(boolean z,
                         boolean m,
                         CoordinateSystem crs)

  Creates a new Polyline/M/Z.

  Parameters:
    `z` -
    `m` -
    `crs` - CoordinateSystem for shape

### ShapePolyline

    public ShapePolyline(List<Curve> cs)

  Creates a new PolylineZ from deegree Curves.

  Parameters:
    `cs` -

### ShapePolyline

    public ShapePolyline(Curve c)

  Creates a new PolylineZ from deegree Curve.

  Parameters:
    `c` -

Method Detail

### getByteLength

    public int getByteLength()

  Specified by:
    `getByteLength` in interface `Shape`
  Returns:
    the number of bytes necessary to write this instance.

### readPolyline

    protected int readPolyline(byte[] bytes,
                               int offset)

### readPolylineZ

    protected int readPolylineZ(byte[] bytes,
                                int offset)

### readPolylineM

    protected int readPolylineM(byte[] bytes,
                                int offset)

### 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.

### writePolyline

    protected int writePolyline(byte[] bytes,
                                int offset)

### writePolylineZ

    protected int writePolylineZ(byte[] bytes,
                                 int offset)

### writePolylineM

    protected int writePolylineM(byte[] bytes,
                                 int offset)

### 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.

### getType

    public int getType()

  Specified by:
    `getType` in interface `Shape`
  Returns:
    the type of the shape

### getEnvelope

    public ShapeEnvelope getEnvelope()

  Specified by:
    `getEnvelope` in interface `Shape`
  Returns:
    the shapes' envelope, or null, if it has none

### getGeometry

    public Geometry getGeometry()
                         throws ShapeGeometryException

  This creates a MultiCurve 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 String toString()

  Overrides:
    `toString` in class `Object`

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