[
https://issues.apache.org/jira/browse/TIKA-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156262#comment-14156262
]
Vineet Ghatge commented on TIKA-1423:
-------------------------------------
UPDATE:
So I picked from some conversation that Annie and Christian Ward from Netcdf -
http://www.unidata.ucar.edu/mailing_lists/archives/netcdf-java/2014/msg00091.html
and seems like there was sample provided which I used to run and it gives out
the GRIB2 data
import java.io.IOException;
import java.io.File;
import ucar.nc2.NetcdfFile;
import ucar.nc2.dataset.NetcdfDataset;
public class Foo {
public static void main(String[] args) throws IOException {
File gribFile = new File("gdas1.forecmwf.2014062612.grib2");
NetcdfFile ncFile = NetcdfDataset.openFile(gribFile.getAbsolutePath(),
null);
System.out.println("Success!");
try {
System.out.println(ncFile.toString());
} finally {
ncFile.close();
}
}
}
This parses and loads the GRIB2 format and I am currently working on getting
Annie's code and changing class path references
> Build a parser to extract data from GRIB formats
> ------------------------------------------------
>
> Key: TIKA-1423
> URL: https://issues.apache.org/jira/browse/TIKA-1423
> Project: Tika
> Issue Type: New Feature
> Components: metadata, mime, parser
> Affects Versions: 1.6
> Reporter: Vineet Ghatge
> Priority: Critical
> Labels: features, newbie
> Fix For: 1.7
>
> Attachments: GribParser.java,
> NLDAS_FORA0125_H.A20130112.1200.002.grb, gdas1.forecmwf.2014062612.grib2
>
>
> Arctic dataset contains a MIME format called GRIB - General
> Regularlydistributed information in Binary form
> http://en.wikipedia.org/wiki/GRIB . GRIB is a well known data format which is
> a concise data format used in meteorology to store historical and
> weather data. There are 2 different types of the format GRIB 0, GRIB 2.
> The focus will be on GRIB 2 which is the most prevalent. Each GRIB record
> intended for either transmission or storage contains a single parameter with
> values located at an array of grid points, or represented as a set of
> spectral coefficients, for a single level (or layer), encoded as a continuous
> bit stream. Logical divisions of the record are designated as "sections",
> each of which provides control information and/or data. A GRIB record
> consists of six sections, two of which are optional:
>
> (0) Indicator Section
> (1) Product Definition Section (PDS)
> (2) Grid Description Section (GDS) optional
> (3) Bit Map Section (BMS) optional
> (4) Binary Data Section (BDS)
> (5) '7777' (ASCII Characters)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)