Getting the aspect from a raster at a specified lat/long in PostGIS

145 Views Asked by At

I am looking for a simple example of using ST_Aspect() to find the aspect at a specified lat/long pair.

1

There are 1 best solutions below

2
On BEST ANSWER

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.