-- sql/rev.sql -- GENERATED - DO NOT MODIFY. See README.lit SELECT id as gid, name, placetype, lon, lat, ST_Distance_Sphere(point, ST_Point($1, $2)) as distance, ST_Azimuth(ST_Point($1, $2), point) * 180.0 / 3.14159 AS bearing, country FROM data ORDER BY distance LIMIT 1