Isis Developer Reference
Isis::ImagePolygon Class Reference

Create cube polygons, read/write polygons to blobs. More...

#include <ImagePolygon.h>

Collaboration diagram for Isis::ImagePolygon:
Collaboration graph

Public Member Functions

 ImagePolygon ()
 Constructs a Polygon object, setting the polygon name.
 
 ImagePolygon (Blob &blob)
 Constructs a Polygon object from a Blob.
 
 ImagePolygon (const ImagePolygon &other)
 
 ~ImagePolygon ()
 Destroys the Polygon object.
 
void Create (Cube &cube, int sinc=1, int linc=1, int ss=1, int sl=1, int ns=0, int nl=0, int band=1, bool increasePrecision=false)
 Create a Polygon from given cube.
 
void Create (std::vector< std::vector< double > > polyCoordinates)
 
CamerainitCube (Cube &cube, int ss=1, int sl=1, int ns=0, int nl=0, int band=1)
 Create a Polygon from given cube.
 
void Emission (double emission)
 Set the maximum emission angle ( light refleted to camera )
 
void Incidence (double incidence)
 Set the maximum incidence angle ( light contacting the planet )
 
void EllipsoidLimb (bool ellip)
 If a limb is detected, use un ellipsoid shape model if true.
 
void SubpixelAccuracy (int div)
 The subpixel accuracy to use.
 
geos::geom::MultiPolygon * Polys ()
 Return a geos Multipolygon.
 
std::string polyStr () const
 Return a geos Multipolygon.
 
double validSampleDim ()
 Retuns the maximum valid sample width of the cube set with either initCube() or Create()
 
double validLineDim ()
 Retuns the maximum valid line width of the cube set with either initCube() or Create()
 
int getSinc () const
 Return the sample increment used the create this polygon.
 
int getLinc () const
 Return the line increment used the create this polygon.
 
int numVertices () const
 
Blob toBlob () const
 Serialize the ImagePolygon to a Blob.
 

Detailed Description

Create cube polygons, read/write polygons to blobs.

This class creates polygons defining an image boundary, reads the polygon from a cube blob, and writes a polygon to a cube blob. The GEOS (Geometry Engine Open Source) package is used to create and manipulate the polygons. See http://geos.refractions.net for information about this package.

Author
2005-11-22 Tracie Sucharski

Constructor & Destructor Documentation

◆ ImagePolygon() [1/3]

Isis::ImagePolygon::ImagePolygon ( )

Constructs a Polygon object, setting the polygon name.

◆ ImagePolygon() [2/3]

Isis::ImagePolygon::ImagePolygon ( Blob & blob)

Constructs a Polygon object from a Blob.

References Isis::globalFactory, and Isis::PolygonTools::MakeMultiPolygon().

◆ ImagePolygon() [3/3]

Isis::ImagePolygon::ImagePolygon ( const ImagePolygon & other)

◆ ~ImagePolygon()

Isis::ImagePolygon::~ImagePolygon ( )

Destroys the Polygon object.

Member Function Documentation

◆ Create() [1/2]

void Isis::ImagePolygon::Create ( Cube & cube,
int sinc = 1,
int linc = 1,
int ss = 1,
int sl = 1,
int ns = 0,
int nl = 0,
int band = 1,
bool increasePrecision = false )

Create a Polygon from given cube.

Parameters
[in]cube(Cube &) Cube used to create polygon
[in]sinc(Default=1) (in) Pixel increment to define the granularity of the resulting polygon in the sample direction
[in]linc(Default=1) (in) Pixel increment to define the granularity of the resulting polygon in the line direction
[in]ss(Default=1) (in) Starting sample number
[in]sl(Default=1) (in) Starting Line number
[in]ns(Default=0) (in) Number of samples used to create the polygon. Default of 0 will cause ns to be set to the number of samples in the cube.
[in]nl(Default=0) (in) Number of lines used to create the polygon. Default of 0 will cause nl to be set to the number of lines in the cube.
[in]band(Default=1) (in) Image band number
increasePrecisionIteratively refine sinc and linc (defaults to false)
History

