com.partnersoft.formats.shapefile
Class ShpPolyCurve

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

public class ShpPolyCurve
extends java.lang.Object
implements ShpShape

Curved arcs are not specified in the ESRI shapefile document; however they do occur in Arc/Info shapes. This is what we have dubbed a "ShpPolyCurve", since it is essentially a variation on a ShpPolyLine that contains curved as well as straight segments.

Copyright 2007 Partner Software, Inc.

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

Constructor Summary
ShpPolyCurve(ShapeByteReader reader)
          Creates a new ShpPolyLine object from the given input.
 
Method Summary
 boolean equals(java.lang.Object nother)
           
 XyBounds getBounds()
          Return the bounds.
 int getCurveCount()
          The total number of actual (non-straight-line) curves.
 java.util.List<java.util.List<ShpCurve>> getCurves()
          Returns the points as a list of lists.
 int getPartCount()
          The number of polyline parts.
 int getPointCount()
          The total number of points of all parts.
 ShapeType getType()
          Returns the type for this shape.
 java.lang.String toString()
           
 java.util.List<XyPolyline> toXyPolylines()
          Converts the ShpPolyCurve 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShpPolyCurve

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

Method Detail

toXyPolylines

public java.util.List<XyPolyline> toXyPolylines()
Converts the ShpPolyCurve 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

equals

public boolean equals(java.lang.Object nother)
Overrides:
equals in class java.lang.Object

getPartCount

public int getPartCount()
The number of polyline parts.


getPointCount

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

Returns:
number of points

getCurveCount

public int getCurveCount()
The total number of actual (non-straight-line) curves.


getCurves

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


getBounds

public XyBounds getBounds()
Return the bounds.