ImportDataset Method
Description
Imports a dataset into the current SWD. This method creates an internal overlay which contains copies of all of the items in the given dataset.
Syntax
Visual Basic |
---|
Public Function ImportDataset( _ ByVal dataset As String, _ ByVal pos As Integer _ ) As Integer |
Parameters
- dataset
-
The filename of the dataset to import.
If the dataset class can handle parameters, you can append parameters after the filename using a question mark. For example, the dataset name could be"c:\temp\MyDts.xxx?width=1024,height=768".
The parameters for all GDAL-based Datasets are:
model=Monochrome|Grayscale|Palette|RGB|HLS|CMY|CMYK|Grid|RGBA // Sets the band interpretation model
fixedModel=true|false // Can the band interpretation model be changed in the Reconfigure dialog?
stretch=true|false // Is stretching enabled?
method=Linear|SquareRoot|Logarithmic|Exponential|Equalization // Sets the stretching method
trim=1|2|3|4|5 // Sets the tail trim %
band1=band_no // Sets the index of the first band
band2=
band3=
band4=Notes on band selection:
Band selection always starts with `band1` followed by `band2`, which in turn may be followed by `band3` and then followed by `band4`.
There must be no 'gaps' in the band parameters.
For example, the following are valid band selection parameters:
band1=
band1=,band2=
band1=,band2=,band3=
band1=,band2=,band3=,band4=Whereas, the following are invalid sequences:
band2=
band2=,band1=
band3=,band2=
band1=,band3=,band2=The band indices are not relevant in the above examples and have therefore not been shown.
colour=R:G:B // Sets the colour for the Monochrome band interpretation model
algorithm=None|NearestNeighbour|Bilinear|Cubic|CubicSpline|Lanczos // Sets the resampling method - pos
- The position in the overlays list at which to insert the overlay. If this argument specifies a position in the existing overlays then the new overlay will not replace the existing overlay at the given position, but will shuffle any other overlays down the list.
Remarks
For GeognoSIS the syntax is:
Public sub ImportDataset( _
ByVal dataset As String, _
ByVal pos As Integer _
)
as it does not return a value.
The internal overlay does not refer to the dataset file, therefore any changes to the dataset file will not be reflected in the internal overlay. The InsertDataset method should be used to refer to a dataset file.
Available: GEO D OD OM SISpy
Groups:
Example
sis.ImportDataset ("c:\data\counties.shp", 5)