2 File ID: 31b5014c-fafb-11dd-ab52-000475e441b9
4 To list the closest track points from a coordinate:
6 SELECT date, coor, name, dist, (point(60.30738,5.34574) <-> coor)::numeric AS avs FROM logg ORDER BY avs LIMIT 100;
8 List all trackpoints inside a coordinate box:
10 SELECT * from logg where box '((LAT1,LON1),(LAT2,LON2))' @> coor order by date;
14 gps=# VACUUM ANALYZE ;
17 gps=# UPDATE logg set name = clname(coor);
20 gps=# DROP INDEX log_name_idx ;
23 gps=# UPDATE logg set name = clname(coor);
26 gps=# CREATE INDEX log_name_idx ON logg (name);
31 gps=# UPDATE logg SET name = clname(coor), dist = cldist(coor);