コード例 #1
0
ファイル: ESRIRaster.java プロジェクト: GEO-IASS/sextante
 public PixelBlock(final int iBand) throws IOException {
   bands = new IRasterBandCollectionProxy(rasterDataset);
   band = bands.item(iBand);
   rawPix = new IRawPixelsProxy(band);
   rasProps = new IRasterPropsProxy(rawPix);
   this.iBand = iBand;
 }
コード例 #2
0
ファイル: ESRIRaster.java プロジェクト: GEO-IASS/sextante
  public ESRIRaster(final String path, final String rasterName, final int rows, final int cols)
      throws IOException {

    final IWorkspaceFactory factory = new RasterWorkspaceFactory();
    final IRasterWorkspace2 workspace = new IRasterWorkspace2Proxy(factory.openFromFile(path, 0));
    rasterDataset = new IRasterDataset2Proxy(workspace.openRasterDataset(rasterName));

    m_iRows = rows;
    m_iCols = cols;
    final IGeoDataset geoDataset = new IGeoDatasetProxy(rasterDataset);
    final IRasterBandCollection rasterBands = new IRasterBandCollectionProxy(geoDataset);
    pixelBlock = new PixelBlock[rasterBands.getCount()];
    for (int i = 0; i < pixelBlock.length; i++) {
      pixelBlock[i] = new PixelBlock(i);
    }
    m_dNoData = pixelBlock[0].getNoDataValue();
    m_iDataType = pixelBlock[0].getDataType();
  }