Isis Developer Reference
|
Initialize a map projection. More...
#include <ProjectionFactory.h>
Static Public Member Functions | |
static Isis::Projection * | Create (Isis::Pvl &label, bool allowDefaults=false) |
This method returns a pointer to a Projection object. | |
static Isis::Projection * | RingsCreate (Isis::Pvl &label, bool allowDefaults=false) |
This method returns a pointer to a RingPlaneProjection object. | |
static Isis::Projection * | CreateFromCube (Isis::Cube &cube) |
This method is a helper method. | |
static Isis::Projection * | RingsCreateFromCube (Isis::Cube &cube) |
This method is a helper method. | |
static Isis::Projection * | CreateFromCube (Isis::Pvl &label) |
This method loads a map projection from a cube returning a pointer to a Projection object. | |
static Isis::Projection * | RingsCreateFromCube (Isis::Pvl &label) |
This method loads a map projection from a cube returning a pointer to a Projection object. | |
static Isis::Projection * | CreateForCube (Isis::Pvl &label, int &ns, int &nl, bool sizeMatch=true) |
This method creates a map projection for a cube given a label. | |
static Isis::Projection * | RingsCreateForCube (Isis::Pvl &label, int &samples, int &lines, bool sizeMatch) |
This method creates a projection for a cube to a ring plane given a label. | |
static Isis::Projection * | CreateForCube (Isis::Pvl &label, int &samples, int &lines, Camera &cam) |
Create a map projection group for a cube using a camera. | |
static Isis::Projection * | RingsCreateForCube (Isis::Pvl &label, int &samples, int &lines, Camera &cam) |
Create a ring plane map projection group for a cube using a camera. | |
Initialize a map projection.
This factory class is used to obtain a Projection object given a PVL which contains a valid Mapping group. The Mapping group can come from an image/cube or a hand-created PVL file. The projection is loaded based on information using the ProjectionName contained in the Mapping group. It is plugin oriented. That is, this class looks in $ISISROOT/lib/Projection.plugin to convert the ProjectionName into a pointer to the appropriate projection class (e.g., Sinusoidal, SimpleCylindrical). This allows programmers who develop new projection to create a plugin without the need for recompiling all the Isis cartographic programs (cam2map, map2map, mappos, etc).
|
static |
This method returns a pointer to a Projection object.
The projection is intialized using information contained in a Label object. The information must be a valid Mapping group as defined in the Isis Map Projection Users Guide.
label | The label object containing a valid mapping group. |
allowDefaults | If false then the projection class as indicated by the ProjectionName keyword will require that projection specific parameters such as CenterLatitude, CenterLongitude, etc must be in the Pvl label object. Otherwise if true then those parameters that are not in the Pvl object will be initialized using the latitude/longitude range. |
Isis::iException::System | - Unsupported projection, unable to find plugin |
References _FILEINFO_, Isis::PvlObject::findGroup(), Isis::IException::Io, Isis::PvlObject::Traverse, and Isis::IException::Unknown.
Referenced by Isis::TiffImporter::convertProjection(), CreateForCube(), CreateForCube(), CreateFromCube(), Isis::ProcessExportPds::ProjectionName(), and Isis::ProcessExportPds4::StandardAllMapping().
|
static |
This method creates a map projection for a cube given a label.
The label must contain all the proper mapping information (radii, projection name, parameters, pixel resolution, etc). If the labels contain a Cube group and the Mapping group already has the upper left corner, then the values in the label will be used to set the cube size. If they don't exist then the minimum/maximum latitude/longitude values (ground range) are expected to be in the Mapping group and will be used to compute the cube size and upper left corner values.
label | A label containing valid map projection information for a cube. |
samples | The number of samples. This value is calculated in the method and returned. |
lines | The number of lines. This value is calculated in the method and returned. |
sizeMatch | Boolean value that determines whether the method should match the size of the output cube to the size of the input cube. This parameter defaults to true. |
References _FILEINFO_, Isis::IException::append(), Create(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlObject::hasObject(), Isis::Displacement::Meters, Isis::Null, Isis::PI, Isis::PvlContainer::Replace, Isis::toString(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.
Referenced by Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), and Isis::ProcessGroundPolygons::SetStatCubes().
|
static |
Create a map projection group for a cube using a camera.
This method walks the boundary of the cube computing lat/lons and then uses those lat/lon as input to the projection to compute a x/y range. This x/y range will be minimal (compared to the alternate CreateForCube method and generates significantly small cube size (samples,lines) depending on the projection. Projections with curved meridians and/or parallels generate larger x/y ranges when only looking at the ground range.
label | A label containing valid map projection information for a cube. |
samples | The number of samples. This value is calculated in the method and returned. |
lines | The number of lines. This value is calculated in the method and returned. |
cam | An initialized camera model |
References _FILEINFO_, Create(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::Displacement::Meters, Isis::PI, Isis::PvlContainer::Replace, Isis::toString(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.
|
static |
This method is a helper method.
See CreateFromCube(Pvl).
cube | A cube containing valid map projection information |
References CreateFromCube(), and Isis::Cube::label().
Referenced by Isis::Camera::Camera(), CreateFromCube(), Isis::Cube::projection(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), and Isis::UniversalGroundMap::UniversalGroundMap().
|
static |
This method loads a map projection from a cube returning a pointer to a Projection object.
label | A label containing valid map projection information for a cube. |
References _FILEINFO_, Create(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::Displacement::Meters, Isis::PvlObject::Traverse, and Isis::IException::Unknown.
|
static |
This method returns a pointer to a RingPlaneProjection object.
The projection is intialized using information contained in a Label object. The information must be a valid Mapping group as defined in the Isis Map Projection Users Guide.
label | The label object containing a valid mapping group. |
allowDefaults | If false then the projection class as indicated by the ProjectionName keyword will require that projection specific parameters such as CenterRadius, CenterRingLongitude, etc must be in the Pvl label object. Otherwise if true then those parameters that are not in the Pvl object will be initialized using the latitude/longitude range. |
Isis::iException::System | - Unsupported projection, unable to find plugin |
References _FILEINFO_, Isis::PvlObject::findGroup(), Isis::IException::Io, Isis::PvlObject::Traverse, and Isis::IException::Unknown.
Referenced by RingsCreateForCube(), RingsCreateForCube(), and RingsCreateFromCube().
|
static |
This method creates a projection for a cube to a ring plane given a label.
Currently this is utilized only for projecting images of rings to the ring plane (i.e the equatorial plane). The label must contain all the proper mapping information (radii, projection name, parameters, pixel resolution, etc). If the labels contain a Cube group and the Mapping group already has the upper left corner, then the values in the label will be used to set the cube size. If they don't exist then the minimum/maximum latitude/longitude values (ground range) are expected to be in the Mapping group and will be used to compute the cube size and upper left corner values.
label | A label containing valid map projection information for a cube. |
samples | The number of samples. This value is calculated in the method and returned. |
lines | The number of lines. This value is calculated in the method and returned. |
sizeMatch | Boolean value specifying whether the method should match the size of the output cube to the size of the input cube. Defaults to true. |
References _FILEINFO_, Isis::IException::append(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlObject::hasObject(), Isis::Displacement::Meters, Isis::Null, Isis::PI, Isis::PvlContainer::Replace, RingsCreate(), Isis::toString(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.
Referenced by Isis::ProcessMapMosaic::RingsSetOutputCube(), and Isis::ProcessMapMosaic::RingsSetOutputCube().
|
static |
Create a ring plane map projection group for a cube using a camera.
This method walks the boundary of the cube computing lat/lons and then uses those lat/lon as input to the projection to compute a x/y range. This x/y range will be minimal (compared to the alternate CreateForCube method and generates significantly small cube size (samples,lines) depending on the projection. Projections with curved meridians and/or parallels generate larger x/y ranges when only looking at the ground range.
label | A label containing valid map projection information for a cube. |
samples | The number of samples. This value is calculated in the method and returned. |
lines | The number of lines. This value is calculated in the method and returned. |
cam | An initialized camera model |
References _FILEINFO_, Isis::IException::append(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::Displacement::Meters, Isis::PI, Isis::PvlContainer::Replace, RingsCreate(), Isis::toString(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.
|
static |
This method is a helper method.
See RingsCreateFromCube(Pvl).
cube | A cube containing valid map projection information |
References Isis::Cube::label(), and RingsCreateFromCube().
Referenced by RingsCreateFromCube(), Isis::ProcessMapMosaic::RingsSetOutputCube(), and Isis::ProcessMapMosaic::RingsSetOutputCube().
|
static |
This method loads a map projection from a cube returning a pointer to a Projection object.
label | A label containing valid map projection information for a cube. |
References _FILEINFO_, Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::Displacement::Meters, RingsCreate(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.