Codota Logo
H4header
Code IndexAdd Codota to your IDE (free)

How to use
H4header
in
ucar.nc2.iosp.hdf4

Best Java code snippets using ucar.nc2.iosp.hdf4.H4header (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: edu.ucar/cdm

public boolean isValidFile(RandomAccessFile raf) throws IOException {
 return H4header.isValidFile(raf);
}
origin: edu.ucar/netcdf

Tag tag = tagMap.get(tagid(tagGroup.elem_ref[i], tagGroup.elem_tag[i]));
if (tag == null) {
 log.error("Reference tag missing= " + tagGroup.elem_ref[i] + "/" + tagGroup.elem_tag[i] +" for group "+tagGroup.refno);
  Variable v = tag.vinfo.v;
  if (v != null)
   addVariableToGroup(group, v, tag);
  else
   log.error("Missing variable " + tag.refno);
 TagVH vh = (TagVH) tag;
 if (vh.className.startsWith("Att")) {
  Attribute att = makeAttribute(vh);
  if (null != att) group.addAttribute(att);
 } else if (tag.vinfo != null) {
  Variable v = tag.vinfo.v;
  addVariableToGroup(group, v, tag);
 TagVGroup vg = (TagVGroup) tag;
 if ((vg.group != null) && (vg.group.getParentGroup() == ncfile.getRootGroup())) {
  addGroupToGroup(group, vg.group, vg);
  vg.group.setParentGroup(group);
 } else {
  Group nested = makeGroup(vg, group); // danger - loops
  if (nested != null) addGroupToGroup(group, nested, vg);
origin: Unidata/thredds

private void findUsedDimensions(Group parent, Map<Dimension, List<Variable>> dimUsedMap) {
 for (Variable v : parent.getVariables()) {
  for (Dimension d : v.getDimensions()) {
   if (!d.isShared()) continue;
   List<Variable> vlist = dimUsedMap.get(d);
   if (vlist == null) {
    vlist = new ArrayList<>();
    dimUsedMap.put(d, vlist);
   }
   vlist.add(v);
  }
 }
 for (Group g : parent.getGroups())
  findUsedDimensions(g, dimUsedMap);
}
origin: Unidata/thredds

memTracker = new MemTracker(actualSize);
if (!isValidFile(myRaf))
 throw new IOException("Not an HDF4 file ");
long link = raf.getFilePointer();
while (link > 0)
 link = readDDH(alltags, link);
 tagMap.put(tagid(tag.refno, tag.code), tag); // track all tags in a map, key is the "tag id".
 if (debugTag1) System.out.println(debugTagDetail ? tag.detail() : tag);
construct(ncfile, alltags);
  adjustDimensions();
  String history = ncfile.findAttValueIgnoreCase(null, "_History", "");
  ncfile.addAttribute(null, new Attribute("_History", history + "; HDF-EOS StructMetadata information was read"));
origin: Unidata/thredds

Variable v = makeImage((TagGroup) t);
if (v != null) vars.add(v);
TagVGroup vgroup = (TagVGroup) t;
if (vgroup.className.startsWith("Dim") || vgroup.className.startsWith("UDim"))
 makeDimension(vgroup);
 Variable v = makeVariable(vgroup);
 if (v != null) vars.add(v);
 addGlobalAttributes(vgroup);
TagVH tagVH = (TagVH) t;
if (tagVH.className.startsWith("Data")) {
 Variable v = makeVariable(tagVH);
 if (v != null) vars.add(v);
Variable v = makeVariable((TagGroup) t);
if (v != null) vars.add(v);
TagVH vh = (TagVH) t;
if (!vh.className.startsWith("Att") && !vh.className.startsWith("_HDF_CHK_TBL")) {
 Variable v = makeVariable(vh);
 if (v != null) vars.add(v);
Group g = makeGroup(vgroup, null);
if (g != null) groups.add(g);
origin: edu.ucar/cdm

List<Dimension> dims = new ArrayList<Dimension>();
for (int i = 0; i < group.nelems; i++) {
 Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i]));
 if (tag == null) {
  log.error("Reference tag missing= " + group.elem_ref[i] + "/" + group.elem_tag[i]);
addVariableAttributes(group, vinfo);
origin: Unidata/thredds

@AfterClass
static public void after() {
 H4header.setDebugFlags(new DebugFlagsImpl(""));  // make sure debug flags are off
}
origin: edu.ucar/netcdf

private long readDDH(List<Tag> alltags, long start) throws IOException {
 raf.seek(start);
 int ndd = DataType.unsignedShortToInt(raf.readShort()); // number of DD blocks
 long link = DataType.unsignedIntToLong(raf.readInt()); // point to the next DDH; link == 0 means no more
 if (debugDD) System.out.println(" DDHeader ndd=" + ndd + " link=" + link);
 long pos = raf.getFilePointer();
 for (int i = 0; i < ndd; i++) {
  raf.seek(pos);
  Tag tag = factory();
  pos += 12; // tag usually changed the file pointer
  if (tag.code > 1)
   alltags.add(tag);
 }
 memTracker.add("DD block", start, raf.getFilePointer());
 return link;
}
origin: edu.ucar/netcdf

memTracker = new MemTracker(actualSize);
if (!isValidFile(myRaf))
 throw new IOException("Not an HDF4 file ");
long link = raf.getFilePointer();
while (link > 0)
 link = readDDH(alltags, link);
 tagMap.put(tagid(tag.refno, tag.code), tag); // track all tags in a map, key is the "tag id".
 if (debugTag1) System.out.println(debugTagDetail ? tag.detail() : tag);
construct(ncfile, alltags);
  adjustDimensions();
  String history = ncfile.findAttValueIgnoreCase(null, "_History", "");
  ncfile.addAttribute(null, new Attribute("_History", history + "; HDF-EOS StructMetadata information was read"));
origin: edu.ucar/cdm

Variable v = makeImage((TagGroup) t);
if (v != null) vars.add(v);
TagVGroup vgroup = (TagVGroup) t;
if (vgroup.className.startsWith("Dim") || vgroup.className.startsWith("UDim"))
 makeDimension(vgroup);
 Variable v = makeVariable(vgroup);
 if (v != null) vars.add(v);
 addGlobalAttributes(vgroup);
TagVH tagVH = (TagVH) t;
if (tagVH.className.startsWith("Data")) {
 Variable v = makeVariable(tagVH);
 if (v != null) vars.add(v);
Variable v = makeVariable((TagGroup) t);
if (v != null) vars.add(v);
TagVH vh = (TagVH) t;
if (!vh.className.startsWith("Att") && !vh.className.startsWith("_HDF_CHK_TBL")) {
 Variable v = makeVariable(vh);
 if (v != null) vars.add(v);
Group g = makeGroup(vgroup, null);
if (g != null) groups.add(g);
origin: Unidata/thredds

List<Dimension> dims = new ArrayList<>();
for (int i = 0; i < group.nelems; i++) {
 Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i]));
 if (tag == null) {
  log.error("Reference tag missing= " + group.elem_ref[i] + "/" + group.elem_tag[i]);
addVariableAttributes(group, vinfo);
origin: Unidata/thredds

static public void setDebugFlags(ucar.nc2.util.DebugFlags debugFlag) {
 debug = debugFlag.isSet("H5iosp/read");
 debugPos = debugFlag.isSet("H5iosp/filePos");
 debugHeap = debugFlag.isSet("H5iosp/Heap");
 debugFilter = debugFlag.isSet("H5iosp/filter");
 debugFilterIndexer = debugFlag.isSet("H5iosp/filterIndexer");
 debugChunkIndexer = debugFlag.isSet("H5iosp/chunkIndexer");
 debugVlen = debugFlag.isSet("H5iosp/vlen");
 H5header.setDebugFlags(debugFlag);
 H4header.setDebugFlags(debugFlag);
 if(debugFilter)
  H5tiledLayoutBB.debugFilter = debugFilter;
}
origin: Unidata/thredds

private long readDDH(List<Tag> alltags, long start) throws IOException {
 raf.seek(start);
 int ndd = DataType.unsignedShortToInt(raf.readShort()); // number of DD blocks
 long link = DataType.unsignedIntToLong(raf.readInt()); // point to the next DDH; link == 0 means no more
 if (debugDD) System.out.println(" DDHeader ndd=" + ndd + " link=" + link);
 long pos = raf.getFilePointer();
 for (int i = 0; i < ndd; i++) {
  raf.seek(pos);
  Tag tag = factory();
  pos += 12; // tag usually changed the file pointer
  if (tag.code > 1)
   alltags.add(tag);
 }
 memTracker.add("DD block", start, raf.getFilePointer());
 return link;
}
origin: edu.ucar/cdm

memTracker = new MemTracker(actualSize);
if (!isValidFile(myRaf))
 throw new IOException("Not an HDF4 file ");
long link = raf.getFilePointer();
while (link > 0)
 link = readDDH(alltags, link);
 tagMap.put(tagid(tag.refno, tag.code), tag); // track all tags in a map, key is the "tag id".
 if (debugTag1) System.out.println(debugTagDetail ? tag.detail() : tag);
construct(ncfile, alltags);
  adjustDimensions();
  String history = ncfile.findAttValueIgnoreCase(null, "_History", "");
  ncfile.addAttribute(null, new Attribute("_History", history + "; HDF-EOS StructMetadata information was read"));
origin: edu.ucar/cdm

Tag tag = tagMap.get(tagid(tagGroup.elem_ref[i], tagGroup.elem_tag[i]));
if (tag == null) {
 log.error("Reference tag missing= " + tagGroup.elem_ref[i] + "/" + tagGroup.elem_tag[i] +" for group "+tagGroup.refno);
  Variable v = tag.vinfo.v;
  if (v != null)
   addVariableToGroup(group, v, tag);
  else
   log.error("Missing variable " + tag.refno);
 TagVH vh = (TagVH) tag;
 if (vh.className.startsWith("Att")) {
  Attribute att = makeAttribute(vh);
  if (null != att) group.addAttribute(att);
 } else if (tag.vinfo != null) {
  Variable v = tag.vinfo.v;
  addVariableToGroup(group, v, tag);
 TagVGroup vg = (TagVGroup) tag;
 if ((vg.group != null) && (vg.group.getParentGroup() == ncfile.getRootGroup())) {
  addGroupToGroup(group, vg.group, vg);
  vg.group.setParentGroup(group);
 } else {
  Group nested = makeGroup(vg, group); // danger - loops
  if (nested != null) addGroupToGroup(group, nested, vg);
origin: edu.ucar/netcdf

Variable v = makeImage((TagGroup) t);
if (v != null) vars.add(v);
TagVGroup vgroup = (TagVGroup) t;
if (vgroup.className.startsWith("Dim") || vgroup.className.startsWith("UDim"))
 makeDimension(vgroup);
 Variable v = makeVariable(vgroup);
 if (v != null) vars.add(v);
 addGlobalAttributes(vgroup);
TagVH tagVH = (TagVH) t;
if (tagVH.className.startsWith("Data")) {
 Variable v = makeVariable(tagVH);
 if (v != null) vars.add(v);
Variable v = makeVariable((TagGroup) t);
if (v != null) vars.add(v);
TagVH vh = (TagVH) t;
if (!vh.className.startsWith("Att") && !vh.className.startsWith("_HDF_CHK_TBL")) {
 Variable v = makeVariable(vh);
 if (v != null) vars.add(v);
Group g = makeGroup(vgroup, null);
if (g != null) groups.add(g);
origin: edu.ucar/netcdf

List<Dimension> dims = new ArrayList<Dimension>();
for (int i = 0; i < group.nelems; i++) {
 Tag tag = tagMap.get(tagid(group.elem_ref[i], group.elem_tag[i]));
 if (tag == null) {
  log.error("Reference tag missing= " + group.elem_ref[i] + "/" + group.elem_tag[i]);
addVariableAttributes(group, vinfo);
origin: edu.ucar/cdm

static public void setDebugFlags(ucar.nc2.util.DebugFlags debugFlag) {
 debug = debugFlag.isSet("H5iosp/read");
 debugPos = debugFlag.isSet("H5iosp/filePos");
 debugHeap = debugFlag.isSet("H5iosp/Heap");
 debugFilter = debugFlag.isSet("H5iosp/filter");
 debugFilterIndexer = debugFlag.isSet("H5iosp/filterIndexer");
 debugChunkIndexer = debugFlag.isSet("H5iosp/chunkIndexer");
 debugVlen = debugFlag.isSet("H5iosp/vlen");
 skipEos = debugFlag.isSet("HdfEos/turnOff");
 H5header.setDebugFlags(debugFlag);
 H4header.setDebugFlags(debugFlag);
}
origin: edu.ucar/netcdf

public boolean isValidFile(RandomAccessFile raf) throws IOException {
 return H4header.isValidFile(raf);
}
origin: edu.ucar/netcdf

private void findUsedDimensions(Group parent, Map<Dimension, List<Variable>> dimUsedMap) {
 for (Variable v : parent.getVariables()) {
  for (Dimension d : v.getDimensions()) {
   if (!d.isShared()) continue;
   List<Variable> vlist = dimUsedMap.get(d);
   if (vlist == null) {
    vlist = new ArrayList<Variable>();
    dimUsedMap.put(d, vlist);
   }
   vlist.add(v);
  }
 }
 for (Group g : parent.getGroups())
  findUsedDimensions(g, dimUsedMap);
}
ucar.nc2.iosp.hdf4H4header

Javadoc

Read the tags of an HDF4 file, construct CDM objects. All page references are to "HDF Specification and Developers Guide" version 4.1r5, nov 2001.

Most used methods

  • isValidFile
  • setDebugFlags
  • addGlobalAttributes
  • addGroupToGroup
  • addVariableAttributes
  • addVariableToGroup
  • adjustDimensions
  • construct
  • factory
  • findUsedDimensions
  • isEos
  • makeAttribute
  • isEos,
  • makeAttribute,
  • makeDimension,
  • makeDimensionUnshared,
  • makeGroup,
  • makeImage,
  • makeVariable,
  • read,
  • readDDH,
  • tagid

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now