![]() |
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. More... | |
ImagePolygon (Blob &blob) | |
Constructs a Polygon object from a Blob. More... | |
~ImagePolygon () | |
Destroys the Polygon object. More... | |
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. More... | |
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. More... | |
void | Emission (double emission) |
Set the maximum emission angle ( light refleted to camera ) More... | |
void | Incidence (double incidence) |
Set the maximum incidence angle ( light contacting the planet ) More... | |
void | EllipsoidLimb (bool ellip) |
If a limb is detected, use un ellipsoid shape model if true. More... | |
void | SubpixelAccuracy (int div) |
The subpixel accuracy to use. More... | |
geos::geom::MultiPolygon * | Polys () |
Return a geos Multipolygon. More... | |
std::string | polyStr () const |
Return a geos Multipolygon. More... | |
double | validSampleDim () |
Retuns the maximum valid sample width of the cube set with either initCube() or Create() More... | |
double | validLineDim () |
Retuns the maximum valid line width of the cube set with either initCube() or Create() More... | |
int | getSinc () const |
Return the sample increment used the create this polygon. More... | |
int | getLinc () const |
Return the line increment used the create this polygon. More... | |
int | numVertices () const |
Blob | toBlob () const |
Serialize the ImagePolygon to a Blob. More... | |
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::Blob::getBuffer(), Isis::globalFactory, Isis::PolygonTools::MakeMultiPolygon(), and Isis::Blob::Size().
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) |
References _FILEINFO_, Isis::Camera::BasicMapping(), Isis::UniversalGroundMap::Camera(), Isis::Cube::fileName(), Isis::Sensor::IgnoreElevationModel(), initCube(), Isis::IException::print(), 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::IException::append(), Isis::Cube::camera(), Isis::UniversalGroundMap::Camera(), Isis::Cube::fileName(), Isis::Camera::HasProjection(), 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.
Referenced by Isis::ImageOverlapSet::FindImageOverlaps(), and Isis::UniversalGroundMap::GroundRange().
|
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(), Isis::IException::Programmer, and Isis::Blob::setData().
Referenced by Isis::Image::isFootprintable(), Isis::Shape::isFootprintable(), and Isis::Cube::write().
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()
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 15:14:10 |