NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CLatLonMap_Base Class Reference

Search Toolkit Book for CLatLonMap_Base

#include <objects/seqfeat/SubSource.hpp>

+ Inheritance diagram for CLatLonMap_Base:

Public Types

enum  ELatLonAdjustFlags { fNone = 0 , fFlip = 1 , fNegateLat = (1 << 1) , fNegateLon = (1 << 2) }
 
typedef int TLatLonAdjustFlags
 Bitwise OR of "ELatLonAdjustFlags". More...
 

Public Member Functions

 CLatLonMap_Base (bool is_water)
 
 ~CLatLonMap_Base (void)
 
bool IsCountryInLatLon (const string &country, double lat, double lon) const
 
const CCountryExtremeGuessRegionForLatLon (double lat, double lon, const string &country=kEmptyStr, const string &province=kEmptyStr) const
 
const CCountryExtremeFindClosestToLatLon (double lat, double lon, double range, double &distance)
 
bool IsClosestToLatLon (const string &country, double lat, double lon, double range, double &distance) const
 
bool HaveLatLonForRegion (const string &country) const
 
bool DoCountryBoxesOverlap (const string &country1, const string &country2) const
 
const CCountryExtremeIsNearLatLon (double lat, double lon, double range, double &distance, const string &country, const string &province=kEmptyStr) const
 
double GetScale (void) const
 
int AdjustAndRoundDistance (double distance) const
 

Static Public Member Functions

static int AdjustAndRoundDistance (double distance, double scale)
 

Private Types

typedef vector< CCountryLine * > TCountryLineList
 
typedef TCountryLineList::const_iterator TCountryLineList_iter
 
typedef vector< CCountryExtreme * > TCountryExtremeList
 
typedef TCountryExtremeList::const_iterator TCountryExtremeList_iter
 

Private Member Functions

void x_InitFromDefaultList (const char *const *list, int num)
 
bool x_InitFromFile (const string &filename)
 
size_t x_GetLatStartIndex (int y) const
 
const CCountryExtremex_FindCountryExtreme (const string &country) const
 

Static Private Member Functions

static bool s_CompareTwoLinesByLatLonOnly (const CCountryLine *line1, const CCountryLine *line2)
 
static bool s_CompareTwoLinesByCountry (const CCountryLine *line1, const CCountryLine *line2)
 
static bool s_CompareTwoLinesByLatLonThenCountry (const CCountryLine *line1, const CCountryLine *line2)
 

Private Attributes

TCountryLineList m_CountryLineList
 
TCountryLineList m_LatLonSortedList
 
double m_Scale
 
TCountryExtremeList m_CountryExtremes
 

Detailed Description

Definition at line 473 of file SubSource.hpp.

Member Typedef Documentation

◆ TCountryExtremeList

Definition at line 525 of file SubSource.hpp.

◆ TCountryExtremeList_iter

typedef TCountryExtremeList::const_iterator CLatLonMap_Base::TCountryExtremeList_iter
private

Definition at line 526 of file SubSource.hpp.

◆ TCountryLineList

Definition at line 518 of file SubSource.hpp.

◆ TCountryLineList_iter

typedef TCountryLineList::const_iterator CLatLonMap_Base::TCountryLineList_iter
private

Definition at line 519 of file SubSource.hpp.

◆ TLatLonAdjustFlags

Bitwise OR of "ELatLonAdjustFlags".

Definition at line 502 of file SubSource.hpp.

Member Enumeration Documentation

◆ ELatLonAdjustFlags

Enumerator
fNone 
fFlip 
fNegateLat 
fNegateLon 

Definition at line 496 of file SubSource.hpp.

Constructor & Destructor Documentation

◆ CLatLonMap_Base()

CLatLonMap_Base::CLatLonMap_Base ( bool  is_water)

◆ ~CLatLonMap_Base()

CLatLonMap_Base::~CLatLonMap_Base ( void  )

Definition at line 5832 of file SubSource.cpp.

References i, m_CountryExtremes, m_CountryLineList, and m_LatLonSortedList.

Member Function Documentation

◆ AdjustAndRoundDistance() [1/2]

int CLatLonMap_Base::AdjustAndRoundDistance ( double  distance) const

