I ingested two Landsat images into PostGIS database using :
raster2pgsql -I -C -s 28356 -M -t 100x100 LS7_20150425_B40.tif public.red | psql -d postgres -U postgresraster2pgsql -I -C -s 28356 -M -t 100x100 LS7_20150425_B50.tif public.nir | psql -d postgres -U postgresIngestion is going fast : around 20 seconds for each insertion.When I did the same without tiling (-t) and vacuum (-M), it took about the same duration.
Then I want to compute a NDVI raster table from PostGIS using the following SQL command :
CREATE TABLE public.ndvi ASSELECT ST_MapAlgebraExpr(a.rast, 1, b.rast, 1, '([rast1] - [rast2]) / ([rast1] + [rast2])::float', '32BF') AS rastFROM public.nir a, public.red b;If I am not using the tiling/vacuum options at the ingestion, the NDVI raster table is computed in about 3 minutes. With the tiling and vacuum options, the NDVI raster table is computed in about one hour ! Am I missing something here ?
I decided to use the tiling option to improve the performances when displaying rasters in QGIS but if the tiling slows things down when doing some calculations there is no interest anymore to do it this way.
أكثر...
raster2pgsql -I -C -s 28356 -M -t 100x100 LS7_20150425_B40.tif public.red | psql -d postgres -U postgresraster2pgsql -I -C -s 28356 -M -t 100x100 LS7_20150425_B50.tif public.nir | psql -d postgres -U postgresIngestion is going fast : around 20 seconds for each insertion.When I did the same without tiling (-t) and vacuum (-M), it took about the same duration.
Then I want to compute a NDVI raster table from PostGIS using the following SQL command :
CREATE TABLE public.ndvi ASSELECT ST_MapAlgebraExpr(a.rast, 1, b.rast, 1, '([rast1] - [rast2]) / ([rast1] + [rast2])::float', '32BF') AS rastFROM public.nir a, public.red b;If I am not using the tiling/vacuum options at the ingestion, the NDVI raster table is computed in about 3 minutes. With the tiling and vacuum options, the NDVI raster table is computed in about one hour ! Am I missing something here ?
I decided to use the tiling option to improve the performances when displaying rasters in QGIS but if the tiling slows things down when doing some calculations there is no interest anymore to do it this way.
أكثر...