Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: