Coder Social home page Coder Social logo

Comments (2)

estebanzimanyi avatar estebanzimanyi commented on September 20, 2024

Dear Wendell

Many thanks for your interest in MobilityDB. If I understand well you problem, what you need is to compute the temporal intersection of a moving point and a geometry. You can do this in MobilityDB, as shown in the following example

select tintersects(tgeompoint '[point(0 0)@2000-01-01, point(3 3)@2000-01-04]', geometry 'Polygon((1 1,1 2,2 2,2 1,1 1))');
-- "{[f@2000-01-01 00:00:00+01, t@2000-01-02 00:00:00+01, t@2000-01-03 00:00:00+01], (f@2000-01-03 00:00:00+01, f@2000-01-04 00:00:00+01]}"

Please notice that a moving point may enter and leave a geometry multiple times as shown in the following example

select tintersects(tgeompoint '[point(0 2)@2000-01-01, point(6 2)@2000-01-11]', geometry 'Polygon((1 0,1 1,2 3,3 1,4 3, 5 1,5 0,1 0))');
"{[f@2000-01-01 00:00:00+01, t@2000-01-03 12:00:00+01, t@2000-01-05 04:00:00+01],
(f@2000-01-05 04:00:00+01, t@2000-01-06 20:00:00+01, t@2000-01-08 12:00:00+01],
(f@2000-01-08 12:00:00+01, f@2000-01-11 00:00:00+01]}"

If you want to obtain the first and last instant at which at moving point intersects a geometry you can obtain them as follows

select period(atValue(tintersects(tgeompoint '[point(0 2)@2000-01-01, point(6 2)@2000-01-11]', geometry 'Polygon((1 0,1 1,2 3,3 1,4 3, 5 1,5 0,1 0))'), true))
"[2000-01-03 12:00:00+01, 2000-01-08 12:00:00+01]"

Regarding your question about using generic geometries instead of points in MobilityDB, the current version does not support them since all temporal operations (e.g. temporal intersection) are much more complex for moving geometries than for moving points. Nevertheless, we are already exploring the issue in order to implement OGC's Moving Features standard https://www.opengeospatial.org/standards/movingfeatures
Therefore, yes, we will be able to support moving geometries (which are non deforming) in a future release of MobilityDB.

Regards

Esteban

from mobilitydb.

wendellwt avatar wendellwt commented on September 20, 2024

Thank you for the reply. I'll make use of MobilityDB with points that have timestamps. That will be much better than PostGIS with the LinestringM.

Thanks again,
Wendell

from mobilitydb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.