Class Polyline

All Implemented Interfaces:
Serializable

public class Polyline extends MultiPath implements Serializable
A polyline is a collection of one or many paths.
See Also:
  • Field Details

  • Constructor Details

    • Polyline

      public Polyline()
      Creates an empty polyline.
    • Polyline

      public Polyline(VertexDescription vd)
    • Polyline

      public Polyline(Point start, Point end)
      Creates a polyline with one line segment.
  • Method Details

    • createInstance

      public Geometry createInstance()
      Description copied from class: Geometry
      Creates an instance of an empty geometry of the same type.
      Specified by:
      createInstance in class Geometry
      Returns:
      The new instance.
    • getDimension

      public int getDimension()
      Description copied from class: Geometry
      Returns the topological dimension of the geometry object based on the geometry's type.

      Returns 0 for point and multipoint.

      Returns 1 for lines and polylines.

      Returns 2 for polygons and envelopes

      Returns 3 for objects with volume

      Specified by:
      getDimension in class Geometry
      Returns:
      Returns the integer value of the dimension of geometry.
    • getType

      public Geometry.Type getType()
      Description copied from class: Geometry
      Returns the geometry type.
      Specified by:
      getType in class Geometry
      Returns:
      Returns the geometry type.
    • estimateMemorySize

      public long estimateMemorySize()
      Description copied from class: Geometry
      Returns an estimate of this object size in bytes.

      This estimate doesn't include the size of the VertexDescription object because instances of VertexDescription are shared among geometry objects.

      Specified by:
      estimateMemorySize in class Geometry
      Returns:
      Returns an estimate of this object size in bytes.
    • equals

      public boolean equals(Object other)
      Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Returns the hash code for the polyline.
      Overrides:
      hashCode in class MultiPath
    • addSegment

      public void addSegment(Segment segment, boolean bStartNewPath)
      Description copied from class: MultiPath
      Adds a new segment to this multipath.
      Overrides:
      addSegment in class MultiPath
      Parameters:
      segment - The segment to be added to this mulitpath.
      bStartNewPath - TRUE if a new path will be added.
    • interpolateAttributes

      public void interpolateAttributes(int from_path_index, int from_point_index, int to_path_index, int to_point_index)
    • interpolateAttributes

      public void interpolateAttributes(int semantics, int from_path_index, int from_point_index, int to_path_index, int to_point_index)