- 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.
推薦閱讀
- 火格局的時空變異及其在電網防火中的應用
- Deep Learning Quick Reference
- Python Artificial Intelligence Projects for Beginners
- 網頁編程技術
- 返璞歸真:UNIX技術內幕
- AutoCAD 2012中文版繪圖設計高手速成
- 網絡布線與小型局域網搭建
- 分析力!專業Excel的制作與分析實用法則
- 基于企業網站的顧客感知服務質量評價理論模型與實證研究
- 精通LabVIEW程序設計
- Introduction to R for Business Intelligence
- 寒江獨釣:Windows內核安全編程
- Learning iOS 8 for Enterprise
- Modern Big Data Processing with Hadoop
- 我的IT世界