OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimGeoAnnotationEllipseObject Class Reference

#include <ossimGeoAnnotationEllipseObject.h>

Inheritance diagram for ossimGeoAnnotationEllipseObject:
ossimGeoAnnotationObject ossimAnnotationObject ossimObject ossimReferenced

Public Member Functions

 ossimGeoAnnotationEllipseObject (const ossimGpt &center=ossimGpt(0, 0), const ossimDpt &widthHeight=ossimDpt(0, 0), bool enableFill=false, ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1)
 
 ossimGeoAnnotationEllipseObject (const ossimGeoAnnotationEllipseObject &rhs)
 
virtual ossimObjectdup () const
 
virtual void applyScale (double x, double y)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual void draw (ossimRgbImage &anImage) const
 
virtual bool intersects (const ossimDrect &rect) const
 
virtual ossimAnnotationObjectgetNewClippedObject (const ossimDrect &rect) const
 
virtual void getBoundingRect (ossimDrect &rect) const
 
virtual void computeBoundingRect ()
 
virtual void transform (ossimImageGeometry *projection)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Saves the current state of this object. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
virtual void setEllipseWidthHeightUnitType (ossimUnitType type)
 
virtual void setWidthHeight (const ossimDpt &pt)
 Sets the width and height of point. More...
 
virtual void setAzimuth (ossim_float64 azimuth)
 Sets the azimuth. More...
 
virtual ossim_float64 getAzimuth () const
 Gets the azimuth. More...
 
