甲骨文空间地理学家

司机简称

GeoRaster

生成依赖项

Oracle客户端库

此驱动程序支持以Oracle Spatial Georgaster格式(10g或更高版本)读取和写入栅格数据。Oracle Spatial Georgaster驱动程序可以作为GDAL插件构建,但它需要Oracle客户端库。

打开GeoRaster时,应在以下格式中指定其名称:

georaster:<user>{,/}<pwd>{,@}[db],[schema.][table],[column],[where]
georaster:<user>{,/}<pwd>{,@}[db],<rdt>,<rid>

在哪里?

user=Oracle服务器用户名登录
pwd=用户密码
db=Oracle服务器标识(数据库名称)
schema=架构的名称
table=GeoRaster表的名称(包含GeoRaster列的表)
column=列数据类型MDSYS.SDO_GEORASTER的名称
where=用于标识一个或多个GeoRaster的简单where子句
rdt=栅格数据表的名称
rid=一个地理紫菀的数字标识

实例:

geor:scott,tiger,demodb,table,column,id=1
geor:scott,tiger,demodb,table,column,"id = 1"
"georaster:scott/tiger@demodb,table,column,gain>10"
"georaster:scott/tiger@demodb,table,column,city='Brasilia'"
georaster:scott,tiger,,rdt_10$,10
geor:scott/tiger,,rdt_10$,10

注意:请注意在字段值和逗号周围使用空格。

注意:与前两个示例一样,数据库名称字段可以保留为空(“,”),并将使用TNSNAME。

注意:如果查询结果是一个以上的GeoRaster,它将被视为GDAL元数据的子数据集列表(见下文)

驱动程序功能

Supports CreateCopy()

This driver supports the GDALDriver::CreateCopy() operation

Supports Create()

This driver supports the GDALDriver::Create() operation

Supports Georeferencing

This driver supports georeferencing

Supports VirtualIO

This driver supports virtual I/O operations (/vsimem/, etc.)

浏览地理学家数据库

通过提供一些基本信息,GeoRaster驱动程序能够列出存储在服务器上的现有栅格:

要列出服务器上属于该用户名和数据库的所有GeoRaster表,请执行以下操作:

% gdalinfo georaster:scott/tiger@db1

要列出该表中存在的所有geoaster类型列,请执行以下操作:

%gdalinfo Georgaster:scott/tiger@db1,表名

它将列出存储在该表中的所有GeoRaster对象。

%gdalinfo georaster:scott/tiger@db1,表名,georaster列

这将根据Where子句列出该表上现有的所有GeoRaster。

%gdalinfo georaster:scott/tiger@db1,table_name,georaster_column,city='巴西利亚'


注意,这些查询的结果作为GDAL元数据子数据集返回,例如:
% gdalinfo georaster:scott/tiger
驱动程序:GeoRaster/Oracle space GeoRaster
子数据集:
SUBDATASET_1_NAME=georaster:scott,tiger,,LANDSAT SUBDATASET_1_DESC=表:LANDSAT SUBDATASET_2_NAME=georaster:scott,tiger,,GDAL_IMPORT SUBDATASET_2_DESC=表:GDAL_IMPORT

创建选项

  • BLOCKXSIZE :栅格块上的像素列数。

  • BLOCKYSIZE :栅格块上的像素行数。

  • BLOCKBSIZE :栅格块上的带数。

  • BLOCKING :拒绝使用阻塞(否)或请求自动阻塞大小(最佳)。

  • SRID:为GeoRaster指定一个特定的EPSG投影/参考系统标识。

  • INTERLEAVE: Band interleaving mode, BAND, LINE, PIXEL (or BSQ, BIL, BIP) for band sequential, Line or Pixel interleaving. Starting with GDAL 3.5, when copying from a source dataset with multiple bands which advertises a INTERLEAVE metadata item, if the INTERLEAVE creation option is not specified, the source dataset INTERLEAVE will be automatically taken into account, unless the COMPRESS creation option is specified.

  • DESCRIPTION :用SQL语法简单描述新创建的表。如果表已经存在,则将忽略此创建选项,例如:

