Package org.ini4j

Examples of org.ini4j.Profile$Section


    GridDataset ds = null;
    try {
      ds = GridDataset.open(uri);
      GeoGrid grid = ds.findGridByName(var);
      Section s = new Section(grid.getShape());
      System.out.printf("var = %s %n", s);

      GridCoordSystem GridCoordS = grid.getCoordinateSystem();
      VerticalTransform vt = GridCoordS.getVerticalTransform();
      ArrayDouble.D3 z = vt.getCoordinateArray(0);
      Section sv = new Section(z.getShape());
      System.out.printf("3dcoord = %s %n", sv);

      if (vt.isTimeDependent())
        s = s.removeRange(0);
      assert s.equals(sv);
View Full Code Here


        /*
         * create the section of multidimensional array indices
         * that defines the exact data that need to be read
         * for this image index and parameters
         */
        final Section section = new Section(ranges);
   
        /*
         * Setting SampleModel and ColorModel.
         */
        final SampleModel sampleModel = wrapper.getSampleModel().createCompatibleSampleModel(destWidth, destHeight);
        final ColorModel colorModel = ImageIOUtilities.createColorModel(sampleModel);
   
        final WritableRaster raster = Raster.createWritableRaster(sampleModel, new Point(0, 0));
        final BufferedImage image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null);

        CoordinateAxis axis = wrapper.variableDS.getCoordinateSystems().get(0).getLatAxis();
        boolean flipYAxis = false;
        try {
            Array yAxisStart = axis.read(new Section().appendRange(2));
            float y1 = yAxisStart.getFloat(0);
            float y2 = yAxisStart.getFloat(1);
            if (y2 > y1) {
                flipYAxis=true;
            }
View Full Code Here

                ranges.add(new Range(first, first + length - 1, stride));
            } catch (InvalidRangeException e) {
                // TODO LOGME
            }
        }
        final Section sections = new Section(ranges);

        /*
         * Setting SampleModel and ColorModel.
         */
        final SampleModel sampleModel = wrapper.getSampleModel().createCompatibleSampleModel(destWidth, destHeight);
View Full Code Here

TOP

Related Classes of org.ini4j.Profile$Section

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.