[postgis-users] Raster database design
Simon Greener
simon at spdba.com.au
Thu Jul 6 01:57:55 PDT 2023
Thanks for your input.
39 Cliff View Drive
Allens Rivulet Tas 7150
(W) 0418 396 391
On 6 Jul 2023, 11:32, at 11:32, David Haynes <haynesd2 at gmail.com> wrote:
>It would make more sense to use a view than another table. If someone
>forgets the where f.raster_name check the query time will increase
>dramatically.
>
>On Sun, Jul 2, 2023 at 7:40 PM Simon SPDBA Greener <simon at spdba.com.au>
>wrote:
>
>> Currently when I load a raster (GDAL) into PostGIS I get a table per
>> raster and a row per tile (if tiled).
>>
>> Is it possible to store multiple rasters within the same table, with
>a
>> descriminator column to identify which rows belong to which raster?
>>
>> Such storage makes queries like this possible.
>>
>> SELECT ST_SummaryStats(rast)
>> FROM flood as f
>> WHERE f.raster_name = 'toddriver_2019_3p0m';
>>
>> Or perhaps a better question: what are the pros/cons of doing so?
>>
>> create table toddriver_2019_2p5m (
>> rid integer,
>> raster_name text,
>> rast raster );
>>
>> I would assume that one could not apply the constraints to this
>table.
>>
>> regards
>>
>> Simon
>>
>> --
>> Simon Greener
>> 39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia
>> (m) +61 418 396 391
>> (w) www.spdba.com.au
>> (m) simon at spdba.com.au
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list