I need to load in QlikView GPS data regarding our company's cars. In the database where the data is kept there 2 tables that i use:
KmData - it contains the car's position at a given time (latitude and longitude), and other info: driver, speed, distance, etc
Locations - a list with points of interest (POI) which contains our customers addresses. These are defined using map 2 coordinates that form a square with a 100 meters side (LatitudeMin, LongitudeMin, LatitudeMax, LongitudeMax, LocationName).
The problem is i need to find connection between this 2 tables, but they don't share a common field. The link can be made by verifying if a location from which a car sent a signal (from the KmData table) is inside a square from Locations table. The formula is:
if(LatitudeMin<=Latitude and Latitude<LatitudeMax and LongitudeMin<=Longitude and Longitude<=LongitudeMax, 1)
I tried using this in the interface in a straight table, but because the data volume is very large (we have over 400000 lines in KmData every month and about 3500 rows in Locations), the table is calculated very slowly (i tried with only a couple of days and it was really slow).
I'm thinking i should somehow make this calculations in the script, but i don't know how.