OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
class ossimNitfCommon for global utility methods More...
#include <ossimNitfCommon.h>
Public Member Functions | |
ossimNitfCommon () | |
default constructor More... | |
~ossimNitfCommon () | |
destructor More... | |
Static Public Member Functions | |
static ossimString | convertToScientificString (const ossim_float64 &aValue, ossim_uint32 size) |
This method takes a value and a size(or width) and converts it to a scientific notation sting in the format: ±0.999999E±9. More... | |
static ossimString | convertToDoubleString (const ossim_float64 &aValue, ossim_uint32 precision, ossim_uint32 size) |
This method takes a value and converts to a string of size with requested precision with a '0' fill. More... | |
static ossimString | convertToUIntString (ossim_uint32 aValue, ossim_uint32 size) |
This method takes a value and converts to a string of size with with a '0' fill. More... | |
static ossimString | convertToIntString (ossim_int32 aValue, ossim_uint32 size) |
Just like convertToUIntString only takes a signed value. More... | |
static ossimString | convertToDdLatLonLocString (const ossimDpt &pt, ossim_uint32 precision) |
Converts pt to a decimal degrees latitude longitude location string. More... | |
static void | setField (void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ') |
Sets a field with a given string, width, and IOS flags. More... | |
static ossimString | encodeUtm (ossim_uint32 zone, const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) |
This will encode a 60 character IGEOLO field. More... | |
static ossimString | encodeGeographicDms (const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) |
static ossimString | encodeGeographicDecimalDegrees (const ossimDpt &ul, const ossimDpt &ur, const ossimDpt &lr, const ossimDpt &ll) |
static ossimString | getNitfPixelType (ossimScalarType scalarType) |
Get the nitf pixel type string from scalar type. More... | |
static ossimString | getCompressionRate (const ossimIrect &rect, ossim_uint32 bands, ossimScalarType scalar, ossim_uint64 lengthInBytes) |
Get compression rate (COMRAT) which is bits perpixel per band. More... | |
class ossimNitfCommon for global utility methods
Definition at line 24 of file ossimNitfCommon.h.
ossimNitfCommon::ossimNitfCommon | ( | ) |
ossimNitfCommon::~ossimNitfCommon | ( | ) |
|
static |
Converts pt to a decimal degrees latitude longitude location string.
Format example: +-dd.dddddd+-ddd.dddddd
pt | Point to convert where pt.x = longitude and pt.y = latitude. |
precision | The floating point precision. This will determine the size of the string. |
Definition at line 181 of file ossimNitfCommon.cpp.
References convertToDoubleString(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimNitfBlockaTag::setFrfcLoc(), ossimNitfBlockaTag::setFrlcLoc(), ossimNitfBlockaTag::setLrfcLoc(), and ossimNitfBlockaTag::setLrlcLoc().
|
static |
This method takes a value and converts to a string of size with requested precision with a '0' fill.
Format example: 00925.00
aValue | Value to convert to string. |
precision | The floating point precision. |
size | total size of the string. |
Definition at line 89 of file ossimNitfCommon.cpp.
References size.
Referenced by convertToDdLatLonLocString(), ossimNitfRpcBase::setErrorBias(), ossimNitfRpcBase::setErrorRand(), ossimNitfRpcBase::setGeodeticLatOffset(), ossimNitfRpcBase::setGeodeticLatScale(), ossimNitfRpcBase::setGeodeticLonOffset(), ossimNitfRpcBase::setGeodeticLonScale(), and ossimNitfJ2klraTag::setLayerBitRate().
|
static |
Just like convertToUIntString only takes a signed value.
This method takes a value and converts to a string of size with with a '0' fill.
Format example: 00925
aValue | Value to convert to string. |
size | total size of the string. |
Definition at line 152 of file ossimNitfCommon.cpp.
References size.
Referenced by ossimNitfBlockaTag::setBlockInstance(), ossimNitfRpcBase::setGeodeticHeightOffset(), and ossimNitfRpcBase::setGeodeticHeightScale().
|
static |
This method takes a value and a size(or width) and converts it to a scientific notation sting in the format: ±0.999999E±9.
aValue | Value to convert to string. |
size | total size of the string. This must be at least 7 if aValue is positive and at least 8 if aValue is negative; else, no action is taken and an empty string is returned. |
Definition at line 34 of file ossimNitfCommon.cpp.
References size.
|
static |
This method takes a value and converts to a string of size with with a '0' fill.
Format example: 00925
aValue | Value to convert to string. |
size | total size of the string. |
Definition at line 123 of file ossimNitfCommon.cpp.
References size.
Referenced by ossimNitfJ2klraTag::setBandsI(), ossimNitfJ2klraTag::setBandsO(), ossimNitfJ2klraTag::setLayerId(), ossimNitfJ2klraTag::setLayersI(), ossimNitfJ2klraTag::setLayersO(), ossimNitfBlockaTag::setLayoverAngle(), ossimNitfJ2klraTag::setLevelsI(), ossimNitfJ2klraTag::setLevelsO(), ossimNitfRpcBase::setLineOffset(), ossimNitfRpcBase::setLineScale(), ossimNitfBlockaTag::setLLines(), ossimNitfBlockaTag::setNGray(), ossimNitfRpcBase::setSampleOffset(), ossimNitfRpcBase::setSampleScale(), and ossimNitfBlockaTag::setShadowAngle().
|
static |
Definition at line 406 of file ossimNitfCommon.cpp.
References ossimDpt::lat, and ossimDpt::lon.
Referenced by ossimNitfImageHeaderV2_X::setGeographicLocationDecimalDegrees().
|
static |
Definition at line 387 of file ossimNitfCommon.cpp.
References ossimString::c_str(), ossimDms::toString(), ossimDpt::x, and ossimDpt::y.
|
static |
This will encode a 60 character IGEOLO field.
Definition at line 233 of file ossimNitfCommon.cpp.
Referenced by ossimNitfImageHeaderV2_X::setUtmNorth(), and ossimNitfImageHeaderV2_X::setUtmSouth().
|
static |
Get compression rate (COMRAT) which is bits perpixel per band.
This corresponds to the nitf image header COMRAT field. Return is in the form of Nxyz "N" for numerically lossles, where "xyz" indicates the expected achieved bit rate (in bits per pixel per band) for the final layer of each tile. The decimal point is implicit and assumed to be one digit from the right (i.e. xy.z).
rect | Image rectangles. |
bands | |
scalar | |
lengthInBytes | Compressed length of image pixels. |
Definition at line 507 of file ossimNitfCommon.cpp.
References ossim::getBitsPerPixel(), ossimIrect::height(), ossim::scalarSizeInBytes(), ossimString::size(), ossimString::toString(), and ossimIrect::width().
|
static |
Get the nitf pixel type string from scalar type.
scalarType | The scalar type. |
Definition at line 465 of file ossimNitfCommon.cpp.
References OSSIM_DOUBLE, OSSIM_FLOAT, OSSIM_NORMALIZED_DOUBLE, OSSIM_NORMALIZED_FLOAT, OSSIM_SINT16, OSSIM_SINT32, OSSIM_UINT16, OSSIM_UINT32, OSSIM_UINT8, OSSIM_USHORT11, OSSIM_USHORT12, OSSIM_USHORT13, OSSIM_USHORT14, OSSIM_USHORT15, ossimNotify(), and ossimNotifyLevel_DEBUG.
Referenced by ossimNitf20Writer::writeBlockBandSeparate(), ossimNitfWriter::writeBlockBandSeparate(), ossimNitf20Writer::writeBlockBandSequential(), and ossimNitfWriter::writeBlockBandSequential().
|
static |
Sets a field with a given string, width, and IOS flags.
fieldDestination | The member NITF field to set. |
src | The source string. |
width | The number of characters in fieldDestination to copy from the source string. |
ioflags | Formatting flags for the destination string. |
fill | If the size of the string is smaller than the field size, this character specifies what the excess character values are. |
Definition at line 218 of file ossimNitfCommon.cpp.
References ossimString::c_str(), and ossimString::trim().
Referenced by ossimNitfImageHeaderV2_X::loadState(), ossimNitfImageHeaderV2_X::setActualBitsPerPixel(), ossimNitfImageHeaderV2_X::setAquisitionDateTime(), ossimNitfImageHeaderV2_X::setAttachmentLevel(), ossimNitfImageHeaderV2_X::setBitsPerPixel(), ossimNitfImageHeaderV2_X::setBlocksPerCol(), ossimNitfImageHeaderV2_X::setBlocksPerRow(), ossimNitfImageHeaderV2_X::setCategory(), ossimNitfImageHeaderV2_1::setClassificationAuthority(), ossimNitfFileHeaderV2_0::setClassificationAuthority(), ossimNitfImageHeaderV2_1::setClassificationAuthorityType(), ossimNitfImageHeaderV2_1::setClassificationReason(), ossimNitfImageHeaderV2_1::setClassificationText(), ossimNitfTextHeaderV2_1::setCodewords(), ossimNitfImageHeaderV2_1::setCodewords(), ossimNitfFileHeaderV2_0::setCodeWords(), ossimNitfFileHeaderV2_X::setComplexityLevel(), ossimNitfFileHeaderV2_0::setComplianceLevel(), ossimNitfImageHeaderV2_X::setCompression(), ossimNitfImageHeaderV2_X::setCompressionRateCode(), ossimNitfTextHeaderV2_1::setControlAndHandling(), ossimNitfImageHeaderV2_1::setControlAndHandling(), ossimNitfFileHeaderV2_0::setControlAndHandling(), ossimNitfImageHeaderV2_X::setCoordinateSystem(), ossimNitfFileHeaderV2_X::setCopyNumber(), ossimRpfHeader::setCountryCode(), ossimNitfImageHeaderV2_1::setDeclassificationDate(), ossimNitfImageHeaderV2_1::setDeclassificationExempt(), ossimNitfTextHeaderV2_1::setDeclassificationType(), ossimNitfImageHeaderV2_1::setDeclassificationType(), ossimNitfImageHeaderV2_X::setDisplayLevel(), ossimNitfImageHeaderV2_1::setDowngrade(), ossimNitfImageHeaderV2_1::setDowngradeDate(), ossimNitfFileHeaderV2_0::setDowngradingEvent(), ossimNitfImageHeaderV2_X::setEncryption(), ossimNitfFileHeaderV2_X::setEncryption(), ossimRpfHeader::setFilename(), ossimNitfFileHeaderV2_X::setFileSecurityClassification(), ossimNitfImageHeaderV2_X::setGeographicLocation(), ossimRpfHeader::setGovSpecDate(), ossimRpfHeader::setGovSpecNumber(), ossimNitfImageHeaderV2_X::setImageId(), ossimNitfImageHeaderV2_1::setImageMagnification(), ossimNitfImageHeaderV2_X::setImageSource(), ossimNitfImageHeaderV2_X::setJustification(), ossimRpfReplaceUpdateRecord::setNewFilename(), ossimNitfImageHeaderV2_1::setNumberOfCols(), ossimNitfImageHeaderV2_0::setNumberOfCols(), ossimNitfImageHeaderV2_X::setNumberOfComments(), ossimNitfFileHeaderV2_X::setNumberOfCopies(), ossimNitfImageHeaderV2_X::setNumberOfPixelsPerBlockCol(), ossimNitfImageHeaderV2_X::setNumberOfPixelsPerBlockRow(), ossimNitfImageHeaderV2_1::setNumberOfRows(), ossimNitfImageHeaderV2_0::setNumberOfRows(), ossimRpfReplaceUpdateRecord::setOldFilename(), ossimNitfFileHeaderV2_X::setOriginatingStationId(), ossimNitfFileHeaderV2_0::setOriginatorsName(), ossimNitfFileHeaderV2_0::setOriginatorsPhone(), ossimNitfImageHeaderV2_X::setPixelType(), ossimNitfDataExtensionSegmentV2_1::setProperty(), ossimNitfTextHeaderV2_1::setReleasingInstructions(), ossimNitfImageHeaderV2_1::setReleasingInstructions(), ossimNitfFileHeaderV2_0::setReleasingInstructions(), ossimNitfImageHeaderV2_X::setRepresentation(), ossimNitfImageHeaderV2_X::setSecurityClassification(), ossimNitfTextHeaderV2_1::setSecurityClassification(), ossimRpfHeader::setSecurityClassification(), ossimNitfTextHeaderV2_1::setSecurityClassificationSystem(), ossimNitfImageHeaderV2_1::setSecurityClassificationSystem(), ossimNitfImageHeaderV2_1::setSecurityControlNumber(), ossimNitfFileHeaderV2_0::setSecurityControlNumber(), ossimNitfFileHeaderV2_0::setSecurityDowngrade(), ossimRpfHeader::setSecurityReleaseMarking(), ossimNitfImageHeaderV2_1::setSecuritySourceDate(), ossimNitfFileHeaderV2_X::setSystemType(), ossimNitfImageHeaderV2_X::setTargetId(), ossimNitfImageHeaderV2_X::setTitle(), and ossimNitfFileHeaderV2_X::setTitle().