View Issue Details

IDProjectCategoryView StatusLast Update
0000404fileGeneralpublic2022-12-09 18:02
Reportermanfredsc Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionreopened 
Fixed in Version5.44 
Summary0000404: mime-types and extensions for GRIB
DescriptionI would suggest enhancing the magic entries of "GRIB" with ext and mime items:

in file magic/Magdir/meteorological:
# https://en.wikipedia.org/wiki/GRIB
0 string GRIB
>7 byte =1 Gridded binary (GRIB) version 1
!:mime application/x-grib
!:ext grb/grib
>7 byte =2 Gridded binary (GRIB) version 2
!:mime application/x-grib2
!:ext grb2/grib2


Additional InformationFor reasoning for the mime type, see https://tika.apache.org/1.28.5/formats.html and search for "grib"

http://www.opengis.net/doc/IS/CIS-GRIB2/1.0 (search for "application/")
suggests the mime-type "application/wmo-grib2" to be registered with IANA,
but this never happened and is nowhere used in practice. Until then, it is recommended to use "application/x-grib2"
(for the version 2 variant).

For file suffixes, both the short and the long variants are used approximately equally often in practice,
so I suggest adding both variants. The suffixes grb1 or grib1 are seldom used.

As there is software which only can handle either GRIB1 or GRIB2 and not both, I suggest adding two separate mime entries
and not merging them.
TagsNo tags attached.

Activities

christos

2022-12-02 17:45

manager   ~0003870

Thanks!

manfredsc

2022-12-05 10:58

reporter   ~0003871

Thanks a lot.
Your change resulted in

# https://en.wikipedia.org/wiki/GRIB
0 string GRIB
>7 byte >0
>>7 byte <3 Gridded binary (GRIB) version %d
!:mime application/x-grib
!:ext grb/grib

I expected to get an entry for GRIB2, too. GRIB1 is a legacy format which is only seldom used nowadays.
Since 2003 the successor GRIB2 is recommended to be used, and since about 10 years the overwhelming
majority of weather agencies use GRIB2, in my view.
Suffixes grb and grib are explicitly, exclusively used for GRIB1 datasets. The same goes for the mime type x-grib.

Could we have some suffix and mime entries for GRIB2 too, please?

There may be some vague dreams of a GRIB3, but this will most likely not manifest in the next 10 years, if at all.
It is far more likely that some sort of XML or json format will be the successor of GRIB2, and it is not clear how this
will be called.


christos

2022-12-09 18:02

manager   ~0003872

changed as suggested.

Issue History

Date Modified Username Field Change
2022-11-08 16:03 manfredsc New Issue
2022-12-02 17:45 christos Assigned To => christos
2022-12-02 17:45 christos Status new => assigned
2022-12-02 17:45 christos Status assigned => resolved
2022-12-02 17:45 christos Resolution open => fixed
2022-12-02 17:45 christos Fixed in Version => 5.44
2022-12-02 17:45 christos Note Added: 0003870
2022-12-05 10:58 manfredsc Status resolved => feedback
2022-12-05 10:58 manfredsc Resolution fixed => reopened
2022-12-05 10:58 manfredsc Note Added: 0003871
2022-12-09 18:02 christos Status feedback => resolved
2022-12-09 18:02 christos Note Added: 0003872