本文整理汇总了C++中ossimIrect::ll方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimIrect::ll方法的具体用法?C++ ossimIrect::ll怎么用?C++ ossimIrect::ll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimIrect
的用法示例。
在下文中一共展示了ossimIrect::ll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pointList
void oms::SingleImageChain::setImageCut(const ossimIrect& rect)
{
std::vector<ossimDpt> pointList(4);
pointList[0] = rect.ul();
pointList[1] = rect.ur();
pointList[2] = rect.lr();
pointList[3] = rect.ll();
setImageCut(pointList);
}
示例2: theUlCorner
//*******************************************************************
// Public Constructor: ossimDrect
//
//*******************************************************************
ossimDrect::ossimDrect(const ossimIrect& rect)
:
theUlCorner(rect.ul()),
theUrCorner(rect.ur()),
theLrCorner(rect.lr()),
theLlCorner(rect.ll()),
theOrientMode(rect.orientMode())
{
if(rect.isNan())
{
makeNan();
}
}
示例3: LineSampleToWorld
ossimDrect shapefileClip::LineSampleToWorld(ossimIrect rect, ossimRefPtr<ossimImageGeometry> ImageGeom)
{
ossimGpt gp1;
ossimGpt gp2;
ossimGpt gp3;
ossimGpt gp4;
ImageGeom->localToWorld(rect.ul(), gp1);
ImageGeom->localToWorld(rect.ur(), gp2);
ImageGeom->localToWorld(rect.lr(), gp3);
ImageGeom->localToWorld(rect.ll(), gp4);
ossimDrect boundsRect(ossimDpt(gp1.lond(), gp1.latd()),
ossimDpt(gp2.lond(), gp2.latd()),
ossimDpt(gp3.lond(), gp3.latd()),
ossimDpt(gp4.lond(), gp4.latd()),
OSSIM_RIGHT_HANDED);
return boundsRect;
}
示例4: bufferDataSpace
bool ossim_hdf5::crossesDateline( H5::DataSet& dataset, const ossimIrect& validRect )
{
bool result = false;
H5::DataSpace dataspace = dataset.getSpace();
// Number of dimensions of the input dataspace:
const ossim_int32 DIM_COUNT = dataspace.getSimpleExtentNdims();
if ( DIM_COUNT == 2 )
{
const ossim_uint32 ROWS = validRect.height();
const ossim_uint32 COLS = validRect.width();
// Get the extents. Assuming dimensions are same for lat lon dataset.
std::vector<hsize_t> dimsOut(DIM_COUNT);
dataspace.getSimpleExtentDims( &dimsOut.front(), 0 );
if ( (ROWS <= dimsOut[0]) && (COLS <= dimsOut[1]) )
{
std::vector<hsize_t> inputCount(DIM_COUNT);
std::vector<hsize_t> inputOffset(DIM_COUNT);
inputCount[0] = 1; // row
inputCount[1] = COLS; // col
// Output dataspace dimensions.
const ossim_int32 OUT_DIM_COUNT = 3;
std::vector<hsize_t> outputCount(OUT_DIM_COUNT);
outputCount[0] = 1; // single band
outputCount[1] = 1; // single line
outputCount[2] = COLS; // single sample
// Output dataspace offset.
std::vector<hsize_t> outputOffset(OUT_DIM_COUNT);
outputOffset[0] = 0;
outputOffset[1] = 0;
outputOffset[2] = 0;
ossimScalarType scalar = ossim_hdf5::getScalarType( &dataset );
if ( scalar == OSSIM_FLOAT32 )
{
// See if we need to swap bytes:
ossimEndian* endian = 0;
if ( ( ossim::byteOrder() != ossim_hdf5::getByteOrder( &dataset ) ) )
{
endian = new ossimEndian();
}
// Native type:
H5::DataType datatype = dataset.getDataType();
// Output dataspace always the same one line.
H5::DataSpace bufferDataSpace( OUT_DIM_COUNT, &outputCount.front());
bufferDataSpace.selectHyperslab( H5S_SELECT_SET,
&outputCount.front(),
&outputOffset.front() );
//---
// Dataset sample has NULL lines at the end so scan for valid rect.
// Use "<= -999" for test as per NOAA as it seems the NULL value is
// fuzzy. e.g. -999.3.
//---
// Buffer to hold a line:
std::vector<ossim_float32> lineBuffer(validRect.width());
// Read the first line:
inputOffset[0] = static_cast<hsize_t>(validRect.ul().y);
inputOffset[1] = static_cast<hsize_t>(validRect.ul().x);
dataspace.selectHyperslab( H5S_SELECT_SET,
&inputCount.front(),
&inputOffset.front() );
dataset.read( &(lineBuffer.front()), datatype, bufferDataSpace, dataspace );
if ( endian )
{
// If the endian pointer is initialized(not zero) swap the bytes.
endian->swap( &(lineBuffer.front()), COLS );
}
// Test the first line:
result = ossim_hdf5::crossesDateline( lineBuffer );
if ( !result )
{
// Test the last line:
inputOffset[0] = static_cast<hsize_t>(validRect.ll().y);
inputOffset[1] = static_cast<hsize_t>(validRect.ll().x);
dataspace.selectHyperslab( H5S_SELECT_SET,
&inputCount.front(),
&inputOffset.front() );
dataset.read( &(lineBuffer.front()), datatype, bufferDataSpace, dataspace );
result = ossim_hdf5::crossesDateline( lineBuffer );
}
if ( endian )
{
delete endian;
//.........这里部分代码省略.........