2008-04-28 Tracie Sucharski, When calculating p_pixInc, set to 1 if values calculated is 0.

2008-12-30 Tracie Sucharski - If ground map returns pole make sure it is actually on the image.

2009-05-28 Stuart Sides - Added the quality argument.

References _FILEINFO_, Isis::UniversalGroundMap::Camera(), Isis::Cube::fileName(), Isis::Sensor::IgnoreElevationModel(), initCube(), and Isis::IException::User.

◆ Create() [2/2]

void Isis::ImagePolygon::Create ( std::vector< std::vector< double > > polyCoordinates)

References Isis::globalFactory.

◆ EllipsoidLimb()

void Isis::ImagePolygon::EllipsoidLimb ( bool ellip)
inline

If a limb is detected, use un ellipsoid shape model if true.

If false, use the default (spiceinit defined) shape model.

Parameters
ellipTrue to use ellipsoid on limb images

◆ Emission()

void Isis::ImagePolygon::Emission ( double emission)
inline

Set the maximum emission angle ( light refleted to camera )

Parameters
emissionThe maximum valid emission angle

◆ getLinc()

int Isis::ImagePolygon::getLinc ( ) const
inline

Return the line increment used the create this polygon.

◆ getSinc()

int Isis::ImagePolygon::getSinc ( ) const
inline

Return the sample increment used the create this polygon.

◆ Incidence()

void Isis::ImagePolygon::Incidence ( double incidence)
inline

Set the maximum incidence angle ( light contacting the planet )

Parameters
incidenceThe maximum valid incidence angle

◆ initCube()

Camera * Isis::ImagePolygon::initCube ( Cube & cube,
int ss = 1,
int sl = 1,
int ns = 0,
int nl = 0,
int band = 1 )

Create a Polygon from given cube.

Parameters
[in]cube(Cube &) Cube used to create polygon
[in]ss(Default=1) (in) Starting sample number
[in]sl(Default=1) (in) Starting Line number
[in]ns(Default=0) (in) Number of samples used to create the polygon. Default of 0 will cause ns to be set to the number of samples in the cube.
[in]nl(Default=0) (in) Number of lines used to create the polygon. Default of 0 will cause nl to be set to the number of lines in the cube.
[in]band(Default=1) (in) Image band number

References _FILEINFO_, Isis::Cube::camera(), Isis::UniversalGroundMap::Camera(), Isis::Cube::fileName(), Isis::Sensor::IgnoreElevationModel(), Isis::Cube::lineCount(), Isis::Cube::pixelType(), Isis::Cube::projection(), Isis::Cube::sampleCount(), Isis::UniversalGroundMap::SetBand(), and Isis::IException::User.

Referenced by Create().

◆ numVertices()

int Isis::ImagePolygon::numVertices ( ) const
inline

◆ Polys()

geos::geom::MultiPolygon * Isis::ImagePolygon::Polys ( )
inline

Return a geos Multipolygon.

◆ polyStr()

std::string Isis::ImagePolygon::polyStr ( ) const
inline

Return a geos Multipolygon.

Referenced by toBlob().

◆ SubpixelAccuracy()

void Isis::ImagePolygon::SubpixelAccuracy ( int div)
inline

The subpixel accuracy to use.

This accuracy is the number of binary steps to take to find the subpixel accuracy. A higher number provided gives more accurate results at the cost of runtime.

ImagePolygon's constructor sets a default value of 50

Parameters
divThe subpixel accuracy to use

◆ toBlob()

Blob Isis::ImagePolygon::toBlob ( ) const

Serialize the ImagePolygon to a Blob.

The polygon will be serialized as a WKT srtring.

Returns
Blob

References _FILEINFO_, polyStr(), and Isis::IException::Programmer.

Referenced by Isis::Image::isFootprintable(), and Isis::Shape::isFootprintable().

◆ validLineDim()

double Isis::ImagePolygon::validLineDim ( )

Retuns the maximum valid line width of the cube set with either initCube() or Create()

◆ validSampleDim()

double Isis::ImagePolygon::validSampleDim ( )

Retuns the maximum valid sample width of the cube set with either initCube() or Create()


The documentation for this class was generated from the following files: