ISIS3——美国地质勘探局天体地质ISIS立方体(第3版)
司机简称
ISIS3标准
Driver built-in by default
This driver is built-in by default
ISIS3是美国地质勘探局行星制图小组用来存储和分发行星图像数据的一种格式。GDAL提供对ISIS3格式图像数据的读取/创建/更新访问。
ISIS3文件的扩展名通常为.cub,有时还有一个相关的.lbl(label)文件。当.lbl文件存在时,它应该用作数据集名称,而不是.cub文件。自GDAL 2.2以来,驱动程序还支持存储在单独GeoTIFF文件中的图像。
除了支持大多数ISIS3图像配置外,此驱动程序还读取地理参考和坐标系信息以及选定的其他标题元数据。
从GDAL 2.2开始,每个源波段都连接一个屏蔽带。当像素值为空值或仪器上的低/高/处理饱和值之一时,此遮罩带的值为0;当像素值有效时,此遮罩带的值为255。
该驱动程序的实施得到了美国地质调查局的支持。
ISIS3是一系列相关格式的一部分,包括PDS和ISIS2。
驱动程序功能
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.)
元数据
从GDAL 2.2开始,可以在JSon:ISIS3元数据域中以JSon序列化内容的形式检索ISIS3标签。
例如:
$ python
from osgeo import gdal
ds = gdal.Open('../autotest/gdrivers/data/isis3_detached.lbl')
print(ds.GetMetadata_List('json:ISIS3')[0])
{
"IsisCube":{
"_type":"object",
"Core":{
"_type":"object",
"StartByte":1,
"^Core":"isis3_detached.cub",
"Format":"BandSequential",
"Dimensions":{
"_type":"group",
"Samples":317,
"Lines":30,
"Bands":1
},
"Pixels":{
"_type":"group",
"Type":"UnsignedByte",
"ByteOrder":"Lsb",
"Base":0.000000,
"Multiplier":1.000000
}
},
"Instrument":{
"_type":"group",
"TargetName":"Mars"
},
"BandBin":{
"_type":"group",
"Center":1.000000,
"OriginalBand":1
},
"Mapping":{
"_type":"group",
"ProjectionName":"Equirectangular",
"CenterLongitude":184.412994,
"TargetName":"Mars",
"EquatorialRadius":{
"value":3396190.000000,
"unit":"meters"
},
"PolarRadius":{
"value":3376200.000000,
"unit":"meters"
},
"LatitudeType":"Planetographic",
"LongitudeDirection":"PositiveWest",
"LongitudeDomain":360,
"MinimumLatitude":-14.822815,
"MaximumLatitude":-14.727503,
"MinimumLongitude":184.441132,
"MaximumLongitude":184.496521,
"UpperLeftCornerX":-4766.964984,
"UpperLeftCornerY":-872623.628822,
"PixelResolution":{
"value":10.102500,
"unit":"meters\/pixel"
},
"Scale":{
"value":5864.945312,
"unit":"pixels\/degree"
},
"CenterLatitude":-15.147000,
"CenterLatitudeRadius":3394813.857978
}
},
"Label":{
"_type":"object",
"Bytes":65536,
},
"History":{
"_type":"object",
"Name":"IsisCube",
"StartByte":1,
"Bytes":957,
"^History":"r0200357_10m_Jul20_o_i3_detatched.History.IsisCube"
},
"OriginalLabel":{
"_type":"object",
"Name":"IsisCube",
"StartByte":1,
"Bytes":2482,
"^OriginalLabel":"r0200357_10m_Jul20_o_i3_detatched.OriginalLabel.IsisCube"
}
}
或
$ gdalinfo -json ../autotest/gdrivers/data/isis3_detached.lbl -mdd all
创建时,源模板标签可以传递到“json:ISIS3”元数据域中的SetMetadata()接口。
创建支持
从GDAL 2.2开始,ISIS3驱动程序支持更新现有数据集的映像,通过CreateCopy()和Create()接口创建新的数据集。
当使用CreateCopy()、gdal_translate或gdalwarp时,在进行ISIS3到ISIS3的转换时,会尽量保留原始标签。使用USE_SRC_LABEL=NO creation选项可以禁用此选项。
可用的创建选项包括:
DATA_LOCATION =标签/外部/GEOTIFF。指定像素数据的位置。默认值是LABEL,即图像紧跟标签。如果使用外部文件,则将图像放在原始文件中,其文件名是扩展名为.cub的主文件名。如果使用GEOTIFF,图像将放在单独的GEOTIFF文件中,其文件名是扩展名为.tif的主文件名。
GEOTIFF_AS_REGULAR_EXTERNAL=YES/NO. Whether the GeoTIFF file, if uncompressed, should be registered as a regular raw file. Defaults to YES, so as to maximize the compatibility with earlier version of the ISIS3 driver.
GEOTIFF_OPTIONS =字符串。要转发到GeoTIFF驱动程序的KEY=VALUE元组的逗号分隔列表。e、 g.GEOTIFF_OPTIONS=COMPRESS=LZW。
EXTERNAL_FILENAME =文件名。重写默认外部文件名。仅适用于数据位置=外部或GEOTIFF。
TILED =是/否。是否应平铺像素数据。默认为否(即波段顺序组织)。
BLOCKXSIZE =整数值。平铺宽度(像素)。仅当平铺=是时使用。默认为256。
BLOCKYSIZE =整数值。平铺高度(像素)。仅当平铺=是时使用。默认为256。
COMMENT =字符串。要添加到标签中的注释。
LATITUDE_TYPE =平面中心/平面图。Mapping.LatitudeType的值。默认为Planetocentric。如果指定了,并且使用SRC_映射有效,则将考虑此情况以重写源LatitudeType。
LONGITUDE_DIRECTION =阳性预测/阳性预测。Mapping.LongitudeDirection的值。默认为PositiveEast。如果指定,并且使用SRC_映射有效,则将考虑此情况以重写源LongitudeDirection。
TARGET_NAME =字符串。Mapping.TargetName的值。这通常是从SRS基准名称推导出来的。如果指定了,并且USE_SRC_MAPPING有效,则将考虑此情况以重写源TargetName。
FORCE_360 =是/否。是否在 [0,360个] 范围。默认为否。
WRITE_BOUNDING_DEGREES =是/否。是否写入最小/最大长度/纬度值。默认为“是”。
BOUNDING_DEGREES =min_long、min_lat、max_long、max_lat。手动设置边界框(值不会被经度方向或强制360选项修改)。
USE_SRC_LABEL =是/否。是否在ISIS3到ISIS3的转换中使用源标签。默认为“是”。
USE_SRC_MAPPING =是/否。是否使用从ISIS3中的源标签到ISIS3转换的映射组。默认为“否”(也就是说,将从新的数据集geotransform和projection创建映射组的内容)。仅当USE_SRC_LABEL=YES时使用
USE_SRC_HISTORY =是/否。是否使用ISIS3到ISIS3转换中源历史对象指向的内容,并将其写入新数据集。默认为“是”。仅当USE_SRC_LABEL=YES时使用。如果将ADD_GDAL_HISTORY和USE_SRC_HISTORY设置为YES(或unspecified),则将在现有历史中附加一个新的历史部分。
ADD_GDAL_HISTORY =是/否。是否将ISIS3中history对象指向的内容中的GDAL特定历史添加到ISIS3转换。默认为“是”。仅当USE_SRC_LABEL=YES时使用。如果ADD_GDAL_HISTORY和USE_SRC_HISTORY设置为YES(或unspecified),则新的历史部分将附加到现有历史中。当ADD_GDAL_HISTORY=YES时,历史通常由当前GDAL版本、二进制名称和路径、主机名、用户名以及源和目标文件名组成。可以通过指定GDAL_HISTORY选项完全覆盖它。
GDAL_HISTORY =字符串。手动定义的GDAL历史记录。必须格式化为ISIS3 PDL。如果未指定,则自动合成。仅当ADD_GDAL_HISTORY=YES(或未指定)时使用。
实例
如何使用GDAL Python在修改IsisCube.Mapping group的参数时创建源ISIS3数据集到另一个ISIS3数据集的副本:
import json
from osgeo import gdal
src_ds = gdal.Open('in.lbl')
# Load source label as JSon
label = json.loads( src_ds.GetMetadata_List('json:ISIS3')[0] )
# Update parameter
label["IsisCube"]["Mapping"]["TargetName"] = "Moon"
# Instantiate new raster
# Note the USE_SRC_MAPPING=YES creation option, since we modified the
# IsisCube.Mapping section, which otherwise is completely rewritten from
# the geotransform and projection attached to the output dataset.
out_ds = gdal.GetDriverByName('ISIS3').Create('out.lbl',
src_ds.RasterXSize,
src_ds.RasterYSize,
src_ds.RasterCount,
src_ds.GetRasterBand(1).DataType,
options = ['USE_SRC_MAPPING=YES'])
# Attach the modified label
out_ds.SetMetadata( [json.dumps(label)], 'json:ISIS3' )
# Copy imagery (assumes that each band fits into memory, otherwise a line-by
# line or block-per-block strategy would be more appropriate )
for i in range(src_ds.RasterCount):
out_ds.GetRasterBand(1).WriteRaster( 0, 0,
src_ds.RasterXSize,
src_ds.RasterYSize,
src_ds.GetRasterBand(1).ReadRaster() )
out_ds = None
src_ds = None
也见
Implemented as
gdal/frmts/pds/isis3dataset.cpp
.