Examples of GetRasterColorInterpretation()


Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

      buf_size = pixels * gdal.GetDataTypeSize(buf_type) / 8;

      System.out.println(" Data Type = "
          + gdal.GetDataTypeName(poBand.getDataType()));
      System.out.println(" ColorInterp = "
          + gdal.GetColorInterpretationName(poBand
              .GetRasterColorInterpretation()));
     
      System.out.println("Band size is: " + poBand.getXSize() + "x"
          + poBand.getYSize());
 
View Full Code Here

Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

      }
      imgBuffer = new DataBufferByte(bytes, pixels);
      buffer_type = DataBuffer.TYPE_BYTE;
      sampleModel = new BandedSampleModel(buffer_type,
          xsize, ysize, xsize, banks, offsets);
      data_type = (poBand.GetRasterColorInterpretation() ==
        gdalconstConstants.GCI_PaletteIndex)?
        BufferedImage.TYPE_BYTE_INDEXED : BufferedImage.TYPE_BYTE_GRAY;
    } else if(buf_type == gdalconstConstants.GDT_Int16) {
      short[][] shorts = new short[bandCount][];
      for(int i = 0; i < bandCount; i++) {       
View Full Code Here

Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

    WritableRaster raster = Raster.createWritableRaster(sampleModel, imgBuffer, null);
    BufferedImage img = null;
    ColorModel cm = null;

    if(poBand.GetRasterColorInterpretation() ==
      gdalconstConstants.GCI_PaletteIndex) {
      data_type = BufferedImage.TYPE_BYTE_INDEXED;
      cm = poBand.GetRasterColorTable().getIndexColorModel(
                gdal.GetDataTypeSize(buf_type));
      img = new BufferedImage(cm, raster, false, null);
View Full Code Here

Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

            {
                Band band = ds.GetRasterBand(iBand);
                System.out.println("Band " + iBand + " :");
                System.out.println("   DataType: " + band.getDataType());
                System.out.println("   Size (" + band.getXSize() + "," + band.getYSize() + ")");
                System.out.println("   PaletteInterp: " + gdal.GetColorInterpretationName(band.GetRasterColorInterpretation()));

                for (int iOver = 0; iOver < band.GetOverviewCount(); iOver++)
                {
                    Band over = band.GetOverview(iOver);
                    System.out.println("      OverView " + iOver + " :");
View Full Code Here

Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

                {
                    Band over = band.GetOverview(iOver);
                    System.out.println("      OverView " + iOver + " :");
                    System.out.println("         DataType: " + over.getDataType());
                    System.out.println("         Size (" + over.getXSize() + "," + over.getYSize() + ")");
                    System.out.println("         PaletteInterp: " + gdal.GetColorInterpretationName(over.GetRasterColorInterpretation()));
                }
            }

            /* explicit closing of dataset */
            ds.delete();
View Full Code Here

Examples of org.gdal.gdal.Band.GetRasterColorInterpretation()

                                                + " Block="
                                                + blockXSize[0] + "x" + blockYSize[0]
            + " Type="
            + gdal.GetDataTypeName(hBand.getDataType())
            + ", ColorInterp="
            + gdal.GetColorInterpretationName(hBand
                .GetRasterColorInterpretation()));

        String hBandDesc = hBand.GetDescription();
        if (hBandDesc != null && hBandDesc.length() > 0)
          System.out.println("  Description = " + hBandDesc);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.