Definition at line 6254 of file SubSource.cpp.

References AdjustAndRoundDistance(), and m_Scale.

◆ AdjustAndRoundDistance() [2/2]

int CLatLonMap_Base::AdjustAndRoundDistance ( double  distance,
double  scale 
)
static

Definition at line 6239 of file SubSource.cpp.

Referenced by AdjustAndRoundDistance().

◆ DoCountryBoxesOverlap()

bool CLatLonMap_Base::DoCountryBoxesOverlap ( const string country1,
const string country2 
) const

◆ FindClosestToLatLon()

const CCountryExtreme * CLatLonMap_Base::FindClosestToLatLon ( double  lat,
double  lon,
double  range,
double &  distance 
)

◆ GetScale()

double CLatLonMap_Base::GetScale ( void  ) const
inline

Definition at line 492 of file SubSource.hpp.

References m_Scale.

◆ GuessRegionForLatLon()

const CCountryExtreme * CLatLonMap_Base::GuessRegionForLatLon ( double  lat,
double  lon,
const string country = kEmptyStr,
const string province = kEmptyStr 
) const

◆ HaveLatLonForRegion()

bool CLatLonMap_Base::HaveLatLonForRegion ( const string country) const

Definition at line 5930 of file SubSource.cpp.

References NULL, and x_FindCountryExtreme().

◆ IsClosestToLatLon()

bool CLatLonMap_Base::IsClosestToLatLon ( const string country,
double  lat,
double  lon,
double  range,
double &  distance 
) const

◆ IsCountryInLatLon()

bool CLatLonMap_Base::IsCountryInLatLon ( const string country,
double  lat,
double  lon 
) const

◆ IsNearLatLon()

const CCountryExtreme * CLatLonMap_Base::IsNearLatLon ( double  lat,
double  lon,
double  range,
double &  distance,
const string country,
const string province = kEmptyStr 
) const

◆ s_CompareTwoLinesByCountry()

bool CLatLonMap_Base::s_CompareTwoLinesByCountry ( const CCountryLine line1,
const CCountryLine line2 
)
staticprivate

Definition at line 5710 of file SubSource.cpp.

References NStr::CompareNocase(), line1, line2, and s_CompareTwoLinesByLatLonOnly().

◆ s_CompareTwoLinesByLatLonOnly()

bool CLatLonMap_Base::s_CompareTwoLinesByLatLonOnly ( const CCountryLine line1,
const CCountryLine line2 
)
staticprivate

Definition at line 5693 of file SubSource.cpp.

References line1, and line2.

Referenced by CLatLonMap_Base(), and s_CompareTwoLinesByCountry().

◆ s_CompareTwoLinesByLatLonThenCountry()

bool CLatLonMap_Base::s_CompareTwoLinesByLatLonThenCountry ( const CCountryLine line1,
const CCountryLine line2 
)
staticprivate

Definition at line 5725 of file SubSource.cpp.

References NStr::CompareNocase(), line1, and line2.

Referenced by CLatLonMap_Base().

◆ x_FindCountryExtreme()

const CCountryExtreme * CLatLonMap_Base::x_FindCountryExtreme ( const string country) const
private

◆ x_GetLatStartIndex()

size_t CLatLonMap_Base::x_GetLatStartIndex ( int  y) const
private

◆ x_InitFromDefaultList()

void CLatLonMap_Base::x_InitFromDefaultList ( const char *const list,
int  num 
)
private

◆ x_InitFromFile()

bool CLatLonMap_Base::x_InitFromFile ( const string filename)
private

Member Data Documentation

◆ m_CountryExtremes

TCountryExtremeList CLatLonMap_Base::m_CountryExtremes
private

Definition at line 527 of file SubSource.hpp.

Referenced by CLatLonMap_Base(), x_FindCountryExtreme(), and ~CLatLonMap_Base().

◆ m_CountryLineList

TCountryLineList CLatLonMap_Base::m_CountryLineList
private

◆ m_LatLonSortedList

TCountryLineList CLatLonMap_Base::m_LatLonSortedList
private

◆ m_Scale

double CLatLonMap_Base::m_Scale
private

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:27 2024 by modify_doxy.py rev. 669887