Raster
Description
- Derived from
-
GeoObject abstract
Defines a mapping from raster space to map space.
The definition of raster coordinates is taken from the aggregated IRasterTransform object (see Transform). The definition of map coordinates is taken from the aggregated CoordinateSystem object (see Coordinates). A Raster object needs to be combined with a MapInfo value, in order to create a full geo-reference, usually by implementing the IGeorefInfo interface.
Use the Projection method to obtain a factory for creating IMapProjection object, which can be used to transform coordinates between geo-references.
Public / Constants
GeographicCube
A cubemap raster using the CoordinateSystem.WGS84 coordinate system with a cubemap edge length of MappingUtil.MaxSize.
GeographicMoon
A cubemap raster using the CoordinateSystem.Moon coordinate system with a cubemap edge length of MappingUtil.MaxSize.
GeographicRect
A rectangular raster using the CoordinateSystem.WGS84 coordinate system with a raster width of MappingUtil.MaxSize and a raster height that is half of the width, which maps geographic coordinates similarly to MapProjectionFactory.PlateCaree.
PopularMercator
A rectangular raster using the CoordinateSystem.PopularMercator coordinate system with an edge length of MappingUtil.MaxSize.
Public / Constructors
AdjustMap
Adjusts the given raster for the specified map.
If the given map in is a cubemap (see MapType.Cube), the raster transform (see Transform) of the given raster in will be resized to the cubemap size (see MapInfo.Size) of map in, using IRasterTransform.RasterSize.
Raster
Creates a new instance of Raster.
If the given raster transform opt uses a cubemap (see IRasterTransform.Size), the given coordinate system will be converted to a geographic one via CoordinateSystem.ToGeographic. If the given coordinate system is local (see CoordinateSystem.IsLocal), it will be ignored and CoordinateSystem.WGS84 will be used instead. This ensures that the resulting raster specification is always consistent.
Public / Methods
AdjustCube
Converts this raster to a geographic cubemap raster.
This method uses CoordinateSystem.ToGeographic to obtain the geographic coordinate system and RasterTransform.Cube to obtain the raster transform.
AdjustFace
Converts this cubemap raster to a rectangular raster.
This method uses to IRasterTransform.RasterFace to convert Transform and then returns an updated Raster.
AdjustOffset
Offsets the rectangular raster transform by the given amounts.
This method uses to IRasterTransform.RasterOffset to offset Transform and then returns an updated Raster.
AdjustScale
2 overloads
Scales the rectangular raster transform by the given factor.
This method uses to IRasterTransform.RasterScale to scale Transform and then returns an updated Raster.
Scales the rectangular raster transform by the given factors.
This method uses to IRasterTransform.RasterScale to scale Transform and then returns an updated Raster.
AdjustSize
Resizes the cubemap raster transform to the given size opt.
This method uses to IRasterTransform.RasterSize to resize the cubemap of Transform and then returns an updated Raster.
CreateGroundSampleDistance
Computes the ground sample distance of this raster.
Depending on the coordinate system type, the ground sample distance is computed as follows:
-
CoordinateSystem.IsGeographic:
The raster coordinates are converted to geographic coordinates using the raster transform (see Transform). Then, geocentric coordinates are computed according to the geodetic datum (see CoordinateSystem.Geographic), from which the ground sample distance is derived. -
CoordinateSystem.IsProjection:
The raster coordinates are converted to projected map coordinates using the raster transform (see Transform). Then, the coordinate operation (see CoordinateSystem.Projection) is used to obtain geographic coordinates from projected map coordinates. From there, the ground sample distance is computed as described for CoordinateSystem.IsGeographic. -
CoordinateSystem.IsLocal:
The raster coordinates are converted to local coordinates using the raster transform (see Transform). The ground sample distance is then derived directly from the local coordinates.
If the geo-reference parameters are incomplete or invalid, Vec4D.Undefined is returned.
Projection
Returns a factory for map projections that transform raster coordinates from this raster (source) to the given one (target).
When no target raster is specified (i.e. the target opt parameter is null
), the map projection will transform raster coordinates to 3D geographic coordinates (latitude, longitude, ellipsoid height), based on the geodetic datum of this coordinate system (see Coordinates). If a datum transform is given (i.e. the transform opt parameter is not null
), it will be applied to the 3D geographic coordinates. The method assumes that the calling code has chosen a datum transform that is consistent with this coordinate system.
If a target raster is given (i.e the target opt parameter is not null
, the map projection will transform source raster coordinates to target raster coordinates. If the source and target raster use different datums (geodetic and/or vertical), one or more additional datum transforms may be necessary. When the transform opt parameter is null
, the method tries to find a suitable composite datum transform in the current geo registry (see GeoRegistry). If no transform is found, the method silently assumes that no datum transformation is necessary. This behaviour can be overridden by providing a non-null value to the transform opt parameter, which will then be used instead (skipping the lookup).
The map types (i.e. MapType.Rect and MapType.Cube) of the source and target rasters are derived from the RasterType property value.
- GeorefException
-
If the geo-reference parameters are incomplete or invalid.
Public / Attributes
Coordinates
The coordinate system of map space.
If Transform is a cubemap raster transform (see RasterType), Coordinates will always be geographic (see CoordinateSystem.IsGeographic).
RasterType
Returns the MapType value of this raster, according to IRasterTransform.Size of Transform.
Transform
The transform that maps raster coordinates (rectangular or cubemap, see IRasterTransform.Size) to projected map coordinates (see CoordinateSystem.IsProjection), to geographic coordinates (see CoordinateSystem.IsGeographic) or to local coordinates (see CoordinateSystem.IsLocal).
If Transform is a cubemap raster transform (see IRasterTransform.Size), Coordinates will always be geographic (see CoordinateSystem.IsGeographic).