Database Reference
In-Depth Information
SELECT azimuth
FROM index_query
ORDER BY dist
LIMIT 1;
$$ LANGUAGE SQL;
Now, we can use this function quite easily:
CREATE TABLE chp04.knn_address_points_rot AS
SELECT addr.*,
chp04.angle_to_street(addr.the_geom)
FROM
chp04.knn_addresses addr;
If you have loaded the whole address dataset, this will take a while.
If we choose to, we can optionally drop the function so that extra functions are not
left in our database.
DROP FUNCTION chp04.angle_to_street (geometry);
IfwerenderthiswithrotationinadesktoppackagesuchasQuantumGIS(QGIS),
we will get a pleasant effect shown as follows:
Search WWH ::




Custom Search