PostGIS Raster: Porovnání verzí

Z GeoWikiCZ
Řá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_PixelSizeX(rast),
  ST_Width(rast), ST_Height(rast), ST_PixelWidth(rast),
  ST_PixelSizeY(rast), ST_GeoReference(rast)
  ST_PixelHeight(rast), ST_GeoReference(rast)
  FROM dem;
  FROM dem;
</source>
</source>


<pre>
<pre>
st_srid          | 102067
st_srid          | 2065
st_numbands      | 1
st_numbands      | 3
st_bandpixeltype | 16BUI
st_bandpixeltype | 8BUI
st_width        | 791
st_width        | 7881
st_height        | 315
st_height        | 3246
st_pixelsizex   | 599.686318241795
st_pixelwidth   | 1
st_pixelsizey    | -930.716128648699
st_pixelheight  | 1
st_georeference  | 599.6863182417
st_georeference  | 1.0000000000
                : 0.0000000000
                : 0.0000000000
                : -1.0000000000
                 : 0.0000000000
                 : 0.0000000000
                 : 0.0000000000
                 : 0.0000000000
                : -930.7161286486
                : -905013.1965065500
                : -934410.2059925100
</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

Související články

Externí odkazy