Functions | Properties
GDAL images
Image modules

Functions

void Image.BufferToProjection (int BufferX, int BufferY, out double projX, out double projY)
 Converts the position of pixel in image buffer to the map coordinates.
bool Image.BuildOverviews (tkGDALResamplingMethod ResamplingMethod, int NumOverviews, Array OverviewList)
 Builds overviews for GDAL image.
bool Image.LoadBuffer (double maxBufferSize)
 Loads the whole image in the memory buffer of specified size. Applicable for GDAL images only.
void Image.SetNoDataValue (double Value, ref bool Result)
 Sets no-data value for the image. Applicable for GDAL images only.
void Image.SetVisibleExtents (double newMinX, double newMinY, double newMaxX, double newMaxY, int newPixelsInView, float transPercent)
 Reloads the image buffer to represent the specified map extents. Applicable for GDAL images only.

Properties

int Image.BufferSize [get, set]
 Gets or sets the size of image buffer in percentage.
bool Image.ClearGDALCache [get, set]
 Clears the cache of GDAL library which can be used for faster display.
bool Image.HasColorTable [get]
 Returns a boolean value which indicates whether an image has a color table. Applicable for GDAL images only.
bool Image.IsRgb [get]
 Returns true if the datasource represents RGB image.
int Image.NoBands [get]
 Returns the number of bands of GDAL image.
int Image.NumOverviews [get]
 Returns the number of overviews for GDAL image.
string Image.PaletteInterpretation [get]
 Gets the type of palette interpretation. Applicable for GDAL images only.
bool Image.UseHistogram [get, set]
 Gets or sets a boolean value which indicates whether a histogram will be used. Applicable for GDAL images only.
bool Image.Warped [get]
 Returns true if the image is warped, i.e. there are rotation parameters in world file.

Detailed Description

Here is a list of methods and properties that are specific for images accessed through GDAL library. The properties and methods described here belong to Image class.

dot_inline_dotgraph_13.png

Graph description


Function Documentation

void Image.BufferToProjection ( int  BufferX,
int  BufferY,
out double  projX,
out double  projY 
)

Converts the position of pixel in image buffer to the map coordinates.

Parameters:
BufferXThe x coordinate of the pixel.
BufferYThe y coordinate of the pixel.
projXThe resulting x coordinate of the map.
projYThe resulting y coordinate of the map.
New API 4.8:
Added in version 4.8
bool Image.BuildOverviews ( tkGDALResamplingMethod  ResamplingMethod,
int  NumOverviews,
Array  OverviewList 
)

Builds overviews for GDAL image.

Overviews are the images with lower resolution which are used as a replacement for the original image while drawing it at small scales. The usage of overviews can significantly improve performance and is highly recommended for large images.

Parameters:
ResamplingMethodThe resampling method to use for generation of the image with lower resolution.
NumOverviewsThe number of overviews. Should be equal to the size of OverviewList.
OverviewListAn array of integer type with the specification of overviews (magnification ratios).
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
bool Image.LoadBuffer ( double  maxBufferSize)

Loads the whole image in the memory buffer of specified size. Applicable for GDAL images only.

If the buffer size is smaller than image disk size, the image will be resampled, by decreasing it's linear dimensions by 2.

Parameters:
maxBufferSizeThe maximum size of buffer in MB.
Returns:
True on successful loading and false otherwise.
New API 4.8:
Added in version 4.8
void Image.SetNoDataValue ( double  Value,
ref bool  Result 
)

Sets no-data value for the image. Applicable for GDAL images only.

The pixels with this value will be treated as transparent.

Parameters:
ValueThe value to be set.
ResultA boolean output value which indicates the success of the operation.
New API 4.8:
Added in version 4.8
void Image.SetVisibleExtents ( double  newMinX,
double  newMinY,
double  newMaxX,
double  newMaxY,
int  newPixelsInView,
float  transPercent 
)

Reloads the image buffer to represent the specified map extents. Applicable for GDAL images only.

In most cases the method must not be called directly, as MapWinGIS reloads the buffers for the images automatically after zooming operations.

Parameters:
newMinXThe minimal x coordinate of the new extents.
newMinYThe minimal y coordinate of the new extents.
newMaxXThe maximum x coordinate of the new extents.
newMaxYThe maximum y coordinate of the new extents.
newPixelsInViewThe number of image pixels which fall into the specified extents.
transPercentThis parameter is no longer used.

Properties

int Image.BufferSize [get, set]

Gets or sets the size of image buffer in percentage.

The values less than 100 will increase performance of drawing at the cost of decreasing the visual quality.

bool Image.ClearGDALCache [get, set]

Clears the cache of GDAL library which can be used for faster display.

New API 4.8:
Added in version 4.8
bool Image.HasColorTable [get]

Returns a boolean value which indicates whether an image has a color table. Applicable for GDAL images only.

bool Image.IsRgb [get]

Returns true if the datasource represents RGB image.

The property can be used to distinguish grid datasource from genuine images. Implementation checks if all 3 R,G,B colors are set as color interpretation for GDAL bands. Any additional bands will be ignored.

New API 4.9.1:
Added in version 4.9.1
int Image.NoBands [get]

Returns the number of bands of GDAL image.

int Image.NumOverviews [get]

Returns the number of overviews for GDAL image.

See also:
Image.BuildOverviews.
New API 4.8:
Added in version 4.8

Gets the type of palette interpretation. Applicable for GDAL images only.

The possible values are

  • "Grayscale";
  • "Red, Green, Blue and Alpha";
  • "Cyan, Magenta, Yellow and Black";
  • "Hue, Lightness and Saturation";
  • "Unknown".
bool Image.UseHistogram [get, set]

Gets or sets a boolean value which indicates whether a histogram will be used. Applicable for GDAL images only.

bool Image.Warped [get]

Returns true if the image is warped, i.e. there are rotation parameters in world file.

New API 4.9.0:
Added in version 4.9.0
 All Classes Files Functions Enumerations Properties Events