Examples of GetRasterBand()


Examples of org.gdal.gdal.Dataset.GetRasterBand()

        /*
         * Calculate Proximity
         */

        Run(SourceDataset.GetRasterBand(SourceBand),
                WorkProximityDataset.GetRasterBand(DestinyBand),
                DistMult,
                MaxDistance,
                Nodata,
                hasBufferValue,
                BufferValue,
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

                || ProxType == gdalconstConstants.GDT_UInt32) {
            tempFilename = "/vsimem/proximity_" + String.valueOf(System.currentTimeMillis()) + ".tif";
            WorkProximityDS = gdal.GetDriverByName("GTiff").Create(tempFilename,
                    ProximityBand.getXSize(), ProximityBand.getYSize(), 1,
                    gdalconstConstants.GDT_Float32);
            WorkProximityBand = WorkProximityDS.GetRasterBand(1);
        }

        int xSize = WorkProximityBand.getXSize();
        int ySize = WorkProximityBand.getYSize();
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

    public void run()
    {
        for(int i=0;i<100;i++)
        {
            Dataset ds = gdal.Open(_filename);
            ds.GetRasterBand(1).Checksum();
            //ds.delete();
        }
    }
   
    public static void main(String[] args) throws InterruptedException
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

            System.err.println("GDALOpen failed - " + gdal.GetLastErrorNo());
            System.err.println(gdal.GetLastErrorMsg());
            System.exit(2);
        }

        Band band = dataset.GetRasterBand(sourceBand);

        if (band == null) {
            System.err.println("Band does not exist on dataset");
            System.err.println("GDALOpen failed - " + gdal.GetLastErrorNo());
            System.err.println(gdal.GetLastErrorMsg());
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

    int pixels = xsize * ysize;
    int buf_type = 0, buf_size = 0;

    for(int band = 0; band < bandCount; band++) {
      /* Bands are not 0-base indexed, so we must add 1 */
      poBand = poDataset.GetRasterBand(band+1);
     
      buf_type = poBand.getDataType();
      buf_size = pixels * gdal.GetDataTypeSize(buf_type) / 8;

      System.out.println(" Data Type = "
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

            /* -------------------------------------------------------------------- */
            /*      Displaying the raster parameters                                */
            /* -------------------------------------------------------------------- */
            for (int iBand = 1; iBand <= ds.getRasterCount(); iBand++)
            {
                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()));

View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

      for (iBand = 0; iBand < hDataset.getRasterCount(); iBand++) {
        Double[] pass1 = new Double[1], pass2 = new Double[1];
        double[] adfCMinMax = new double[2];
        ColorTable hTable;

        hBand = hDataset.GetRasterBand(iBand + 1);

        /*if( bSample )
         {
         float[] afSample = new float[10000];
         int   nCount;
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

        FloatBuffer floatBuffer = byteBuffer.asFloatBuffer();
        int[] intArray = new int[xsize];
        float[] floatArray = new float[xsize];
       
        dataset = driver.Create(filename, xsize, ysize, 1, gdalconst.GDT_Float32);
        band = dataset.GetRasterBand(1);
       
        for(int iter = 0; iter < nbIters; iter++)
        {
            if (method == METHOD_DBB)
            {
View Full Code Here

Examples of org.gdal.gdal.Dataset.GetRasterBand()

       
        dataset.delete();
       
        /* Open the file to check the values */
        dataset = gdal.Open(filename);
        band = dataset.GetRasterBand(1);
       
        for(int iter = 0; iter < nbIters; iter++)
        {
            if (method == METHOD_DBB)
            {
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.