Module fmeobjects :: Class FMERasterProperties
[hide private]
[frames] | no frames]

Class FMERasterProperties


init(MultipleInvocations)

FMERasterProperties class.

Create an instance of a FMERasterProperties object.

init(numRows, numCols, xSpacing, ySpacing, xCellOrigin, yCellOrigin, xOrigin, yOrigin, xRotation, yRotation)

Creates a raster property with the given properties.

Parameters

Returns: FMERasterProperties

init(numRows, numCols, xCellOrigin, yCellOrigin, transform)

Creates a raster properties object from an affine transformation.

Parameters

Returns: FMERasterProperties

init(rasterProperties)

Create a copy of the passed in raster properties object.

Parameters

Returns: FMERasterProperties

Instance Methods [hide private]
 
__getObject__(args)
 
__init__(MultipleInvocations)
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
bool
equals(fmerp)
This method evaluates whether two properties have the identical value.
list of float
getAsAffineTransform()
This method returns origin, spacing rotation as an affine transformation.
float
getCellOriginX()
Get the horizontal position of the cell origin within each cell.
float
getCellOriginY()
Get the vertical position of the cell origin within each cell.
string
getGCPCoordSys()
Get OGC definition of the GCP coordinate system.
int
getGCPCount()
Get the number of GCPs stored on the raster geometry.
list of dictionaries containing keys (string) and values (float) or None
getGCPs()
Get a list of dictionaries where each dictionary contains 'row', 'col', 'x', 'y', and 'z' (optional).
float
getLowerLeftCornerX()
Get the ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.
float
getLowerLeftCornerY()
Get the ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.
float
getLowerRightCornerX()
Get the ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.
float
getLowerRightCornerY()
Get the ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.
float
getMaxX()
Get the ground coordinate value of the right-most side of the right-most cell of the raster.
float
getMaxY()
Get the ground coordinate value of the top-most side of the top-most cell of the raster.
float
getMinX()
Get the ground coordinate value of the left-most side of the left-most cell of the raster.
float
getMinY()
Get the ground coordinate value of the bottom-most side of the bottom-most cell of the raster.
int
getNumCols()
Get the number of columns in the raster.
int
getNumRows()
Get the number of rows in the raster.
float
getOriginX()
Get the x coordinate of the origin or the raster.
float
getOriginY()
Get the y coordinate of the origin or the raster.
float
getRotationX()
Get the rotation angle of the raster in radians from x axis.
float
getRotationY()
Get the rotation angle of the raster in radians from y axis.
float
getSpacingX()
Get fixed distance in the x dimension between each pixel in the raster.
float
getSpacingY()
Get fixed distance in the y dimension between each pixel in the raster.
float
getUpperLeftCornerX()
Get the ground x coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.
float
getUpperLeftCornerY()
Get the ground y coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.
float
getUpperRightCornerX()
Get the x coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.
float
getUpperRightCornerY()
Get the y coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.
bool
hasBeenModified()
This method evaluates whether the raster properties have been modified from their baseline state.
None
setAsAffineTransform(affineTransform)
This method sets origin, spacing, and rotation as an affine transformation.
None
setCellOriginX(xCellOrigin)
This method sets horizontal position of the cell origin within each cell.
None
setCellOriginY(yCellOrigin)
This method sets vertical position of the cell origin within each cell.
None
setGCPCoordSys(gcpCoordSys)
This method sets GCP coordinate system.
None
setGCPs(dataList, coordSys)
This method sets a list of GCPs on the properties.
None
setModified(modified)
This method sets whether raster properties have been modified from baseline state.
None
setNumCols(numCols)
This method sets number of columns of the raster.
None
setNumRows(numRows)
This method sets number of rows of the raster.
None
setOriginX(xOrigin)
This method sets x value of the upper left corner of the raster in ground coordinates.
None
setOriginY(yOrigin)
This method sets y value of the upper left corner of the raster in ground coordinates.
None
setRotation(rotation)
This method sets the rotation angle of the raster in radians as measured in a CCW direction.
None
setRotationX(xRotation)
This method sets the rotation angle of the raster in radians.
None
setRotationY(yRotation)
This method sets the rotation angle of the raster in radians.
None
setSpacingX(xSpacing)
This method sets the x spacing (cell size) of the raster.
None
setSpacingY(ySpacing)
This method sets the y spacing (cell size) of the raster

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(MultipleInvocations)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

