Image position

Functions

string Image.GetProjection ()
 Retrieves projection string from the associated .prj file. More...
 
void Image.ImageToProjection (int Column, int Row, out double ProjX, out double ProjY)
 Converts coordinates of image's pixel to the screen coordinates. More...
 
void Image.ProjectionToBuffer (double ProjX, double ProjY, out int BufferX, out int BufferY)
 Returns the coordinates of pixel in image buffer which correspond to the given point on the map. More...
 
void Image.ProjectionToImage (double ProjX, double ProjY, out int Column, out int Row)
 Returns the coordinates of image pixel which correspond to the given point on the map. More...
 
bool Image.SetProjection (string Proj4)
 Sets projection string for the image. More...
 

Properties

double Image.dX [get, set]
 Gets or sets the number of map units per pixel of image buffer for x axis. More...
 
double Image.dY [get, set]
 Gets or sets the number of map units per pixel of image buffer for y axis. More...
 
Extents Image.Extents [get]
 Returns the extents of the image. More...
 
int Image.Height [get]
 Gets the height of the image in pixels. More...
 
double Image.OriginalDX [get, set]
 Gets or sets the number of map units per image pixel for x axis. More...
 
double Image.OriginalDY [get, set]
 Gets or sets the number of map units per image pixel for y axis. More...
 
int Image.OriginalHeight [get]
 Gets the height of the image. More...
 
int Image.OriginalWidth [get]
 Gets the width of the image. More...
 
double Image.OriginalXllCenter [get, set]
 Gets or sets the x coordinate of the center of lower left pixel of the image in map units. More...
 
double Image.OriginalYllCenter [get, set]
 Gets or sets the y coordinate of the center of lower left pixel of the image in map units. More...
 
int Image.Width [get]
 Gets the width of the image in pixels. More...
 
double Image.XllCenter [get, set]
 Gets or sets the x coordinate of the center of the lower-left pixel in the image. More...
 
double Image.YllCenter [get, set]
 Gets or sets the y coordinate of the center of the lower-left pixel in the image. More...
 

Detailed Description

Here is a list of methods and properties which affect position and scale of image, conversion between map units and image coordinates. The properties and methods described here belong to Image class.

dot_inline_dotgraph_9.png

Graph description

Function Documentation

◆ GetProjection()

string Image.GetProjection ( )

Retrieves projection string from the associated .prj file.

Returns
Projection string or empty string on it's absence.

◆ ImageToProjection()

void Image.ImageToProjection ( int  Column,
int  Row,
out double  ProjX,
out double  ProjY 
)

Converts coordinates of image's pixel to the screen coordinates.

Parameters
ColumnThe column.
RowThe row.
ProjXThe resulting x coordinate of the map.
ProjYThe resulting y coordinate of the map.
New API 4.8:
Added in version 4.8

◆ ProjectionToBuffer()

void Image.ProjectionToBuffer ( double  ProjX,
double  ProjY,
out int  BufferX,
out int  BufferY 
)

Returns the coordinates of pixel in image buffer which correspond to the given point on the map.

Parameters
ProjXX coordinate of the point in map units.
ProjYY coordinate of the point in map units.
BufferXThe resulting x coordinate of pixel in the image buffer.
BufferYThe resulting y coordinate of pixel in the image buffer.
New API 4.8:
Added in version 4.8

◆ ProjectionToImage()

void Image.ProjectionToImage ( double  ProjX,
double  ProjY,
out int  Column,
out int  Row 
)

Returns the coordinates of image pixel which correspond to the given point on the map.

Parameters
ProjXX coordinate of the point in map units.
ProjYY coordinate of the point in map units.
ColumnThe column.
RowThe row.
New API 4.8:
Added in version 4.8

◆ SetProjection()

bool Image.SetProjection ( string  Proj4)

Sets projection string for the image.

The string will be saved to .prj file with the same name as image.

Parameters
Proj4The projection string.
Returns
True on success and false otherwise.

Properties

◆ dX

double Image.dX
getset

Gets or sets the number of map units per pixel of image buffer for x axis.

The set part of the property is not applicable for GDAL images.

◆ dY

double Image.dY
getset

Gets or sets the number of map units per pixel of image buffer for y axis.

The set part of the property is not applicable for GDAL images.

◆ Extents

Extents Image.Extents
get

Returns the extents of the image.

Examples
ImageLabels.cs.

◆ Height

int Image.Height
get

Gets the height of the image in pixels.

◆ OriginalDX

double Image.OriginalDX
getset

Gets or sets the number of map units per image pixel for x axis.

The changes of this value will result in scaling of the image horizontally.

New API 4.8:
Added in version 4.8

◆ OriginalDY

double Image.OriginalDY
getset

Gets or sets the number of map units per image pixel for y axis.

The changes of this value will result in scaling of the image vertically.

New API 4.8:
Added in version 4.8

◆ OriginalHeight

int Image.OriginalHeight
get

Gets the height of the image.

This property should be used to return the total height of the image, as compared to the height of the image buffer.

Returns
The height of the image in pixels.
New API 4.8:
Added in version 4.8

◆ OriginalWidth

int Image.OriginalWidth
get

Gets the width of the image.

This property should be used to return the total width of the image, as compared to the width of the image buffer.

Returns
The width of the image in pixels.
New API 4.8:
Added in version 4.8

◆ OriginalXllCenter

double Image.OriginalXllCenter
getset

Gets or sets the x coordinate of the center of lower left pixel of the image in map units.

New API 4.8:
Added in version 4.8

◆ OriginalYllCenter

double Image.OriginalYllCenter
getset

Gets or sets the y coordinate of the center of lower left pixel of the image in map units.

New API 4.8:
Added in version 4.8

◆ Width

int Image.Width
get

Gets the width of the image in pixels.

◆ XllCenter

double Image.XllCenter
getset

Gets or sets the x coordinate of the center of the lower-left pixel in the image.

◆ YllCenter

double Image.YllCenter
getset

Gets or sets the y coordinate of the center of the lower-left pixel in the image.