%gdal_translate-of georaster landsat_823.tif geor:scott/tiger@orcl,landsat,raster-co DESCRIPTION=“(ID号,名称VARCHAR2(40),raster MDSYS.SDO_georaster)”-co INSERT=“值(1,'Scene 823',SDO_geor.INIT())”

  • INSERT :一个简单的SQL insert/values子句,用于通知驱动程序在表中插入新行时要填充哪些值,例如:

%gdal_translate-of georaster landsat_825.tif geor:scott/tiger@orcl,landsat,raster-co INSERT=“(ID,raster)值(2,SDO_geor.INIT())”
  • COMPRESS :压缩选项,JPEG-F、JP2-F、DEFLATE或NONE。JPEG-F选项是有损的,这意味着原始像素值会更改。如果JP2_质量=100,则JP2-F压缩是无损的。

  • GENPYRAMID :将geoster对象加载到数据库后生成棱锥体。该参数的内容必须是选择NN(最近邻)、双线性、双二次、三次、平均4或平均16的重采样方法。如果没有通知GENPYRLEVELS,PL/SQL函数sdo_geor.generatePyramid将计算要生成的级别数。

  • GENPYRLEVELS :定义要生成的棱锥体层数。如果未通知GENPYRAMID,将应用重采样方法NN(最近邻)。

  • QUALITY :JPEG的质量压缩选项,范围从0到100。默认值为75。

  • JP2_QUALITY=float_value,float_value,... 仅当COMPRESS=JP2-f时:0到100之间的百分比。值50表示文件的大小是未压缩数据的一半,33表示1/3等。。默认值为25(除非数据集由带颜色表的单个带组成,在这种情况下,默认质量为100)。

  • JP2_REVERSIBLE=YES/NO 仅当COMPRESS=JP2-f:YES表示使用可逆的5x3整数滤波器,而不使用不可逆的DWT 9-7。默认为“否”(除非数据集由带颜色表的单个带组成,在这种情况下使用可逆过滤器)。

  • JP2_RESOLUTIONS=int_value 仅当COMPRESS=JP2-f时:分辨率级别数。选择默认值时,磁贴的最小概览不大于128x128。

  • JP2_BLOCKXSIZE=int_value 仅当COMPRESS=JP2-f:Tile width时。默认为1024。

  • JP2_BLOCKYSIZE=int_value 仅当COMPRESS=JP2-f:Tile height时。默认为1024。

  • JP2_PROGRESSION=LRCP/RLCP/RPCL/PCRL/CPRL 仅当COMPRESS=JP2-f:progression order时。默认为LRCP。

  • NBITS :子字节数据类型,选项:1、2或4。

  • SPATIALEXTENT: Generate Spatial Extents. The default for that options is TRUE, that means that this option only need to be informed to force the Spatial Extent to remain as NULL. If EXTENTSRID is not informed the Spatial Extent geometry will be generated with the same SRID as the GeoRaster object.

  • EXTENTSRID: SRID code to be used on the Spatial Extent geometry. If the table/column has already a spatial index, the value informed should be the same as the SRID on the Spatial Extents of the other existing GeoRaster objects, on which the spatial index is built.

  • OBJECTTABLE :若要将RDT创建为SDO_RASTER object inform TRUE,则默认值为FALSE,RDT将创建为常规关系表。这不适用于早于11的Oracle版本。

导入GeoRaster

在将raster导入GeoRaster对象的过程中,可以为驱动程序提供一个简单的SQL表定义和一个SQL insert/values子句,以通知驱动程序要创建的表和要添加到新创建的行的值。下面的示例就是这样做的:

% gdal_translate -of georaster Newpor.tif georaster:scott/tiger,,landsat,scene \
  -co "DESCRIPTION=(ID NUMBER, SITE VARCHAR2(45), SCENE MDSYS.SDO_GEORASTER)" \
  -co "INSERT=VALUES(1,'West fields', SDO_GEOR.INIT())" \
  -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -co "BLOCKBSIZE=3" \
  -co "INTERLEAVE=PIXEL" -co "COMPRESS=JPEG-F"