virtual void setColor (ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
 Sets the color of theProjectedEllipse. More...
 
virtual void setThickness (ossim_uint8 thickness)
 Sets the pen thickness of theProjectedEllipse. More...
 
virtual void setFillFlag (bool flag)
 Sets the fill flag. More...
 
virtual bool getFillFlag () const
 
virtual void setDrawAxesFlag (bool flag)
 Turns on and off drawing of axes on the ellipse. More...
 
virtual bool getDrawAxesFlag () const
 
virtual void setCenter (const ossimGpt &gpt)
 Sets the center ground point. More...
 
virtual void getCenter (ossimGpt &gpt) const
 
- Public Member Functions inherited from ossimGeoAnnotationObject
 ossimGeoAnnotationObject (unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
 
 ossimGeoAnnotationObject (const ossimGeoAnnotationObject &rhs)
 
- Public Member Functions inherited from ossimAnnotationObject
virtual ~ossimAnnotationObject ()
 
 ossimAnnotationObject (ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1)
 
virtual void applyScale (const ossimDpt &scale)
 
virtual ossimDrect getBoundingRect () const
 
void getColor (ossim_uint8 &r, ossim_uint8 &g, ossim_uint8 &b) const
 
ossim_uint8 getThickness () const
 
virtual bool isPointWithin (const ossimDpt &imagePoint) const
 
virtual ossimString getName () const
 
virtual void setName (const ossimString &name)
 
ossim_uint32 getId () const
 
virtual ossim_uint32 setId ()
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Protected Member Functions

virtual ~ossimGeoAnnotationEllipseObject ()
 
void getWidthHeightInPixels (ossimDpt &widthHeight, const ossimImageGeometry *projection) const
 
- Protected Member Functions inherited from ossimGeoAnnotationObject
virtual ~ossimGeoAnnotationObject ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimRefPtr< ossimAnnotationEllipseObjecttheProjectedEllipse
 
ossimGpt theCenter
 
ossimDpt theWidthHeight
 
ossimUnitType theEllipseWidthHeightUnitType
 
- Protected Attributes inherited from ossimAnnotationObject
ossim_uint8 theRed
 
ossim_uint8 theGreen
 
ossim_uint8 theBlue
 
ossim_uint8 theThickness
 
ossimString theName
 
ossim_uint32 theId
 

Additional Inherited Members

- Static Public Member Functions inherited from ossimAnnotationObject
static ossim_uint32 getNextId ()
 
static void restIdCounter ()
 
- Static Protected Attributes inherited from ossimAnnotationObject
static ossim_uint32 theIdCounter = 0
 

Detailed Description

Definition at line 14 of file ossimGeoAnnotationEllipseObject.h.

Constructor & Destructor Documentation

◆ ossimGeoAnnotationEllipseObject() [1/2]

ossimGeoAnnotationEllipseObject::ossimGeoAnnotationEllipseObject ( const ossimGpt center = ossimGpt(0,0),
const ossimDpt widthHeight = ossimDpt(0,0),
bool  enableFill = false,
ossim_uint8  r = 255,
ossim_uint8  g = 255,
ossim_uint8  b = 255,
ossim_uint8  thickness = 1 
)

It is important to note that the width and height should be specified in width = deltaLon and height = deltaLat. Use the ossimDpt .lat and .lon attributes to set it.

Definition at line 23 of file ossimGeoAnnotationEllipseObject.cpp.

References theProjectedEllipse.

Referenced by dup().

31  :ossimGeoAnnotationObject(r, g, b, thickness),
33  theCenter(center),
34  theWidthHeight(widthHeight),
35  theEllipseWidthHeightUnitType(OSSIM_PIXEL) // default to image space
36 {
38  ossimDpt(0,0),
39  enableFill,
40  r,
41  g,
42  b,
43  thickness);
44 }
ossimGeoAnnotationObject(unsigned char r=255, unsigned char g=255, unsigned char b=255, long thickness=1)
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ ossimGeoAnnotationEllipseObject() [2/2]

ossimGeoAnnotationEllipseObject::ossimGeoAnnotationEllipseObject ( const ossimGeoAnnotationEllipseObject rhs)

◆ ~ossimGeoAnnotationEllipseObject()

ossimGeoAnnotationEllipseObject::~ossimGeoAnnotationEllipseObject ( )
protectedvirtual

Definition at line 56 of file ossimGeoAnnotationEllipseObject.cpp.

References theProjectedEllipse, and ossimRefPtr< T >::valid().

57 {
59  {
61  }
62 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

Member Function Documentation

◆ applyScale()

void ossimGeoAnnotationEllipseObject::applyScale ( double  x,
double  y 
)
virtual

Implements ossimAnnotationObject.

Definition at line 69 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::applyScale(), ossimGpt::latd(), ossimGpt::lond(), theCenter, theProjectedEllipse, theWidthHeight, ossimRefPtr< T >::valid(), ossimDpt::x, x, ossimDpt::y, and y.

71 {
75  theWidthHeight .x *= x;
76  theWidthHeight .y *= y;
77 }
ossim_uint32 x
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
ossim_uint32 y
bool valid() const
Definition: ossimRefPtr.h:75
double y
Definition: ossimDpt.h:165
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual void applyScale(double x, double y)
double x
Definition: ossimDpt.h:164
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ computeBoundingRect()

void ossimGeoAnnotationEllipseObject::computeBoundingRect ( )
virtual

◆ draw()

void ossimGeoAnnotationEllipseObject::draw ( ossimRgbImage anImage) const
virtual

Implements ossimAnnotationObject.

Definition at line 88 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::draw(), theProjectedEllipse, and ossimRefPtr< T >::valid().

89 {
91  {
92  theProjectedEllipse->draw(anImage);
93  }
94 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual void draw(ossimRgbImage &anImage) const
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ dup()

ossimObject * ossimGeoAnnotationEllipseObject::dup ( ) const
virtual

Reimplemented from ossimObject.

Definition at line 64 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimGeoAnnotationEllipseObject().

65 {
66  return new ossimGeoAnnotationEllipseObject(*this);
67 }
ossimGeoAnnotationEllipseObject(const ossimGpt &center=ossimGpt(0, 0), const ossimDpt &widthHeight=ossimDpt(0, 0), bool enableFill=false, ossim_uint8 r=255, ossim_uint8 g=255, ossim_uint8 b=255, ossim_uint8 thickness=1)

◆ getAzimuth()

ossim_float64 ossimGeoAnnotationEllipseObject::getAzimuth ( ) const
virtual

Gets the azimuth.

Returns
The azimuth in decimal degrees.

Definition at line 261 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::getAzimuth(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by saveState().

262 {
264  {
266  }
267  return 0.0;
268 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse
virtual ossim_float64 getAzimuth() const
Gets the azimuth.

◆ getBoundingRect()

void ossimGeoAnnotationEllipseObject::getBoundingRect ( ossimDrect rect) const
virtual

Implements ossimAnnotationObject.

Definition at line 119 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::getBoundingRect(), ossimDrect::makeNan(), theProjectedEllipse, and ossimRefPtr< T >::valid().

120 {
122  {
124  }
125  else
126  {
127  rect.makeNan();
128  }
129 }
void makeNan()
Definition: ossimDrect.h:388
virtual void getBoundingRect(ossimDrect &rect) const
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ getCenter()

void ossimGeoAnnotationEllipseObject::getCenter ( ossimGpt gpt) const
virtual
Parameters
gptThe point to initialize with the center.

Definition at line 392 of file ossimGeoAnnotationEllipseObject.cpp.

References theCenter.

393 {
394  gpt = theCenter;
395 }

◆ getDrawAxesFlag()

bool ossimGeoAnnotationEllipseObject::getDrawAxesFlag ( ) const
virtual
Returns
The draw axes flag.

Definition at line 378 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::getDrawAxesFlag(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by saveState().

379 {
381  {
383  }
384  return false;
385 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ getFillFlag()

bool ossimGeoAnnotationEllipseObject::getFillFlag ( ) const
virtual
Returns
The fill flag.

Definition at line 361 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::getFillFlag(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by saveState().

362 {
364  {
366  }
367  return false;
368 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ getNewClippedObject()

ossimAnnotationObject * ossimGeoAnnotationEllipseObject::getNewClippedObject ( const ossimDrect rect) const
virtual

Will allocate a new object that is clipped to the passed. in rect. Look at derived classes to see if the object is actually clipped or not. A new object is returned if it clips to the rect else NULL should be returned it doesn't clip.

Implements ossimAnnotationObject.

Definition at line 106 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::getNewClippedObject(), intersects(), theProjectedEllipse, and ossimRefPtr< T >::valid().

107 {
108  if(intersects(rect))
109  {
111  {
113  }
114  }
115 
116  return (ossimAnnotationObject*)0;
117 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool intersects(const ossimDrect &rect) const
virtual ossimAnnotationObject * getNewClippedObject(const ossimDrect &rect) const
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ getWidthHeightInPixels()

void ossimGeoAnnotationEllipseObject::getWidthHeightInPixels ( ossimDpt widthHeight,
const ossimImageGeometry projection 
) const
protected

Definition at line 270 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimImageGeometry::getMetersPerPixel(), ossimImageGeometry::getProjection(), ossimUnitConversionTool::getValue(), ossimImageGeometry::hasProjection(), ossimProjection::origin(), OSSIM_DEGREES, OSSIM_METERS, OSSIM_MINUTES, OSSIM_PIXEL, OSSIM_SECONDS, ossimUnitConversionTool::setValue(), theEllipseWidthHeightUnitType, theWidthHeight, ossimDpt::x, x, ossimDpt::y, and y.

Referenced by transform().

272 {
274  {
275  case OSSIM_PIXEL:
276  {
277  widthHeight = theWidthHeight;
278 
279  break;
280  }
281 
282  case OSSIM_DEGREES:
283  case OSSIM_MINUTES:
284  case OSSIM_SECONDS:
285  {
286  ossimGpt origin = projection->hasProjection()?projection->getProjection()->origin():ossimGpt();
287  ossimDpt gsd = projection->getMetersPerPixel();
288 
289  ossimUnitConversionTool uct(origin,
292 
293  double x = uct.getValue(OSSIM_METERS);
294 
296 
297  double y = uct.getValue(OSSIM_METERS);
298 
299  widthHeight.x = ceil(x/gsd.x);
300  widthHeight.y = ceil(y/gsd.y);
301 
302  break;
303  }
304 
305  case OSSIM_METERS:
306  {
307  ossimDpt gsd = projection->getMetersPerPixel();
308  widthHeight.x = static_cast<ossim_int32>(theWidthHeight.x/gsd.x+0.5);
309  widthHeight.y = static_cast<ossim_int32>(theWidthHeight.y/gsd.y+0.5);
310 
311  break;
312  }
313 
314  default:
315  {
316  ossimDpt gsd = projection->getMetersPerPixel();
317 
320 
321  double x = uct.getValue(OSSIM_METERS);
322 
324 
325  double y = uct.getValue(OSSIM_METERS);
326 
327  widthHeight.x = ceil(x/gsd.x);
328  widthHeight.y = ceil(y/gsd.y);
329 
330  break;
331  }
332  }
333 }
ossim_uint32 x
ossim_uint32 y
double y
Definition: ossimDpt.h:165
ossimDpt getMetersPerPixel() const
Returns the GSD associated with this image in the active projection.
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
virtual ossimGpt origin() const =0
double x
Definition: ossimDpt.h:164
bool hasProjection() const
Returns TRUE if valid projection defined.
int ossim_int32

◆ intersects()

bool ossimGeoAnnotationEllipseObject::intersects ( const ossimDrect rect) const
virtual

Implements ossimAnnotationObject.

Definition at line 96 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::intersects(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by getNewClippedObject().

97 {
99  {
101  }
102 
103  return false;
104 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool intersects(const ossimDrect &rect) const
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ loadState()

bool ossimGeoAnnotationEllipseObject::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of an object from a keyword list.

Return true if ok or false on error.

Reimplemented from ossimGeoAnnotationObject.

Definition at line 174 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimKeywordlist::find(), ossimUnitTypeLut::getEntryNumber(), ossimUnitTypeLut::instance(), ossimGeoAnnotationObject::loadState(), OSSIM_PIXEL, OSSIM_UNIT_UNKNOWN, setAzimuth(), ossimAnnotationObject::setColor(), setDrawAxesFlag(), setFillFlag(), ossimAnnotationObject::setThickness(), status, ossimAnnotationObject::theBlue, theCenter, theEllipseWidthHeightUnitType, ossimAnnotationObject::theGreen, theProjectedEllipse, ossimAnnotationObject::theRed, ossimAnnotationObject::theThickness, theWidthHeight, ossimString::toDouble(), ossimDpt::x, and ossimDpt::y.

176 {
177  if (!theProjectedEllipse)
178  {
179  return false;
180  }
181 
182  //---
183  // Base class state must be called first to pick up colors...
184  //---
185  bool status = ossimGeoAnnotationObject::loadState(kwl, prefix);
186  if (status == true)
187  {
190  }
191 
192  const char* center = kwl.find(prefix, "center");
193  const char* ellipse_width = kwl.find(prefix, "ellipse_width");
194  const char* ellipse_height = kwl.find(prefix, "ellipse_height");
195  const char* azimuth = kwl.find(prefix, "azimuth");
196  const char* fill = kwl.find(prefix, "fill");
197  const char* draw_axes = kwl.find(prefix, "draw_axes");
198  const char* units = kwl.find(prefix, "units");
199 
200  if(units)
201  {
205  {
207  }
208  }
209 
210  if (center)
211  {
212  std::istringstream is(center);
213  is >> theCenter;
214  }
215  if(ellipse_width)
216  {
217  theWidthHeight.x = ossimString(ellipse_width).toDouble();
218  }
219  if(ellipse_height)
220  {
221  theWidthHeight.y = ossimString(ellipse_height).toDouble();
222  }
223 
224  if (azimuth)
225  {
226  setAzimuth(ossimString(azimuth).toFloat64());
227  }
228 
229  if (fill)
230  {
231  setFillFlag(ossimString(fill).toBool());
232  }
233 
234  if (draw_axes)
235  {
236  setDrawAxesFlag(ossimString(draw_axes).toBool());
237  }
238 
239  return status;
240 }
virtual void setDrawAxesFlag(bool flag)
Turns on and off drawing of axes on the ellipse.
virtual void setThickness(ossim_uint8 thickness)
ossimUnitType
const char * find(const char *key) const
virtual void setAzimuth(ossim_float64 azimuth)
Sets the azimuth.
double y
Definition: ossimDpt.h:165
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
double toDouble() const
virtual void setColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
return status
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
double x
Definition: ossimDpt.h:164
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
virtual void setFillFlag(bool flag)
Sets the fill flag.
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.

◆ print()

std::ostream & ossimGeoAnnotationEllipseObject::print ( std::ostream &  out) const
virtual

Generic print method.

Derived classes should re-implement as they see fit.

Returns
std::ostream&

Reimplemented from ossimAnnotationObject.

Definition at line 79 of file ossimGeoAnnotationEllipseObject.cpp.

References theCenter, theEllipseWidthHeightUnitType, and theProjectedEllipse.

80 {
81  out << "center ground: " << theCenter << endl
82  << "width height image space flag = " << theEllipseWidthHeightUnitType
83  << endl
85  return out;
86 }
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ saveState()

bool ossimGeoAnnotationEllipseObject::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Saves the current state of this object.

Keywords:

center: ( 42.403388263727003, -90.708557648541046, 0.0, WGE )

ellipse_width: 500

ellipse_height: 500

units: meters

Reimplemented from ossimGeoAnnotationObject.

Definition at line 159 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimKeywordlist::add(), ossimString::c_str(), getAzimuth(), getDrawAxesFlag(), getFillFlag(), ossimUnitTypeLut::instance(), ossimGeoAnnotationObject::saveState(), theCenter, theEllipseWidthHeightUnitType, theWidthHeight, ossimGpt::toString(), ossimString::toString(), ossimDpt::x, and ossimDpt::y.

161 {
162  kwl.add(prefix, "center", theCenter.toString().c_str());
163  kwl.add(prefix, "ellipse_width", theWidthHeight.x);
164  kwl.add(prefix, "ellipse_height", theWidthHeight.y);
165  kwl.add(prefix, "azimuth", getAzimuth());
166  kwl.add(prefix, "fill", ossimString::toString(getFillFlag()));
167  kwl.add(prefix, "draw_axes", ossimString::toString(getDrawAxesFlag()));
168  kwl.add(prefix, "units",
169  ossimUnitTypeLut::instance()->getEntryString(theEllipseWidthHeightUnitType).c_str());
170 
171  return ossimGeoAnnotationObject::saveState(kwl, prefix);
172 }
virtual ossim_float64 getAzimuth() const
Gets the azimuth.
double y
Definition: ossimDpt.h:165
static ossimString toString(bool aValue)
Numeric to string methods.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the current state of this object.
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
double x
Definition: ossimDpt.h:164
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
ossimString toString(ossim_uint32 precision=15) const
Definition: ossimGpt.cpp:78
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.

◆ setAzimuth()

void ossimGeoAnnotationEllipseObject::setAzimuth ( ossim_float64  azimuth)
virtual

Sets the azimuth.

Parameters
azimuthin degrees.

Definition at line 253 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::setAzimuth(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by loadState().

254 {
256  {
258  }
259 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual void setAzimuth(ossim_float64 azimuth)
Sets the azimuth.
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ setCenter()

void ossimGeoAnnotationEllipseObject::setCenter ( const ossimGpt gpt)
virtual

Sets the center ground point.

Parameters
gptThe center ground point.

Definition at line 387 of file ossimGeoAnnotationEllipseObject.cpp.

References theCenter.

388 {
389  theCenter = gpt;
390 }

◆ setColor()

void ossimGeoAnnotationEllipseObject::setColor ( ossim_uint8  r,
ossim_uint8  g,
ossim_uint8  b 
)
virtual

Sets the color of theProjectedEllipse.

RGB range 0 to 255

Parameters
rDN value for red.
gDN value for green.
bDN value for blue.

Reimplemented from ossimAnnotationObject.

Definition at line 334 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationObject::setColor(), theProjectedEllipse, and ossimRefPtr< T >::valid().

337 {
339  {
340  theProjectedEllipse->setColor(r, g, b);
341  }
343 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual void setColor(ossim_uint8 r, ossim_uint8 g, ossim_uint8 b)
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ setDrawAxesFlag()

void ossimGeoAnnotationEllipseObject::setDrawAxesFlag ( bool  flag)
virtual

Turns on and off drawing of axes on the ellipse.

This flag is only used if fill is turned off.

Parameters
flagtrue to enable, false to disable.

Definition at line 370 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::setDrawAxesFlag(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by loadState().

371 {
373  {
375  }
376 }
virtual void setDrawAxesFlag(bool flag)
Turns on and off drawing of axes on the ellipse.
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ setEllipseWidthHeightUnitType()

void ossimGeoAnnotationEllipseObject::setEllipseWidthHeightUnitType ( ossimUnitType  type)
virtual

◆ setFillFlag()

void ossimGeoAnnotationEllipseObject::setFillFlag ( bool  flag)
virtual

Sets the fill flag.

flag True to fill, false to not fill.

Definition at line 353 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationEllipseObject::setFillFlag(), theProjectedEllipse, and ossimRefPtr< T >::valid().

Referenced by loadState(), and ossimGdalOgrVectorAnnotation::updateAnnotationSettings().

354 {
356  {
358  }
359 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ setThickness()

void ossimGeoAnnotationEllipseObject::setThickness ( ossim_uint8  thickness)
virtual

Sets the pen thickness of theProjectedEllipse.

range 0 to 255

Parameters
thicknessPen thickness.

Reimplemented from ossimAnnotationObject.

Definition at line 345 of file ossimGeoAnnotationEllipseObject.cpp.

References ossimAnnotationObject::setThickness(), theProjectedEllipse, and ossimRefPtr< T >::valid().

346 {
348  {
349  theProjectedEllipse->setThickness(thickness);
350  }
351 }
virtual void setThickness(ossim_uint8 thickness)
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

◆ setWidthHeight()

void ossimGeoAnnotationEllipseObject::setWidthHeight ( const ossimDpt pt)
virtual

Sets the width and height of point.

Parameters
ptPoint with pt.x being width and pt.y being height.

Definition at line 248 of file ossimGeoAnnotationEllipseObject.cpp.

References theWidthHeight.

Referenced by ossimGdalOgrVectorAnnotation::updateAnnotationSettings().

◆ transform()

void ossimGeoAnnotationEllipseObject::transform ( ossimImageGeometry projection)
virtual

Add the projection interface to all geographically defined objects.

Implements ossimGeoAnnotationObject.

Definition at line 139 of file ossimGeoAnnotationEllipseObject.cpp.

References getWidthHeightInPixels(), ossimAnnotationEllipseObject::setCenterWidthHeight(), theCenter, theProjectedEllipse, and ossimImageGeometry::worldToLocal().

Referenced by ossimGdalOgrVectorAnnotation::loadPoint(), and ossimGdalOgrVectorAnnotation::updateAnnotationSettings().

140 {
141  if(!projection)
142  {
143  return;
144  }
145 
146  // Ellipse center, height and width in image space.
147  ossimDpt projectedCenter;
148  ossimDpt projectedWidthHeight;
149 
150  // first get the center projected
151  projection->worldToLocal(theCenter, projectedCenter);
152 
153  getWidthHeightInPixels(projectedWidthHeight, projection);
154 
155  theProjectedEllipse->setCenterWidthHeight(projectedCenter,
156  projectedWidthHeight);
157 }
void getWidthHeightInPixels(ossimDpt &widthHeight, const ossimImageGeometry *projection) const
virtual void setCenterWidthHeight(const ossimDpt &center, const ossimDpt &widthHeight)
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
ossimRefPtr< ossimAnnotationEllipseObject > theProjectedEllipse

Member Data Documentation

◆ theCenter

ossimGpt ossimGeoAnnotationEllipseObject::theCenter
protected

◆ theEllipseWidthHeightUnitType

ossimUnitType ossimGeoAnnotationEllipseObject::theEllipseWidthHeightUnitType
protected

◆ theProjectedEllipse

ossimRefPtr<ossimAnnotationEllipseObject> ossimGeoAnnotationEllipseObject::theProjectedEllipse
protected

◆ theWidthHeight

ossimDpt ossimGeoAnnotationEllipseObject::theWidthHeight
protected

The documentation for this class was generated from the following files: