<html><body><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000"><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">Hi</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">For quite some time now I've been wresteling with a problem concerning projections. I was wondering if the experts on this forum/mailinglist could be of any help, since (let's face it) the material is quite frankly over my head.</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">The short story is that I have got an hdf5 radar image, which contains an x-y grid of pixelvalues and I have to place it on a google map. Already there's a problem because the data is purely an x-y grid and google maps uses the EPSG 3857projection. The proj4 string provided in the hdf5 file is one of the RD-coordinate system, a system used in the Netherlands.</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">The rest of the information I can find is listed here</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><p>cal_data_count = 0<br>cal_method = None<br>cal_stations_count = 0<br>composite_count = 288<br>declutter_history = 0.1<br>declutter_size = 4.0<br>fill_value = -9999<br>grid_extent = -110000,390000,700000,210000<br>grid_projection = PROJCS["unnamed",GEOGCS["Bessel 1841",DATUM["unknown",SPHEROID["bessel",6377397.155,299.1528128],TOWGS84[565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.999908],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],UNIT["Meter",1]]<br>grid_size = 500,490<br>locations = -7384.887748796755,358296.0214553905,140661.4380856066,456959.9690822229,115509.8972636278,551852.1442379927,263965.23587302887,595812.4921183779,264883.22682543105,380702.99609763426,238048.54530185566,236013.44861746818<br>method = weighted lowest altitudes<br>radars = JAB,NL60,NL61,emd,ess,nhb<br>ranges = 298.75,239.5,239.5,127.5,127.5,127.5<br>timestamp_first_composite = 20151211080000<br>timestamp_last_composite = 20151212075500</p><p>map_projection (6024, 2)<br>Group size = 0<br>Number of attributes = 3<br>projection_indication = Y<br>projection_name = STEREOGRAPHIC<br>projection_proj4_params = +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs</p><p>geographic (5200, 2)<br>Group size = 1<br>Number of attributes = 8<br>geo_dim_pixel = KM,KM<br>geo_number_columns = 500<br>geo_number_rows = 490<br>geo_par_pixel = X,Y<br>geo_pixel_def = CENTRE<br>geo_pixel_size_x = 1.0<br>geo_pixel_size_y = -1.0<br>geo_product_corners = -110000,210000,-110000,700000,390000,700000,390000,210000</p></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">Right now I am using a complex code to rewrite each of the pixels to lat/lon &amp; I plot them with matplotlib (python) on a mpl basemap without landcontours, coast-contours so I have an image on an mpl-basemap, but as said, without the countrycontours &amp; such. The projecction used for the Basemap is "mercator". The result gives the desired radarimage &amp; seems to match the locations... so far so good but with the python mapping of pixels to lat/lons...</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">I then run the output (a png file) through gdal to tile it, &amp; warp it to the EPSG 3857 projection (Gmaps). When turning on the country-contours to check the result, the result is not correct, although it comes close to what it should be.</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">http://postimg.org/image/ly01obb1n/</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">I am starting to wonder if there's another way I can make this work, perhaps without the use of matplotlib python? Eg, going from the standard x-y grid Hdf5 data straight to a warp using gdal or whichever way possible. I have run out of ideas &amp; the information I can find to help me get passed this is really confusing.</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">I am looking forward to the reply of the masters in this forum.</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">Best regards</div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;"><br></div><div style="font-size: 13.3333px; background-color: #fdfdfd;" data-mce-style="font-size: 13.3333px; background-color: #fdfdfd;">D.</div></div></body></html>