I know that one can import GeoTIFF into PostGIS via raster2pgsql
. I was wondering if there is any easy way (as a sequence of SQL statements) to do the same without resorting to the command line tool?
Essentially, I am interested in a PostgreSQL function that is the inverse of ST_AsTIFF, which given a pathname to a GeoTIFF, creates a pgraster table or a row in such a table.
The reason I ask is that I need such a function in a SQL stored procedure to import and process GeoTIFFs (not known in advance).