The goal is to provide a GDAL interface for programming languages that support Component Object Model (COM).
Sub-folders with examples of use, test suit and documentation will be included under the same source tree.
Uses GDALLib_TLB; Var Dataset : IDataset; Projection : string; Begin Dataset := CoDataset.Create(); try Dataset.Open('Ikonos1.tif', atReadOnly); (* Test Get/Set Projection string *) Projection := Dataset.GetProjectionRef(); Dataset.SetProjection(lProjection); finally Dataset := nil; end; End;
using GDALLib; { IDataset pDataset; IRasterBand pRasterBand; pDataset = new DatasetClass(); pDataset.Open(”Ikonos1.tif”, atReadOnly); pRasterBand = pDataset.GetRasterBand(1); pDataset = null; }
From GDALLib import * pDataset = Dataset() pDataset.Open(”Ikonos1.tif”, constants.atReadOnly) pRasterband = pDataset.GetRasterBand(1) pRataset = None
Notes: The interface was generated automatically by “makepy.py” and it does not provide sufficient support to pointers and arrays in function arguments.
Imports GDALLib Private Sub Dim pDataset As IDataset Dim pRasterBand As IRasterBand pDataset = New Dataset() pDataset.Open('Ikonos1.tif', AccessTypeEnum.atReadOnly) pRasterBand = pDataset.GetRasterBand(1) pRasterBand = Nothing End Sub