PyHDF is a Python interface to the HDF4external library. It covers most functions of Scientific Data Sets (SD API), Vdatas (VS API), and Vgroups (V API). PyHDF is not merely a wrapper of HDF4 C API. PyHDF exploits Python features such as the OOP concept and exception handling to make it more convenient.
Questions tagged [pyhdf]
27 questions
4
votes
4 answers
HDF + pandas: how can I use a where mask with multindex?
I would like to select from a HUGE hdf5 a subset of the data, day by day. It would be perfect to use a where mask, but I can't make it work with a multiindex (since I have to have a where with two conditions). can't use a where mask with a…

marcodena
- 550
- 2
- 5
- 15
3
votes
0 answers
pyhdf links in PyPI going to server that is offline? (with workaround)
I am trying to use pip to add the package pyhdf in python3.
I'm working in a virtualenv and have the prereq packages there:
% pip list
numpy (1.9.2)
pip (7.0.3)
requests (2.7.0)
setuptools (17.0)
wheel (0.24.0)
If I ask pip to get the…

user312543
- 31
- 3
2
votes
1 answer
How i create lat and lon in my MODIS file with python3
I have some accounts to do for a certain latitude and longitude, but in MODIS I have neither latitude nor longitude. I roamed the internet to create latitude and longitude and then after that calculate what is needed in my work. I was told that the…

Lucas Fagundes
- 185
- 3
- 14
2
votes
1 answer
Install pyhdf error: hdf.h: No such file or directory
I want to install pyhdf to read hdf4 files in python on ubuntu, and I downloaded from https://sourceforge.net/projects/pysclint/files/pyhdf/,pyhdf-0.8.3.tar.gz, but when I run python setup.py install on ubuntu, it shows
running install
running…

Jiao Li
- 323
- 1
- 5
- 13
2
votes
2 answers
How to merge two or three 3D arrays in python?
I have time series data in hdf format. I use the code below to read the data from the hdf files. Now I tried to join data on the basis of latitude and longitude for those data having same jdn (julian day number). Data with same julian day number…

bikuser
- 2,013
- 4
- 33
- 57
2
votes
3 answers
Fields not found when using pyhdf
I am currently working with HDF files (version 4), and I use the pyhdf module (http://hdfeos.org/software/pyhdf.php).
When I open one of my HDF files in MATLAB using the nctoolbox, I get the following variables:
>> a =…

Holt
- 36,600
- 7
- 92
- 139
1
vote
1 answer
How to create a grid of pixel coordinates from the corners of a MODIS tile?
I have an HDF4 file whose StructMetadata.0 contains the following attributes:
UpperLeftPointMtrs = (-20015109.354000,1111950.519667)
LowerRightMtrs = (-18903158.834333,0.000000)
These are X and Y distances in meters of the MODIS Tile for L3…

MNK
- 634
- 4
- 18
1
vote
2 answers
How to Install PyHDF package on Google Colab?
I tried !pip install pyhdf,
Referred this too. http://stream.princeton.edu/AWCM/LIBRARIES/pyhdf-0.8.3/doc/webpage/source/install.html
no luck. Kindly help.

Savio Kay
- 11
- 1
- 4
1
vote
3 answers
lat,lon information from hdf file python
I have a hdf file and want to extract data from it. For some reason i cant able to extract latitude and longitude values:
the code that i tried is :
from pyhdf import SD
hdf = SD.SD('MOD10C2.A2001033.006.2016092173057.hdf')
data =…

bikuser
- 2,013
- 4
- 33
- 57
1
vote
2 answers
Error importing pyhdf module in Python
I have followed the instructions from http://hdfeos.org/software/pyhdf.php detailing how to install pyhdf and subsequently attempted to run the example code listed on this site (found here). Unfortunately, when I run the example code (which I saved…

user2849910
- 191
- 1
- 2
- 6
1
vote
1 answer
Installing Anaconda Python, pyhdf, and netcdf4 for windows 64 bit
I am pretty new to python and programming , all self taught. I started a new position late last year requiring me to create and maintain large scientific data sets. A big hurdle was learning to install the pyhdf and netcdf4 modules for 64 bit…

Almidas
- 379
- 2
- 6
- 16
1
vote
1 answer
could not figure out how to read the metadata
I could not figure out how to read the metadata contained in the following HDF file.
I could successfully read the datasets and attributes as…

Roman
- 3,007
- 8
- 26
- 54
1
vote
1 answer
HDF4 file on Anaconda distribution of python
I am trying to read an HDF4 file with my Anaconda python distributions on 64-bit Windows 7. I have tried to do a conda install of both the pyhdf and pyNio packages, but Anaconda seems to find neither. Does anyone have any advice on how to do this? I…

AGK
- 57
- 2
- 6
1
vote
2 answers
Read/Open a modis aqua .hdf file and display/plot the output in gdal and matplotlib
I have tried and search on how to solve this but still can't find a way on how to do read and plot this in gdal and matplotlib from a given Modis Aqua .hdf file. Any help is much appreciated. By the way am using Python 2.7.5 in Windows 7. The…

doo
- 31
- 2
- 6
0
votes
0 answers
SD : No such file
I'm using pyhdf.SD to import some hdf5 files to python. I'm able to import one file in a program
file=SD(file_path,SDC.READ)
But after that, if I import another hdf5 file within the same program, it throws an error HDF4Error: SD: no such file.
I…

Pixel_Bear
- 97
- 1
- 1
- 11