0

I have a table with this fields: datetime, event_name, latitude, longitude

I want to create a boolean flag to know if an event happened near other in space and time, for example, if an event occurred within 2kms and 15 minutes

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
Jagark
  • 1
  • 2
    Please provide sample data, desired results, and an appropriate database tag. – Gordon Linoff Sep 15 '20 at 00:05
  • Sorry im new here, which will be an appropriate tag? Postgresql (thats what im using) – Jagark Sep 15 '20 at 00:35
  • 1
    Check out this info about the Haversine formula to calculate straight-line distance between two lat-long points. https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula – Sam M Sep 15 '20 at 03:19

0 Answers0