注意,create选项描述需要通知表名(粗体)。列名(带下划线)应与说明匹配:

% gdal_translate -of georaster landsat_1.tif georaster:scott/tiger,,landsat,scene \
  -co "DESCRIPTION=(ID NUMBER, SITE VARCHAR2(45), SCENE MDSYS.SDO_GEORASTER)" \
  -co "INSERT=VALUES(1,'West fields', SDO_GEOR.INIT())"

如果存在“landsat”表,则忽略“DESCRIPTION”选项。驱动程序每次运行gdal_translate只能更新一个GeoRaster列。Oracle在初始化SDO_GeoRaster对象期间为RDT和RID创建默认名称和值,但用户也可以指定自己选择的名称和值。

% gdal_translate -of georaster landsat_1.tif georaster:scott/tiger,,landsat,scene \
  -co "INSERT=VALUES(10,'Main building', SDO_GEOR.INIT('RDT', 10))"

如果没有提供有关存储栅格的位置的信息,驱动程序将创建(如果还不存在)名为GDAL_IMPORT的默认表,其中只有一个名为raster的geoster列和一个名为GDAL_RDT的表作为RDT,则服务器将自动提供RID,例如:

%gdal_translate-of georaster input.tif“geor:scott/tiger@dbdemo”

导出GeoRaster

GeoRaster可以通过Where子句或一对RDT&RID来标识:
%gdalúu translate-gtiff的geor:scott/tiger@dbdemo,landsat,scene,id=54 output.tif%gdal戋u translate-gtiff的geor:scott/tiger@dbdemo,st戋rdt戋1130 output.tif

跨架构访问

只要授予用户完全访问GeoRaster表和栅格数据表的权限,例如:
%sqlplus scott/tiger SQL>grant select,insert,update,delete on gdal_import to spock;SQL>grant select,insert,update,delete on gdal_rdt to spock;
用户可以通过通知架构名称从另一个用户/架构中提取和加载GeoRaster,如下所示:
浏览:
% gdalinfo geor:spock/lion@orcl,scott. %gdalinfo geor:spock/lion@orcl,scott.gdal_import,raster,"t.raster.rasterid > 100"
%gdalinfo geor:spock/lion@orcl,scott.gdal廑u import,raster,t.raster.rasterid=101正在提取:
%gdal廑u translate geo:spock/lion@orcl,scott.gdal廑u import,raster,t.raster.rasterid=101out.tif%gdal廑u translate geo:spock/lion@orcl,gdal廑dt,101 out.tif注意:在上面的示例中,只要用户被授予对两个表的完全访问权限,通过rdt/RID访问就不需要schame名称。
加载:
% gdal_translate -of georaster input.tifgeor:spock/lion@orcl,scott. % gdal_translate -of georaster input.tif geor:spock/lion@orcl,scott.cities,image \   -co INSERT="(1,'Rio de Janeiro',sdo_geor.init('cities_rdt'))"

GeoRaster的一般用途

GeoRaster可以在任何GDAL命令行工具中使用所有可用选项。像图像子集提取或重新投影:
% gdal_translate -of gtiff geor:scott/tiger@dbdemo,landsat,scene,id=54 output.tif \   -srcwin 0 0 800 600 % gdalwarp -of png geor:scott/tiger@dbdemo,st_rdt_1,130 output.png -t_srs EPSG:9000913. 两个不同的geoster可以用作同一操作的输入和输出:
% gdal_translate -of georaster geor:scott/tiger@dbdemo,landsat,scene,id=54 geor:scott/tiger@proj1,projview,image -co INSERT="VALUES (102, SDO_GEOR.INIT())". 理论上,使用GDAL的应用程序可以像任何其他格式一样从GeoRaster进行读写,但大多数应用程序更倾向于尝试访问文件系统上的文件,因此一种替代方法是创建VRT来表示GeoRaster描述,例如:
%gdalúu translate-of VRT geor:scott/tiger@dbdemo,landsat,scene,id=54 view戋u 54.VRT%openenv view戋u 54.VRT