![]()  | 
  
    Isis Developer Reference
    
   | 
 
Create cube polygons, read/write polygons to blobs. More...
#include <ImagePolygon.h>

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) | 
| Camera * | initCube (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.   | |
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.
| Isis::ImagePolygon::ImagePolygon | ( | ) | 
Constructs a Polygon object, setting the polygon name.
| Isis::ImagePolygon::ImagePolygon | ( | Blob & | blob | ) | 
Constructs a Polygon object from a Blob.
References Isis::globalFactory, and Isis::PolygonTools::MakeMultiPolygon().
| Isis::ImagePolygon::ImagePolygon | ( | const ImagePolygon & | other | ) | 
| Isis::ImagePolygon::~ImagePolygon | ( | ) | 
Destroys the Polygon object.
| 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.
| [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 | 
| increasePrecision | Iteratively refine sinc and linc (defaults to false) | 
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.
| void Isis::ImagePolygon::Create | ( | std::vector< std::vector< double > > | polyCoordinates | ) | 
References Isis::globalFactory.
      
  | 
  inline | 
If a limb is detected, use un ellipsoid shape model if true.
If false, use the default (spiceinit defined) shape model.
| ellip | True to use ellipsoid on limb images | 
      
  | 
  inline | 
Set the maximum emission angle ( light refleted to camera )
| emission | The maximum valid emission angle | 
      
  | 
  inline | 
Return the line increment used the create this polygon.
      
  | 
  inline | 
Return the sample increment used the create this polygon.
      
  | 
  inline | 
Set the maximum incidence angle ( light contacting the planet )
| incidence | The maximum valid incidence angle | 
| 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.
| [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().
      
  | 
  inline | 
      
  | 
  inline | 
Return a geos Multipolygon.
      
  | 
  inline | 
Return a geos Multipolygon.
Referenced by toBlob().
      
  | 
  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
| div | The subpixel accuracy to use | 
| Blob Isis::ImagePolygon::toBlob | ( | ) | const | 
Serialize the ImagePolygon to a Blob.
The polygon will be serialized as a WKT srtring.
References _FILEINFO_, polyStr(), and Isis::IException::Programmer.
Referenced by Isis::Image::isFootprintable(), and Isis::Shape::isFootprintable().
| double Isis::ImagePolygon::validLineDim | ( | ) | 
Retuns the maximum valid line width of the cube set with either initCube() or Create()
| double Isis::ImagePolygon::validSampleDim | ( | ) | 
Retuns the maximum valid sample width of the cube set with either initCube() or Create()