public function setFrom(CoordinateInterface $from)
{
$this->from = $from;
if (empty($this->to) || ($this->to->getLatitude() - $this->from->getLatitude() === 0)) {
return $this;
}
$this->gradient = ($this->to->getLongitude() - $this->from->getLongitude()) / ($this->to->getLatitude() - $this->from->getLatitude());
$this->ordinateIntercept = $this->from->getLongitude() - $this->from->getLatitude() * $this->gradient;
return $this;
}