官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 谢通门县| 县级市| 托克逊县| 集安市| 驻马店市| 贞丰县| 精河县| 旅游| 贺兰县| 邹城市| 寿宁县| 额济纳旗| 郎溪县| 常宁市| 阜平县| 锦屏县| 射阳县| 云林县| 宜昌市| 会昌县| 偏关县| 南川市| 龙海市| 雷州市| 巴马| 长泰县| 囊谦县| 南澳县| 蒙自县| 古交市| 邳州市| 仁寿县| 枣强县| 望奎县| 民县| 泾川县| 北票市| 长宁区| 正宁县| 高雄县| 蒲城县|