HDF5 is a binary self-describing container for scientific data with a filesystem inside the file: groups (folders), datasets (arrays), attributes (metadata). On osm2cdr the .h5 export works honestly like this: each OSM layer becomes an HDF5 group holding longitude and latitude datasets (feature centroids) plus one dataset per attribute field as strings. It is a self-describing container of coordinates and attributes, not a gridded scoring raster or DEM cube — the exporter does not compute such layers. Written via h5py; readable in h5py, HDFView, MATLAB, R, IDL.
ویژگیهای کلیدی

دربارهٔ قالب HDF5
HDF5 is a binary container for scientific data laid out like a file system inside a single file: groups act as folders, datasets as arrays, attributes as metadata. The format is maintained by the HDF Group, it is read by Python, MATLAB, R and IDL, and it is designed so that data stays understandable without accompanying documentation.
OpenStreetMap maps are exported to .h5 when the next step is a scientific or engineering pipeline: the computation works on arrays, and one self-describing file is wanted instead of a pile of shapefiles. It is especially convenient when your own measurements already live in that same file — HDF5 happily holds heterogeneous data in one hierarchy.
Inside there is one group per OSM layer. Each group holds the longitude and latitude datasets with feature centroids and one string dataset per attribute field; coordinates are written as float64, attributes as variable-length UTF-8 strings. Metadata is written at the root and in the groups: title, source, extent, feature count, geometry type.
Honestly about the limitations: this is a container of coordinates and attributes, not a raster cube. Geometry is reduced to centroids — there are no building outlines or road lines in the file, and the exporter does not compute analytical grids (density, scores, terrain). Writing goes through h5py, and if the library is unavailable, fallbacks kick in down to gzipped JSON with the same logical structure.
چه برنامهای فایلهای HDF5 را باز میکند
برنامهها و نرمافزارهای زیر میتوانند فایلهای HDF5 (Hierarchical Data Format v5) (.h5) صادرشده از OSM2CDR را باز و ویرایش کنند و با آنها کار کنند:
Format specifications
- Open standard
- 2D only
- Lossless (no quality loss)
- Stores feature attributes
- Output: 1 file
- One HDF5 group per layer holding lon/lat centroid datasets plus one string dataset per attribute; a self-describing container, not a gridded raster cube. Fallback to gzip-JSON.
چه کسانی از نقشههای HDF5 استفاده میکنند
چگونه HDF5 را خروجی بگیریم
نحوه باز کردن پس از خروجی
- HDFView (free, HDF Group) — open the file and look through the tree of groups and datasets, the values and the attributes, without programming anything.
- Python — h5py.File("export.h5"); a call to visit(print) shows the whole hierarchy, and f["buildings"]["longitude"][:] returns the array of coordinates.
- pandas — the datasets of one group have equal length, so the longitude, latitude and attribute columns fold into a DataFrame directly.
- MATLAB and R — the h5read and h5info functions in MATLAB and the rhdf5 package in R read the file with no extra drivers.
- Moving into GIS — a point layer is easy to assemble from the centroids: save the coordinates to CSV and add it in QGIS as a delimited text layer with coordinates.
نقشههای محبوب در HDF5
خروجی نقشهٔ HDF5 (Hierarchical Data Format v5) را دریافت کنید
نقشههای حرفهای HDF5 را از OpenStreetMap دانلود کنید. تولید آنی برای هر ناحیه.