[gdal-dev] Convert precipitation accumulations from HDF5 to GeoTiff
Paul Meems
bontepaarden at gmail.com
Tue Dec 13 01:44:24 PST 2016
I'm trying to use the precipitation accumulations from our national weather
agency: https://data.knmi.nl/datasets/radar_tar_corr_accum_03h/2.0
The data is in HDF5 with two subsets.
I only need one subset and I need the data in WGS84.
I'm using GDAL v2.2 from GisInternals.com
I tried using GDALWarp but then I get an error about missing the
transformation matrix.
Using Google I figured out I need to do GDALTranslate first to set the
georeferenced bounds.
This is the result of GDALInfo:
Driver: HDF5/Hierarchical Data Format Release 5
Files: RAD_NL25_RAC_03H_201612041200.h5
Size is 512, 512
Coordinate System is `'
Metadata:
geographic_geo_column_offset=0
geographic_geo_dim_pixel=KM,KM
geographic_geo_number_columns=700
geographic_geo_number_rows=765
geographic_geo_par_pixel=X,Y
geographic_geo_pixel_def=LU
geographic_geo_pixel_size_x=1.0000013
geographic_geo_pixel_size_y=-1.0000055
geographic_geo_product_corners=0 49.362053 0 55.973602 10.856429
55.388977 9.0092793 48.895298
geographic_geo_row_offset=3649.9792
geographic_map_projection_projection_indication=Y
geographic_map_projection_projection_name=STEREOGRAPHIC
geographic_map_projection_projection_proj4_params=+proj=stere +lat_0=90
+lon_0=0 +lat_ts=60 +a=6378.14 +b=6356.75 +x_0=0 y_0=0
image1_calibration_calibration_flag=Y
image1_calibration_calibration_formulas=GEO = 0.010000 * PV + 0.000000
image1_calibration_calibration_missing_data=0
image1_calibration_calibration_out_of_image=65535
image1_image_bytes_per_pixel=2
image1_image_data_CLASS=IMAGE
image1_image_data_VERSION=1.2
image1_image_geo_parameter=PRECIP_[MM]
image1_image_number_accumulated_products=37
image1_image_product_name=RAD_NL25_RAC_H1.5_03H
image1_image_size=535500
image1_statistics_stat_max_value=9.96
image1_statistics_stat_min_value=0
image2_calibration_calibration_flag=Y
image2_calibration_calibration_formulas=GEO=0.001*PV+-32.768
image2_calibration_calibration_missing_data=0
image2_calibration_calibration_out_of_image=65535
image2_image_bytes_per_pixel=2
image2_image_data_CLASS=IMAGE
image2_image_data_VERSION=1.2
image2_image_geo_parameter=ADJUSTMENT_FACTOR_[DB]
image2_image_number_accumulated_products=37
image2_image_product_name=RAD_NL25_RAC_H1.5_03H
image2_image_size=535500
image2_statistics_stat_max_value=0
image2_statistics_stat_min_value=0
overview_hdftag_version_number=3.6
overview_number_image_groups=2
overview_number_radar_groups=1
overview_number_satellite_groups=0
overview_number_station_groups=0
overview_product_datetime_end=04-DEC-2016;12:00:00.000
overview_product_datetime_start=04-DEC-2016;09:00:00.000
overview_product_group_name=RAD_NL25_RAC_03H
overview_products_missing=NA
radar1_radar_adjustment=F=-0.00dB
radar1_radar_location=5.17834 52.101681
radar1_radar_name=DeBilt
Subdatasets:
SUBDATASET_1_NAME=HDF5:"RAD_NL25_RAC_03H_201612041200.h5"://image1/image_data
SUBDATASET_1_DESC=[765x700] //image1/image_data (16-bit unsigned integer)
SUBDATASET_2_NAME=HDF5:"RAD_NL25_RAC_03H_201612041200.h5"://image2/image_data
SUBDATASET_2_DESC=[765x700] //image2/image_data (16-bit unsigned integer)
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)
This is my GDALTranslate command, the projectionstring and a_ullr come from
the meta data:
gdal_translate -of GTiff -a_nodata 65535 -a_srs "+proj=stere +lat_0=90
+lon_0=0 +lat_ts=60 +a=6378.14 +b=6356.75 +x_0=0 y_0=0" -a_ullr 0
55.973602 9.0092793 48.895298
"HDF5:\"RAD_NL25_RAC_03H_201612041200.h5\"://image1/image_data"
"test-translate.tif"
This is my GDALWarp command:
gdalwarp -overwrite -s_srs "+proj=stere +lat_0=90 +lon_0=0 +lat_ts=60
+a=6378.14 +b=6356.75 +x_0=0 y_0=0" -t_srs EPSG:3857 -dstnodata 65535
-of GTiff "test-translate.tif" "test-warp.tif"
The warped tif is not where I expect it to be.
I expect a origin around 52 en 5 degrees (The Netherlands)
I'm getting: Origin = (169.559973821725920,89.530840368222059)
I've checked with the data provider and the projectionstring is correct.
What am I doing wrong?
Thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161213/dcab5e06/attachment.html>
More information about the gdal-dev
mailing list