Google Cloud SQL lacks raster2pgsql
-
22-01-2021 - |
Domanda
Google Cloud SQL supports the PostGIS extension, but I haven't seen any documentation regarding how to work with raster data on it. To load raster data into a table, we have to use raster2pgsql driver.
In this sense, does Cloud SQL support it? Also, it would be really useful if it had out-of-db raster support considering we could store data in Cloud Storage and query it from there.
Soluzione
raster2pgsql
This a helper to make the job easy. It's not strictly speaking required.
raster2pgsql is a raster loader executable that loads GDAL supported raster formats into sql suitable for loading into a PostGIS raster table. It is capable of loading folders of raster files as well as creating overviews of rasters.
You can just redirect the output of raster2pgsql
into a file
raster2pgsql > myFile.sql
Then run myFile.sql on Google Cloud.