- Mastering PostGIS
- Dominik Mikiewicz Michal Mackiewicz Tomasz Nycz
- 146字
- 2021-07-02 22:52:24
Importing a single raster
In order to import a single raster file, let's issue the following command:
raster2pgsql -s 4326 -C -l 2,4 -I -F -t 2700x2700 gray_50m_sr_ob.tif data_import.gray_50m_sr_ob | psql -h localhost -p 5434 -U postgres -d mastering_postgis
You should see a similar output:
Processing 1/1: gray_50m_sr_ob.tif
BEGIN
CREATE TABLE
CREATE TABLE
CREATE TABLE
INSERT 0 1
(...)
INSERT 0 1
CREATE INDEX
ANALYZE
CREATE INDEX
ANALYZE
CREATE INDEX
ANALYZE
NOTICE: Adding SRID constraint
CONTEXT: PL/pgSQL function addrasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean) line 53 at RETURN
NOTICE: Adding scale-X constraint
(...)
----------------------
t
(1 row)
addoverviewconstraints
------------------------
t
(1 row)
addoverviewconstraints
------------------------
t
(1 row)
COMMIT
The executed command created 3 tables: the main raster table called data_import.gray_50m_sr_ob and two overview tables called data_import.o_2_gray_50m_sr_ob and data_import.o_4_gray_50m_sr_ob. The command also created the GIST index and brought in the filename. The raster has been split into tiles of 2700 x 2700 pixels.
推薦閱讀
- Word 2000、Excel 2000、PowerPoint 2000上機指導與練習
- 我的J2EE成功之路
- Dreamweaver CS3網頁設計與網站建設詳解
- Hands-On Cybersecurity with Blockchain
- 西門子S7-200 SMART PLC實例指導學與用
- Ceph:Designing and Implementing Scalable Storage Systems
- 計算機網絡安全
- JavaScript典型應用與最佳實踐
- MCGS嵌入版組態軟件應用教程
- Linux Shell編程從初學到精通
- 單片機原理實用教程
- 電腦上網入門
- 空間機器人
- 人工智能:智能人機交互
- 空間機器人智能感知技術