I am looking for a simple example of using ST_Aspect()
to find the aspect at a specified lat/long pair.
Asked
Active
Viewed 123 times
1
-
Not sure why people would down vote this question, but up vote this one: https://gis.stackexchange.com/questions/14960/postgis-raster-value-of-a-lat-lon-point – Craeft Mar 05 '20 at 18:29
1 Answers
1
The following example returns the aspect
of a raster created from a coordinate pair:
SELECT
ST_Aspect(
ST_AsRaster('POINT(-4.45 54.36)',1,1));
----------------------------------------------------------------------------------------------------------------------------------------------
0100000100000000000000F03F000000000000F0BFCDCCCCCCCCCC11C0AE47E17A142E4B400000000000000000000000000000000000000000010001004A00000000000080BF
(1 Zeile)
Check the ST_AsRaster
documentation to find the set of parameters that suit your use case.

Jim Jones
- 18,404
- 3
- 35
- 44
-
I am afraid I am too new to this to understand what I am looking at. I was expecting the query to return an angle? Based on this answer, I will edit my question so it better reflects what I am looking for. – Craeft Mar 06 '20 at 20:30
-
@Craeft have you tried using ST_DumpValues in this resultset? That might show you the result you expect. – Jim Jones Mar 07 '20 at 08:24