38 static const char ENABLE_BLOCKA_KW[] =
"enable_blocka_tag";
39 static const char ENABLE_RPCB_KW[] =
"enable_rpcb_tag";
40 static const char ENABLE_GEOLOB_KW[] =
"enable_geolob_tag";
48 theEnableRpcbTagFlag(false),
49 theEnableBlockaTagFlag(
true),
50 theEnableGeolobTagFlag(
true)
57 theEnableRpcbTagFlag(false),
58 theEnableBlockaTagFlag(
true),
59 theEnableGeolobTagFlag(
true)
73 if (name == ENABLE_RPCB_KW)
77 else if (name == ENABLE_BLOCKA_KW)
81 else if (name == ENABLE_GEOLOB_KW)
97 if(name == ENABLE_BLOCKA_KW)
101 else if (name == ENABLE_GEOLOB_KW)
105 else if(name == ENABLE_RPCB_KW)
118 std::vector<ossimString>& propertyNames)
const 122 propertyNames.push_back(ENABLE_BLOCKA_KW);
123 propertyNames.push_back(ENABLE_GEOLOB_KW);
124 propertyNames.push_back(ENABLE_RPCB_KW);
129 const char* prefix)
const 145 const char* lookup = kwl.
find(prefix, ENABLE_BLOCKA_KW);
153 lookup = kwl.
find(prefix, ENABLE_GEOLOB_KW);
160 lookup = kwl.
find(prefix, ENABLE_RPCB_KW);
285 <<
"ossimNitfWriterBase::addBlockaTag DEBUG:" 293 hdr->
addTag(blockaTagInfo);
312 if ( (gsd.
hasNans() ==
false) && (gsd.
x > 0.0) && (gsd.
y > 0.0) )
320 if ( (tie.
lat <= 90.0) && (tie.
lon >= -180.0) )
331 hdr->
addTag(geolobTagInfo);
336 <<
"ossimNitfWriterBase::addGeolobTag DEBUG:" 337 <<
"\nAdded GEOLOB Tag:\n" << *(geolobTag.
get())
353 bool useElevation =
false;
358 useElevation =
false;
375 <<
"ossimNitfWriterBase::addRpcbTag DEBUG:" 377 <<
"\nProjection:\n";
382 <<
"\nRect: " << rect << std::endl;
398 const std::streamoff MB = 1024 * 1024;
399 const std::streamoff MB50 = 50 * MB;
400 const std::streamoff GIG = 1000 * MB;
401 const std::streamoff GIG2 = 2 * GIG;
405 if ( (endPosition >= MB50) && (endPosition < GIG) )
409 else if ( (endPosition >= GIG) && (endPosition < GIG2) )
413 else if (endPosition >= GIG2)
429 if (
max > 65536) complexity =
"07";
430 else if (
max > 8192) complexity =
"06";
431 else if (
max > 2048) complexity =
"05";
467 findPreference(
"nitf_writer.site_configuration_file");
468 if ( lookup && fileHdr && imgHdr )
virtual void setProperty(ossimRefPtr< ossimProperty > property)
Set the properties.
bool theEnableGeolobTagFlag
If true user wants to set GEOLOG tag.
virtual const ossimDpt & getDecimalDegreesPerPixel() const
Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing...
void setFrlcLoc(const ossimDpt &pt)
Convert latitude and logitude to theFrlcLoc string.
ossimGpt urGroundPt() const
Returns the upper right ground point.
virtual void setFileHeaderV2_1(ossimRefPtr< ossimNitfFileHeaderV2_1 >, bool preferSource=false)
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
ossim_int32 linesPerImage() const
void setLrfcLoc(const ossimDpt &pt)
Convert latitude and logitude to theLrfcLoc string.
ossimRefPtr< ossimNitfRegisteredTag > getNitfRpcBTag() const
Represents serializable keyword/value map.
bool addFile(const char *file)
ossimNitfWriterBase()
default constructor
bool theEnableBlockaTagFlag
If true user wants to set BLOCKA tag.
const char * find(const char *key) const
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
void setLrlcLoc(const ossimDpt &pt)
Convert latitude and logitude to theLrlcLoc string.
void setBlockInstance(ossim_uint32 block)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual bool isGeographic() const
void setPixelType(ossimPixelType type)
Sets the data member "thePixelType".
bool getCornerGpts(ossimGpt &ul, ossimGpt &ur, ossimGpt &lr, ossimGpt &ll) const
Assigns the ossimGpts with the ground coordinates of the four corresponding image corner points...
Pure virtual base class for image file writers.
ossimDpt lrEastingNorthingPt() const
Returns the lower right easting and northing as a ossimDpt.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
void solveCoefficients(const ossimDrect &imageBounds, ossimProjection *imageProj, ossim_uint32 xSamples=8, ossim_uint32 ySamples=8)
This will convert any projector to an RPC model.
ossimPixelType getPixelType() const
Returns data member "thePixelType".
void addBlockaTag(ossimMapProjectionInfo &mapInfo, ossimNitfImageHeaderV2_X *hdr)
Adds the BLOCKA tag.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
void setFrfcLoc(const ossimDpt &pt)
Convert latitude and logitude to theFrfcLoc string.
void setDegreesPerPixelLon(const ossim_float64 &deltaLon)
Sets the ARV field from decimal degrees per pixel longitude.
ossimRefPtr< ossimImageSourceSequencer > theInputConnection
void addRpcbTag(const ossimIrect &rect, ossimProjection *proj, ossimNitfImageHeaderV2_X *hdr)
Adds the RPC00B tag.
ossimGpt lrGroundPt() const
Returns the lower right ground point.
bool toBool() const
String to numeric methods.
virtual ossimIrect getBoundingRect(ossim_uint32 resLevel=0) const
This will return the bounding rect of the source.
unsigned long long ossim_uint64
unsigned int ossim_uint32
OSSIM nitf writer base class to hold methods common to all nitf writers.
ossimGpt ulGroundPt() const
Returns the upper left ground point.
ossimDpt urEastingNorthingPt() const
Returns the upper right easting and northing as a ossimDpt.
void setLso(const ossim_float64 &lso)
Sets the LSO field(Longitude Origin).
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual const ossimGpt & getUlGpt() const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
static ossimPreferences * instance()
ossimDpt llEastingNorthingPt() const
Returns the lower left easting and northing as a ossimDpt.
void setLLines(ossim_uint32 lines)
virtual void setImageHeaderV2_1(ossimRefPtr< ossimNitfImageHeaderV2_1 >, bool preferSource=false)
void addGeolobTag(const ossimMapProjection *mapProj, ossimNitfImageHeaderV2_X *hdr)
Adds the GEOLOB tag.
ossimDpt ulEastingNorthingPt() const
Returns the upper left easting and northing as a ossimDpt.
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
virtual void initializeDefaultsFromConfigFile(ossimNitfFileHeaderV2_X *fileHdr, ossimNitfImageHeaderV2_X *imgHdr)
Sets file header and image header defaults from config file if found in preferences.
virtual void setProperty(ossimRefPtr< ossimProperty > property)
void writeGeometry(ossimNitfImageHeaderV2_X *hdr, ossimImageSourceSequencer *seq)
Populates tags with geometry info from projection.
void setPso(const ossim_float64 &pso)
Sets the PSO field(Latitude Origin).
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Initializes the state of the writer from kwl with prefix then calls base class ossimImageFileWriter::...
void setComplexityLevel(std::streamoff, ossimNitfFileHeaderV2_X *hdr)
Sets the complexity level of theFileHeader.
virtual void addRegisteredTag(ossimRefPtr< ossimNitfRegisteredTag > registeredTag)
This currently only support Rational poilynomial B format.
virtual ossimString getExtension() const
Returns a 3-letter extension from the image type descriptor (theOutputImageType) that can be used for...
ossim_int32 getZone() const
bool hasProjection() const
Returns TRUE if valid projection defined.
void setDegreesPerPixelLat(const ossim_float64 &deltaLat)
Sets the BRV field from decimal degrees per pixel latitude.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
Gets a property.
#define RTTI_DEF1(cls, name, b1)
char getHemisphere() const
virtual ~ossimNitfWriterBase()
bool theEnableRpcbTagFlag
If true user wants to set RPC00B tag.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the state of the writer to kwl with prefix then calls base class ossimImageFileWriter::saveStat...
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossimGpt llGroundPt() const
Returns the lower left ground point.