~ihabunek/triglav

679690ab4802d018b56a1a4ef21d50e8842f3078 — Ivan Habunek 3 months ago 1a8ba58
Use stored distance in validator
1 files changed, 1 insertions(+), 7 deletions(-)

M lib/triglav/derived/public_transport.ex
M lib/triglav/derived/public_transport.ex => lib/triglav/derived/public_transport.ex +1 -7
@@ 14,7 14,6 @@ defmodule Triglav.Derived.PublicTransport do
  alias Triglav.Zet.Osmosis

  import Ecto.Query
  import Geo.PostGIS

  def list_trips() do
    from(t in Trip) |> Repo.all()


@@ 29,12 28,7 @@ defmodule Triglav.Derived.PublicTransport do
  end

  def list_platforms() do
    from(p in Platform,
      join: t in Trip,
      on: t.relation_id == p.relation_id,
      select: %{p | distance_from_route: st_distance_in_meters(p.geometry, t.geometry)}
    )
    |> Repo.all()
    from(p in Platform) |> Repo.all()
  end

  def generate() do