【发布时间】:2016-03-20 03:16:35
【问题描述】:
我使用 gdal(光栅虚拟格式)将一堆 .tiff 文件转换为 .vrt
gdalbuildvrt -separate testvrt.vrt data/*.tif
是否可以从 .vrt 创建时间序列 NetCDF 文件!?
testvrt.vrt
<VRTDataset rasterXSize="8000" rasterYSize="8000">
<SRS>PROJCS["Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["latitude_of_center",8.5],PARAMETER["longitude_of_center",21.5],PARAMETER["false_easting",5621452.01998],PARAMETER["false_northing",5990638.42298],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]</SRS>
<GeoTransform> 6.0000000000000000e+06, 7.5000000000000000e+01, 0.0000000000000000e+00, 6.0000000000000000e+06, 0.0000000000000000e+00, -7.5000000000000000e+01</GeoTransform>
<VRTRasterBand dataType="Int16" band="1">
<NoDataValue>-9.99900000000000E+03</NoDataValue>
<ComplexSource>
<SourceFilename relativeToVRT="1">data_sample/R20060111_075725___SIG0__ASAWS___M1VVD_TUW_SGRT15A00_AF075M_E060N054T6.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="8000" RasterYSize="8000" DataType="Int16" BlockXSize="8000" BlockYSize="1" />
<SrcRect xOff="0" yOff="0" xSize="8000" ySize="8000" />
<DstRect xOff="0" yOff="0" xSize="8000" ySize="8000" />
<NODATA>-9999</NODATA>
</ComplexSource>
</VRTRasterBand>
<VRTRasterBand dataType="Int16" band="2">
<NoDataValue>-9.99900000000000E+03</NoDataValue>
<ComplexSource>
<SourceFilename relativeToVRT="1">data_sample/R20060114_080443___SIG0__ASAWS___M1VVD_TUW_SGRT15A00_AF075M_E060N054T6.tif</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="8000" RasterYSize="8000" DataType="Int16" BlockXSize="8000" BlockYSize="1" />
<SrcRect xOff="0" yOff="0" xSize="8000" ySize="8000" />
<DstRect xOff="0" yOff="0" xSize="8000" ySize="8000" />
<NODATA>-9999</NODATA>
</ComplexSource>
</VRTRasterBand>
...
如何将python中的vrt文件创建为NetCDF4格式的栅格时间序列?
【问题讨论】:
-
你试过
gdal_translate -of NetCDF testvrt.vrt testncdf.nc吗? -
@Kersten
gdal_translate的问题是时间序列,你没有得到时间维度。 -
时间维度在不同的bands/layers中表示,如
gdalbuildvrt -separate调用。您是说不能将多层数据集转换为 NetCDF? -
@Kersten 我使用了
gdalbuildvrt -separate,如上所示。是的,这是个问题!