PostGIS Raster: Porovnání verzí
Řádek 23: | Řádek 23: | ||
<source lang="sql"> | <source lang="sql"> | ||
SELECT ST_SRID(rast), ST_NumBands(rast), ST_BandPixelType(rast, 1), | SELECT ST_SRID(rast), ST_NumBands(rast), ST_BandPixelType(rast, 1), | ||
ST_Width(rast), ST_Height(rast), | ST_Width(rast), ST_Height(rast), ST_PixelWidth(rast), | ||
ST_PixelHeight(rast), ST_GeoReference(rast) | |||
FROM dem; | FROM dem; | ||
</source> | </source> | ||
<pre> | <pre> | ||
st_srid | | st_srid | 2065 | ||
st_numbands | | st_numbands | 3 | ||
st_bandpixeltype | | st_bandpixeltype | 8BUI | ||
st_width | | st_width | 7881 | ||
st_height | | st_height | 3246 | ||
st_pixelwidth | 1 | |||
st_pixelheight | 1 | |||
st_georeference | | st_georeference | 1.0000000000 | ||
: 0.0000000000 | |||
: 0.0000000000 | |||
: -1.0000000000 | |||
: 0.0000000000 | : 0.0000000000 | ||
: 0.0000000000 | : 0.0000000000 | ||
</pre> | </pre> | ||
Verze z 4. 4. 2012, 08:05
PostGIS Raster je rozšíření pro PostGIS umožňující uložení, manipulaci, zpracování a dotazování rastrových dat v prostředí PostGIS/PostgreSQL.
Více přednášky Úvod do zpracování prostorových dat.
Poznámky
Načtení rozšíření PostGIS Raster do dané databáze.
psql -d pgis_student -f /usr/share/postgresql/<verze>/contrib/rtpostgis.sql
Stažení testovacích dat.
wget http://geo.fsv.cvut.cz/~landa/vyuka/postgis/dem.tif
Import dat do databáze.
raster2pgsql -I -s 2065 dem.tif | psql pgis_student
Příklad jednoduchého dotazu.
SELECT ST_SRID(rast), ST_NumBands(rast), ST_BandPixelType(rast, 1),
ST_Width(rast), ST_Height(rast), ST_PixelWidth(rast),
ST_PixelHeight(rast), ST_GeoReference(rast)
FROM dem;
st_srid | 2065 st_numbands | 3 st_bandpixeltype | 8BUI st_width | 7881 st_height | 3246 st_pixelwidth | 1 st_pixelheight | 1 st_georeference | 1.0000000000 : 0.0000000000 : 0.0000000000 : -1.0000000000 : 0.0000000000 : 0.0000000000