我正在尝试使用gdalwarp将对地静止映射为Lambert保形。我的输入数据在netcdf中,并且在地理坐标(度)中,我想将重新映射的数据输出到netcdf。我为输入的netcdf数据创建了一个相应的vrt文件。Gdalwarp将输出netcdf文件,但输出数据全为零,并且我收到以下错误:
Creating output file that is 5120P x 5120L.
Processing input file netcdf.vrt.
ERROR 1: Too many points (441 out of 441) failed to transform,
unable to compute output bounds.
Warning 1: Unable to compute source region for output window 0,0,5120,5120, skipping.
0...10...20...30...40...50...60...70...80...90...100 - done.
我尝试了以下命令:
/usr/bin/gdalwarp -s_srs "+proj=geos +h=35785831 +lon_0=-75 +x_0=-0.151844 +y_0=0.151844 +a=6378140 +b=6356754.99999591 +units=degrees +no_defs" -t_srs "+proj=lcc +ellps=clrk66 +a=6378137 +b=6378137 +e=0.0818191910435 +lat_0=24.9999 +lon_0=-95 +lat_1=24.9999 +lat_ts=25.0001 +units=meters +no_defs" -te -1952976.3246 -828316.5944 3248431.6754 4373091.4056 -of netCDF -geoloc -overwrite -r bilinear -ts 5120 5120 netcdf.vrt out.nc
gdalwarp可以从地理坐标重新映射到投影吗?还是我需要先将地理信息转换为投影信息?另外,gdalwarp可以直接从netcdf读取投影信息吗?还是需要先写入.vrt?
这是gdalinfo从输入文件输出的内容:(这是CLASS的GOES 13文件)
Size is 512, 512
Coordinate System is `'
Metadata:
NC_GLOBAL#Conventions=CF-1.4
NC_GLOBAL#Satellite Sensor=G-13 IMG
NC_GLOBAL#Source=McIDAS Area File
Subdatasets:
SUBDATASET_1_NAME=NETCDF:"goes13.2013.100.165517.BAND_04.nc":auditTrail
SUBDATASET_1_DESC=[3x80] auditTrail (8-bit character)
SUBDATASET_2_NAME=NETCDF:"goes13.2013.100.165517.BAND_04.nc":data
SUBDATASET_2_DESC=[1x665x2036] data (32-bit floating-point)
SUBDATASET_3_NAME=NETCDF:"goes13.2013.100.165517.BAND_04.nc":lat
SUBDATASET_3_DESC=[665x2036] lat (32-bit floating-point)
SUBDATASET_4_NAME=NETCDF:"goes13.2013.100.165517.BAND_04.nc":lon
SUBDATASET_4_DESC=[665x2036] lon (32-bit floating-point)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
以及有关数据变量的其他gdal信息:
Driver: netCDF/Network Common Data Format
Files: goes13.2013.100.174518.BAND_04.nc
Size is 2036, 665
Coordinate System is `'
Metadata:
data#coordinates=lon lat
data#long_name=0-255 Brightness Temperature
data#type=VISR
NC_GLOBAL#Conventions=CF-1.4
NC_GLOBAL#Satellite Sensor=G-13 IMG
NC_GLOBAL#Source=McIDAS Area File
NETCDF_DIM_EXTRA={time}
NETCDF_DIM_time_DEF={1,4}
NETCDF_DIM_time_VALUES=1365615900
time#long_name=seconds since 1970-1-1 0:0:0
time#units=seconds since 1970-1-1 0:0:0
Geolocation:
LINE_OFFSET=0
LINE_STEP=1
PIXEL_OFFSET=0
PIXEL_STEP=1
SRS=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
X_BAND=1
X_DATASET=NETCDF:"goes13.2013.100.174518.BAND_04.nc":lon
Y_BAND=1
Y_DATASET=NETCDF:"goes13.2013.100.174518.BAND_04.nc":lat
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 665.0)
Upper Right ( 2036.0, 0.0)
Lower Right ( 2036.0, 665.0)
Center ( 1018.0, 332.5)
Band 1 Block=2036x1 Type=Float32, ColorInterp=Undefined
NoData Value=9.96920996838686905e+36
Metadata:
coordinates=lon lat
long_name=0-255 Brightness Temperature
NETCDF_DIM_time=1365615900
NETCDF_VARNAME=data
type=VISR
任何帮助将不胜感激!
1
地理投影不会使用度数;试试米。您在哪里获得+ x_0 / + y_0值?基于gdalinfo,我完全不确定输入栅格是否已地理定位。在目标srs中,您具有+ a = + b,这是一个球体,但也设置了+ e。但是,+ ellps用于完全不同的椭球。各种+ lat值似乎也很奇怪。lat_ts是实际比例尺的lat,因此与lat_1一样是标准的平行度。
—
mkennedy
谢谢。我会尝试使用仪表。我从GOES定义中获得了x_0和y_0(比例和偏移量),尽管这些不是+ proj = geos的必需输入,因此我可以尝试将其取出。并感谢您指出+ e椭球加法t_srs的lat定义适用于AWIPS朗伯定义(特定的输出大小)。我会将针对特定数据变量的gdal信息吐出来的内容添加到问题帖子中(太久了,无法发表评论)
—
Katie J
本页描述了我所指的AWIPS定义:nws.noaa.gov/noaaport/html/icdtb48_2.html(第一个是我尝试重新映射到的Lambert)
—
Katie J
嗯,所以说纬度/经度WGS84,但是报告的角坐标让我担心,因为它们只是原始单元格值。LCC是切线情况-单个标准平行/原点纬度均为25N。我没有使用任何这些数据,因此我只关注元数据信息。
—
mkennedy