名稱

ST_GeoReference — 以 GDAL 或 ESRI 格式(如常見於世界檔案中)傳回地理參考元數據。預設為 GDAL。

概要

text ST_GeoReference(raster rast, text format=GDAL);

描述

以 GDAL 或 ESRI 格式(如常見於世界檔案中)傳回包含歸位字元的地理參考元數據。如果未指定類型,則預設為 GDAL。類型為字串 'GDAL' 或 'ESRI'。

格式表示之間的差異如下

GDAL:

scalex
skewy
skewx
scaley
upperleftx
upperlefty

ESRI:

scalex
skewy
skewx
scaley
upperleftx + scalex*0.5
upperlefty + scaley*0.5

範例

SELECT ST_GeoReference(rast, 'ESRI') As esri_ref, ST_GeoReference(rast, 'GDAL') As gdal_ref
 FROM dummy_rast WHERE rid=1;

   esri_ref   |   gdal_ref
--------------+--------------
 2.0000000000 | 2.0000000000
 0.0000000000 : 0.0000000000
 0.0000000000 : 0.0000000000
 3.0000000000 : 3.0000000000
 1.5000000000 : 0.5000000000
 2.0000000000 : 0.5000000000