code: public double getLength() {
  		double len = 0;
  		if (!isEmpty()) {
  			for (int i = 0; i < coordinates.length - 1; i++) {
  				double deltaX = coordinates[i + 1].getX() - coordinates[i].getX();
  				double deltaY = coordinates[i + 1].getY() - coordinates[i].getY();
  				len += Math.sqrt(deltaX * deltaX + deltaY * deltaY);
  			}
  		}
  		return len;
  	}
docs: Return the length of the LineString.