com.partnersoft.formats.shapefile
Class ShpPolyLine

java.lang.Object
  extended by com.partnersoft.formats.shapefile.ShpPolyLine
All Implemented Interfaces:
Immutable, ShpShape

public class ShpPolyLine
extends java.lang.Object
implements ShpShape

ESRI's multiple-section, multiple part polyline in (x, y) space.

By our definitions, a shapefile PolyLine entity is really a list of polyline objects. Each of these is the standard ordered series of connected vertices.

Copyright 2007 Partner Software, Inc.

Version:
$Id: ShpPolyLine.java 1701 2009-01-13 22:11:48Z paul $
Author:
Paul Reavis

Constructor Summary
ShpPolyLine(ShapeByteReader reader)
          Creates a new ShpPolyLine object from the given input.
 
Method Summary
 XyBounds getBounds()
          Return the bounds.
 int getNumParts()
          The number of polyline parts.
 int getNumPoints()
          The total number of points of all parts.
 java.util.List<java.util.List<ShpPoint>> getParts()
          Returns the points as a list of lists.
 ShapeType getType()
          Returns the type for this shape.
 java.lang.String toString()
           
 java.util.List<XyPolyline> toXyPolylines()
          Converts the ShpPolyLine to a list of XyPolyline objects.
 void writeBytes(ShapeByteWriter writer)
          Writes this shape, in binary format, to the given output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShpPolyLine

public ShpPolyLine(ShapeByteReader reader)
Creates a new ShpPolyLine object from the given input.

Method Detail

toXyPolylines

public java.util.List<XyPolyline> toXyPolylines()
Converts the ShpPolyLine to a list of XyPolyline objects.


getType

public ShapeType getType()
Description copied from interface: ShpShape
Returns the type for this shape.

Specified by:
getType in interface ShpShape

writeBytes

public void writeBytes(ShapeByteWriter writer)
Description copied from interface: ShpShape
Writes this shape, in binary format, to the given output. Does not include the type code.

Specified by:
writeBytes in interface ShpShape

toString

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

getNumParts

public int getNumParts()
The number of polyline parts.


getNumPoints

public int getNumPoints()
The total number of points of all parts.

Returns:
number of points

getParts

public java.util.List<java.util.List<ShpPoint>> getParts()
Returns the points as a list of lists. Each sublist is one of the parts.


getBounds

public XyBounds getBounds()
Return the bounds.