Skip to content
Permalink
Browse files

Use JTS convenience functions for readability

  • Loading branch information
mojodna authored and echeipesh committed Apr 2, 2018
1 parent 915c14c commit 57cb1af15cdaacde0fc2771bf0616b676b441d3a
Showing with 2 additions and 2 deletions.
  1. +2 −2 vector/src/main/scala/geotrellis/vector/Line.scala
@@ -83,10 +83,10 @@ case class Line(jtsGeom: jts.LineString) extends Geometry
jtsGeom.getBoundary

/* The first [[Point]] in this Line, which we know to exist. */
def head: Point = jtsGeom.getPointN(0)
def head: Point = jtsGeom.getStartPoint

/* The last [[Point]] in this Line, which we know to exist. */
def last: Point = jtsGeom.getPointN(jtsGeom.getNumPoints - 1)
def last: Point = jtsGeom.getEndPoint

/** Returns the points which determine this line (i.e. its vertices */
def points: Array[Point] = vertices

0 comments on commit 57cb1af

Please sign in to comment.
You can’t perform that action at this time.