|
NEP 4.0.0
NetCDF Expansion Pack
|
Macros | |
| #define | NEP_MAGIC_GEOTIFF_STANDARD "II*" |
| #define | NEP_MAGIC_GEOTIFF_BIGTIFF "II+" |
| #define | NEP_MAGIC_CDF "\xCD\xF3\x00\x01" |
| #define | NEP_MAGIC_GRIB2 "GRIB" |
| #define | NEP_MAGIC_FITS "SIMPLE" |
| #define | NEP_MAGIC_PDS4 "<?xml" |
| #define | NEP_MAGIC_DICOM "DICM" |
| #define | NEP_MAGIC_PDB "HEADER" |
| #define | NEP_MAGIC_MMCIF "data_" |
Each NEP format handler is identified by a short byte sequence (magic number) at the start of the file. NetCDF-C compares the first bytes of any file opened with nc_open() against each registered magic string to select the correct UDF handler. All magic strings are null-terminated C strings except NEP_MAGIC_CDF, which contains embedded null bytes and must be matched by length.
| Macro | Value | Format | Notes |
|---|---|---|---|
| NEP_MAGIC_GEOTIFF_STANDARD | "II*" | GeoTIFF standard TIFF | Little-endian TIFF byte-order mark |
| NEP_MAGIC_GEOTIFF_BIGTIFF | "II+" | GeoTIFF BigTIFF | Little-endian BigTIFF marker |
| NEP_MAGIC_GRIB2 | "GRIB" | GRIB2 | All GRIB editions share this magic |
| NEP_MAGIC_FITS | "SIMPLE" | FITS | First 6 bytes of every FITS file |
| NEP_MAGIC_CDF | \xCD\xF3\x00\x01 | NASA CDF | 4-byte binary signature |
| NEP_MAGIC_PDS4 | "<?xml" | PDS4 | XML declaration; namespace checked |
| NEP_MAGIC_DICOM | "DICM" | DICOM | 4-byte prefix at byte offset 128 |
| NEP_MAGIC_PDB | "HEADER" | Legacy PDB | First record name of the file |
| NEP_MAGIC_MMCIF | "data_" | PDBx/mmCIF | First token of every CIF data block |
| #define NEP_MAGIC_CDF "\xCD\xF3\x00\x01" |
NASA CDF magic number: 0xCDF30001
| #define NEP_MAGIC_DICOM "DICM" |
DICOM magic number: "DICM" prefix at byte offset 128
| #define NEP_MAGIC_FITS "SIMPLE" |
FITS magic number: "SIMPLE" (first 6 bytes of a FITS file)
| #define NEP_MAGIC_GEOTIFF_BIGTIFF "II+" |
GeoTIFF BigTIFF magic number: "II+"
| #define NEP_MAGIC_GEOTIFF_STANDARD "II*" |
GeoTIFF standard TIFF magic number: "II*"
| #define NEP_MAGIC_GRIB2 "GRIB" |
GRIB2 magic number: "GRIB"
| #define NEP_MAGIC_MMCIF "data_" |
PDBx/mmCIF magic number: "data_" token at the start of the file
| #define NEP_MAGIC_PDB "HEADER" |
Legacy PDB magic number: "HEADER" record name at the start of the file
| #define NEP_MAGIC_PDS4 "<?xml" |
PDS4 magic number: XML label files begin with "<?xml"