Skip to content

WorldFile

Namespace: ThinkGeo.Core

This class represents the values of a world file.

public class WorldFile

Inheritance ObjectWorldFile

Remarks:

A world file is an attribute file that is associated with a corresponding image file. Typically, the world file consists of 6 lines of numbers.

Properties

HorizontalResolution

This property gets the horizontal resolution from the world file.

public float HorizontalResolution { get; }

Property Value

Single
This property gets the horizontal resolution from the world file.

Remarks:

None

RotationRow

This property gets the rotation in row from the world file.

public float RotationRow { get; }

Property Value

Single
This property gets the rotation in row from the world file.

Remarks:

None

RotationColumn

This property gets the rotation in column from the world file.

public float RotationColumn { get; }

Property Value

Single
This property gets the rotation in column from the world file.

Remarks:

None

VerticalResolution

This property gets the vertical resolution from the world file.

public float VerticalResolution { get; }

Property Value

Single
This property gets the vertical resolution from the world file.

Remarks:

None

UpperLeftX

This property gets the upper left Y coordinate from the world file.

public float UpperLeftX { get; }

Property Value

Single
This property gets the upper left Y coordinate from the world file.

Remarks:

None

UpperLeftY

This property gets the upper left X coordinate from the world file.

public float UpperLeftY { get; }

Property Value

Single
This property gets the upper left X coordinate from the world file.

Remarks:

None

Constructors

WorldFile()

This is the default constructor for the WorldFile class.

public WorldFile()

Remarks:

None

WorldFile(String)

This is the constructor that passes the worldFile text.

public WorldFile(string worldFileText)

Parameters

worldFileText String
The world file text containing the world file attribute information.

Remarks:

The worldFileText is typically read from a world file.

WorldFile(RectangleShape, Single, Single)

This is the constructor that passes the WorldExtent of the image, the height of the image, and the width of the image.

public WorldFile(RectangleShape worldExtent, float imageWidth, float imageHeight)

Parameters

worldExtent RectangleShape
This parameter specifies the World Coordinate Extent for the image.

imageWidth Single
This parameter specifies the image width for the image.

imageHeight Single
This parameter specifies the image height for the image.

WorldFile(Double, Double, Double, Double, Double, Double)

This is a constructor that passes 6 attributes in double associated with the corresponding image file.

public WorldFile(double horizontalResolution, double rotationRow, double rotationColumn, double verticalResolution, double upperLeftX, double upperLeftY)

Parameters

horizontalResolution Double
This parameter specifies the size of pixels in the x direction.

rotationRow Double
This parameter specifies the rotation term for row.

rotationColumn Double
This parameter specifes the rotation term for column.

verticalResolution Double
This parameter specifies the size of pixels in the y direction.

upperLeftX Double
This parameter represents the x coordinate of the center of the upper-leftmost pixel in map units.

upperLeftY Double
This parameter represents the y coordinate of the center of the upper-leftmost pixel in map units.

WorldFile(Single, Single, Single, Single, Single, Single)

This is a constructor that passes 6 attributes in float associated with the corresponding image file.

public WorldFile(float horizontalResolution, float rotationRow, float rotationColumn, float verticalResolution, float upperLeftX, float upperLeftY)

Parameters

horizontalResolution Single
This parameter specifies the size of pixels in the x direction.

rotationRow Single
This parameter specifies the rotation term for row.

rotationColumn Single
This parameter specifes the rotation term for column.

verticalResolution Single
This parameter specifies the size of pixels in the y direction.

upperLeftX Single
This parameter represents the x coordinate of the center of the upper-leftmost pixel in map units.

upperLeftY Single
This parameter represents the y coordinate of the center of the upper-leftmost pixel in map units.

Methods

GetBoundingBox(Single, Single)

public RectangleShape GetBoundingBox(float width, float height)

Parameters

width Single

height Single

Returns

RectangleShape

Save(String)

public void Save(string pathFilename)

Parameters

pathFilename String