[Mobilitydb-users] building a tgeogpointi with time only known for some points

Mahmoud Sakr mahmoud.sakr at ulb.be
Sat May 22 11:01:01 PDT 2021


Hi Jannis,
While constructing a trajectory, you can skip the nulls (either the
timestamp or the geography). The interpolation will automatically be
computed using the values immediately before and after the nulls. Here is
an example:

CREATE TABLE Ships(MMSI, Trip, SOG, COG) AS
SELECT MMSI,
tgeompointseq(array_agg(tgeompointinst( ST_Transform(Geom, 25832), T)
ORDER BY T) FILTER (WHERE T IS NOT NULL)),
tfloatseq(array_agg(tfloatinst(SOG, T) ORDER BY T) FILTER (WHERE SOG
IS NOT NULL))
FROM AISInputFiltered
GROUP BY MMSI;

Best regards,

Mahmoud


On Fri, May 21, 2021 at 6:38 PM Jannis R <mail at jannisr.de> wrote:

> hey everyone!
>
> is it possible to construct a `tgeogpointi` from a list of `geography` +
> `timestamptz` items if some of the items don't have a `timestamptz`? or to
> put it another way: i have a geospatial + temporal trajectory, where I only
> know the temporal value of *some* of the points.
>
> ideally, i would like mobilitydb to interpolate between them on the fly.
> do i understand correctly that there's no such feature?
>
> – jannis
> _______________________________________________
> Mobilitydb-users mailing list
> Mobilitydb-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mobilitydb-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mobilitydb-users/attachments/20210522/2c3da310/attachment.html>


More information about the Mobilitydb-users mailing list