equals(fmerp)

 

This method evaluates whether two properties have the identical value.

Parameters:
Returns: bool
True if the two properties had the same value.

getAsAffineTransform()

 

This method returns origin, spacing rotation as an affine transformation.

Returns: list of float
A list containing 6 values that represents the coefficients A B C D E F in the affine transformation: x' = Ax + By + C, y' = Dx + Ey + F .

getCellOriginX()

 

Get the horizontal position of the cell origin within each cell.

Returns: float
The horizontal position of the cell origin.

getCellOriginY()

 

Get the vertical position of the cell origin within each cell.

Returns: float
The vertical position of the cell origin.

getGCPCoordSys()

 

Get OGC definition of the GCP coordinate system.

Returns: string
OGC definition of the GCP coordinate system.

getGCPCount()

 

Get the number of GCPs stored on the raster geometry.

Returns: int
The number of GCPs stored on the raster geometry.

getGCPs()

 

Get a list of dictionaries where each dictionary contains 'row', 'col', 'x', 'y', and 'z' (optional).

When 'z' is not set, value of 'z' will be set to 0.

Returns: list of dictionaries containing keys (string) and values (float) or None
Row and col in raster space, and xyz location in model space.

None will be returned if raster does not contain GCPs.

getLowerLeftCornerX()

 

Get the ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMinX().

getLowerLeftCornerY()

 

Get the ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the lower-left corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMinY().

getLowerRightCornerX()

 

Get the ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMaxX().

getLowerRightCornerY()

 

Get the ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the lower-right corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMinY().

getMaxX()

 

Get the ground coordinate value of the right-most side of the right-most cell of the raster.

Returns: float
Ground coordinate value of the right-most side of the right-most cell of the raster.

getMaxY()

 

Get the ground coordinate value of the top-most side of the top-most cell of the raster.

Returns: float
Ground coordinate value of the top-most side of the right-most cell of the raster.

getMinX()

 

Get the ground coordinate value of the left-most side of the left-most cell of the raster.

Returns: float
Ground coordinate value of the left-most side of the left-most cell of the raster.

getMinY()

 

Get the ground coordinate value of the bottom-most side of the bottom-most cell of the raster.

Returns: float
Ground coordinate value of the bottom-most side of the bottom-most cell of the raster.

getNumCols()

 

Get the number of columns in the raster.

Returns: int
The number of columns.

getNumRows()

 

Get the number of rows in the raster.

Returns: int
The number of rows.

getOriginX()

 

Get the x coordinate of the origin or the raster.

Returns: float
X coordinate of the raster. It's the ground coordinate value of the top-left cell in the top-left corner of the raster.

getOriginY()

 

Get the y coordinate of the origin or the raster.

Returns: float
Y coordinate of the raster. It's the ground coordinate value of the top-left cell in the top-left corner of the raster.

getRotationX()

 

Get the rotation angle of the raster in radians from x axis.

Returns: float
Rotation angle of the raster in radians. Measured in a CCW direction from the positive x axis.

getRotationY()

 

Get the rotation angle of the raster in radians from y axis.

Returns: float
Rotation angle of the raster in radians. Measured in a CCW direction from the negative y axis.

getSpacingX()

 

Get fixed distance in the x dimension between each pixel in the raster.

Returns: float
x spacing (cell size) of the raster.

getSpacingY()

 

Get fixed distance in the y dimension between each pixel in the raster.

Returns: float
y spacing (cell size) of the raster.

getUpperLeftCornerX()

 

Get the ground x coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMinX().

getUpperLeftCornerY()

 

Get the ground y coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the upper-left corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMaxY().

getUpperRightCornerX()

 

Get the x coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMaxX().

getUpperRightCornerY()

 

Get the y coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.

Returns: float
Ground coordinate value of the upper-right corner of the unrotated raster, after rotation is applied.

