GDAL images

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. More...
 
bool Image.BuildOverviews (tkGDALResamplingMethod ResamplingMethod, int NumOverviews, Array OverviewList)
 Builds overviews for GDAL image. More...
 
bool Image.LoadBuffer (double maxBufferSize)
 Loads the whole image in the memory buffer of specified size. Applicable for GDAL images only. More...
 
void Image.SetNoDataValue (double Value, ref bool Result)
 Sets no-data value for the image. Applicable for GDAL images only. More...
 
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. More...
 

Properties

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

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

◆ BufferToProjection()

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

◆ BuildOverviews()

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

◆ LoadBuffer()

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

◆ SetNoDataValue()

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

◆ SetVisibleExtents()

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

◆ BufferSize

int Image.BufferSize
getset

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.

◆ ClearGDALCache

bool Image.ClearGDALCache
getset

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

New API 4.8:
Added in version 4.8

◆ HasColorTable

bool Image.HasColorTable
get

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

◆ IsRgb

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

◆ NoBands

int Image.NoBands
get

Returns the number of bands of GDAL image.

◆ NumOverviews

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

◆ PaletteInterpretation

string Image.PaletteInterpretation
get

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".

◆ UseHistogram

bool Image.UseHistogram
getset

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

◆ Warped

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