Re:Mireo SpaceTime – an absurdly fast spatiotemporal database
by Nikola12 on Tuesday April 21, 2020 @04:14AM
(#22933022)
Can you give some example of "MSQL" query?
[ Parent
| on HN ]
Re:Mireo SpaceTime – an absurdly fast spatiotemporal database
by miljen on Tuesday April 21, 2020 @05:05AM
(#22933253)
Of course. MSQL queries can be as simple as "select * from st.trips", but can also include geospatial functions that we implemented and that are not part of standard SQL:
"select vid, sum(sphere_length(x[0], y[0], x[1], y[1])) as mileage
from st.segments
where
ST_Intersects(
ST_GeomFromText('POLYGON ((11955008 38520960,11995328 38530624,11998976 38531456,11955008 38520960))'),
ST_Line(x[0], y[0], x[1], y[1])
)
and t[0] >= 1569888000 and t[1] < 1572566400 and vid >= 3200 and vid <= 3300
group by vid"
Actually, a query very similar to the one listed above generates the report mileage-in-area mentioned in the blog.