Package org.apache.tools.ant.taskdefs

Examples of org.apache.tools.ant.taskdefs.XSLTProcess$Factory$Attribute


    private void addCoordSystem(NetcdfDataset ds) throws IOException {


  //  int time = ds.findGlobalAttributeIgnoreCase("Time").getNumericValue().intValue();
        double ele = 0;
        Attribute attr = ds.findGlobalAttributeIgnoreCase("Elevation");
        if( attr != null )
            ele = attr.getNumericValue().doubleValue();

        // ncml agg add this sweep variable as agg dimension
        Variable sp = ds.findVariable("sweep");

        if(sp ==  null) {
            // add Elevation
            ds.addDimension( null, new Dimension("Elevation", 1 , true));
            String lName = "elevation angle in degres: 0 = parallel to pedestal base, 90 = perpendicular";
            CoordinateAxis v = new CoordinateAxis1D(ds, null, "Elevation", DataType.DOUBLE, "Elevation", "degrees", lName);
            ds.setValues(v, 1, ele, 0);
            v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.RadialElevation.toString()));
            ds.addVariable(null, v);

        }
        else {
            Array spdata = sp.read();
            float [] spd = (float [])spdata.get1DJavaArray(float.class);
            int spsize = spd.length;

            // add Elevation
            ds.addDimension( null, new Dimension("Elevation", spsize , true));
            String lName = "elevation angle in degres: 0 = parallel to pedestal base, 90 = perpendicular";
            CoordinateAxis v = new CoordinateAxis1D(ds, null, "Elevation", DataType.DOUBLE, "Elevation", "degrees", lName);
            //ds.setValues(v, (ArrayList)spdata);
            v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.RadialElevation.toString()));
            ds.addVariable(null, v);


        }
            ds.addAttribute( null, new Attribute("IsRadial", new Integer(1)));
            attr = ds.findGlobalAttributeIgnoreCase("vcp-value");
            String vcp;
            if(attr == null)
                vcp = "11";
            else
                vcp = attr.getStringValue();

            ds.addAttribute( null, new Attribute("VolumeCoveragePatternName", vcp));
            ds.finish();

    }
View Full Code Here


    public ucar.unidata.geoloc.EarthLocation getCommonOrigin() {
      return origin;
    }

    public String getRadarID() {
        Attribute ga = ds.findGlobalAttribute("radarName-value");
        if(ga != null)
            return ga.getStringValue();
        else
            return "XXXX";
    }
View Full Code Here

        return isVolume;
    }


   protected void setEarthLocation() {
    Attribute ga = ds.findGlobalAttribute("Latitude");
    if(ga != null )
        latv = ga.getNumericValue().doubleValue();
    else
        latv = 0.0;

    ga = ds.findGlobalAttribute("Longitude");
    if(ga != null)
        lonv = ga.getNumericValue().doubleValue();
    else
        lonv = 0.0;

    ga = ds.findGlobalAttribute("Height");
    if(ga != null)
      elev = ga.getNumericValue().doubleValue();
    else
      elev = 0.0;

    origin = new ucar.unidata.geoloc.EarthLocationImpl(latv, lonv, elev);
  }
View Full Code Here

                } catch (IOException e) {
                    e.printStackTrace();
                    meanElevation = 0.0;
                }
            } else {
                Attribute data = ds.findGlobalAttribute("Elevation");
                meanElevation = data.getNumericValue().doubleValue();
            }
        }
View Full Code Here

        public float getNyquistFrequency() {
            return 0; // LOOK this may be radial specific
        }

        public float getRangeToFirstGate() {
            Attribute firstGate = ds.findGlobalAttributeIgnoreCase("RangeToFirstGate");
            double gateStart = firstGate.getNumericValue().doubleValue();
            return (float)gateStart;
        }
View Full Code Here

    NetcdfFile nc = NetcdfFile.open(filename);
    Variable v = ncfile.findVariable(helloGreek);
    assert v != null;
    assert v.getShortName().equals(helloGreek);

    Attribute att = v.findAttribute("units");
    assert att != null;
    assert att.isString();
    assert(helloGreek.equals(att.getStringValue()));
    nc.close();   
  }
View Full Code Here

    return maxdist;
  }

  protected void setEarthLocation() {
    Attribute ga = ds.findGlobalAttribute("StationLatitude");
    if(ga != null )
        latv = ga.getNumericValue().doubleValue();
    else
        latv = 0.0;

    ga = ds.findGlobalAttribute("StationLongitude");
    if(ga != null)
        lonv = ga.getNumericValue().doubleValue();
    else
        lonv = 0.0;

    ga = ds.findGlobalAttribute("StationElevationInMeters");
    if(ga != null)
        elev = ga.getNumericValue().doubleValue();
    else
        elev = 0.0;

    origin = new ucar.unidata.geoloc.EarthLocationImpl(latv, lonv, elev);
  }
View Full Code Here

    gridDataset.getTitle();
    gridDatatype.getFullName();

    StringBuilder buf = new StringBuilder();

    Attribute gridMappingAtt = gridDatatype.findAttributeIgnoreCase( "grid_mapping" );
    String gridMapping = gridMappingAtt.getStringValue();
    Variable gridMapVar = gridDataset.getNetcdfFile().getRootGroup().findVariable(gridMapping);

    Attribute gridMappingNameAtt = gridMapVar.findAttributeIgnoreCase( "grid_mapping_name" );
    String gridMappingName = gridMappingNameAtt.getStringValue();
    buf.append( "EPSG:" ).append( ProjectionStandardsInfo.getProjectionByCfName( gridMappingName));


    return buf.toString();
  }
View Full Code Here

  public ucar.unidata.geoloc.EarthLocation getCommonOrigin() {
    return origin;
  }

  public String getRadarID() {
    Attribute ga = ds.findGlobalAttribute("Station");
    if(ga != null)
        return ga.getStringValue();
    else
        return "XXXX";
  }
View Full Code Here

    else
        return "XXXX";
  }

  public String getRadarName() {
    Attribute ga = ds.findGlobalAttribute("StationName");
    if(ga != null)
        return ga.getStringValue();
    else
        return "Unknown Station";
  }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.XSLTProcess$Factory$Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.