When the raster is not rotated, this will be equal to the value returned by getMaxY().

hasBeenModified()

 

This method evaluates whether the raster properties have been modified from their baseline state.

Returns: bool
True if the raster properties have been modified.

setAsAffineTransform(affineTransform)

 

This method sets origin, spacing, and rotation as an affine transformation.

Parameters:
  • affineTransform (list of float) - List containing 6 Coefficients.
    • A B C D E F in the affine transformation x' = Ax + By + C, y' = Dx + Ey + F
Returns: None

setCellOriginX(xCellOrigin)

 

This method sets horizontal position of the cell origin within each cell.

Once cell origin is specified, it applies to all cells.

Parameters:
  • xCellOrigin (float) - horizontal position of the cell origin within each cell.
    • Cell origin is a normalized value so it the value should be in the range of 0.0 to 1.0 inclusive.
    • For example, cell with origin set to (0.5, 0.5) will have its origin at the center.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setCellOriginY(yCellOrigin)

 

This method sets vertical position of the cell origin within each cell.

Once cell origin is specified, it applies to all cells.

Parameters:
  • yCellOrigin (float) - vertical position of the cell origin within each cell.
    • Cell origin is a normalized value so it the value should be in the range of 0.0 to 1.0 inclusive.
    • For example, cell with origin set to (0.5, 0.5) will have its origin at the center.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setGCPCoordSys(gcpCoordSys)

 

This method sets GCP coordinate system.

Parameters:
  • gcpCoordSys (string) - GCP coordinate system.
Returns: None

setGCPs(dataList, coordSys)

 

This method sets a list of GCPs on the properties.

Parameters:
  • dataList (list of dictionaries) - A list of dictionaries where each dictionary contains row, col, x, y, and z (optional).
    • For example, to set all of the keys, a list should look like as follows: [{'row':1, 'col':2, 'x':3, 'y':4, 'z':5}].
    • To set row, col, x, and y only, do not specify 'z' in the list: [{'row':1, 'col':2, 'x':3, 'y':4}]. If z is not specified, it will be set to 0.
  • coordSys (string) - GCP coordinate system.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setModified(modified)

 

This method sets whether raster properties have been modified from baseline state.

Note that hasBeenModified is initially set to False.

Parameters:
  • modified (bool) - set True when properties is altered.
Returns: None

setNumCols(numCols)

 

This method sets number of columns of the raster.

Parameters:
  • numCols (int) - Number of columns of the raster.
    • Number must be a positive integer.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setNumRows(numRows)

 

This method sets number of rows of the raster.

Parameters:
  • numRows (int) - Number of rows of the raster.
    • Number must be a positive integer.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setOriginX(xOrigin)

 

This method sets x value of the upper left corner of the raster in ground coordinates.

Parameters:
  • xOrigin (float) - x value of the upper left corner of the raster.
Returns: None

setOriginY(yOrigin)

 

This method sets y value of the upper left corner of the raster in ground coordinates.

Parameters:
  • yOrigin (float) - y value of the upper left corner of the raster.
Returns: None

setRotation(rotation)

 

This method sets the rotation angle of the raster in radians as measured in a CCW direction.

Parameters:
  • rotation (float) - Rotation angle of the raster in radians as measured in a CCW direction.
Returns: None

setRotationX(xRotation)

 

This method sets the rotation angle of the raster in radians.

Parameters:
  • xRotation (float) - Rotation angle of the raster in radians as measured in a CCW direction from the positive x axis.
Returns: None

setRotationY(yRotation)

 

This method sets the rotation angle of the raster in radians.

Parameters:
  • yRotation (float) - Rotation angle of the raster in radians as measured in a CCW direction from the negative y axis.
Returns: None

setSpacingX(xSpacing)

 

This method sets the x spacing (cell size) of the raster.

Parameters:
  • xSpacing (float) - Fixed distance in the x dimension between each pixel in the raster. Number must be positive value.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setSpacingY(ySpacing)

 

This method sets the y spacing (cell size) of the raster

Parameters:
  • ySpacing (float) - Fixed distance in the y dimension between each pixel in the raster. Number must be positive value.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.