20 _unLOCodeList(), _uicCodeList(),
26 _dateFrom (1970, 01, 01), _dateEnd (2999, 12, 31), _comment (
""),
30 _currencyCode (
"ZZZ"),
33 _latitude (0.0), _longitude (0.0),
42 _population (0), _elevation (0), _gTopo30 (0),
44 _gmtOffset (0), _dstOffset (0), _rawOffset (0),
45 _modificationDate (2000, 01, 01),
46 _wikiLink (
WikiLink_T (
"http://en.wikipedia.org")),
47 _geonameLatitude (0.0), _geonameLongitude (0.0),
49 _originalKeywords (
"NA"), _correctedKeywords (
"NA"),
50 _percentage (0), _editDistance (0), _allowableEditDistance (0),
51 _rawDataString (
"NA"),
52 _itLanguageCodeNum (
Language::LAST_VALUE),
58 _key (iLocation._key),
59 _icaoCode (iLocation._icaoCode), _faaCode (iLocation._faaCode),
60 _unLOCodeList (iLocation._unLOCodeList),
61 _uicCodeList (iLocation._uicCodeList),
62 _commonName (iLocation._commonName), _asciiName (iLocation._asciiName),
63 _altNameShortListString (iLocation._altNameShortListString),
64 _tvlPORListString (iLocation._tvlPORListString),
65 _envelopeID (iLocation.getEnvelopeID()),
66 _dateFrom (iLocation.getDateFrom()), _dateEnd (iLocation.getDateEnd()),
67 _comment (iLocation.getComment()),
68 _cityList (iLocation._cityList),
69 _stateCode (iLocation._stateCode), _countryCode (iLocation._countryCode),
70 _altCountryCode (iLocation._altCountryCode),
71 _countryName (iLocation._countryName),
72 _wac (iLocation._wac), _wacName (iLocation._wacName),
73 _currencyCode (iLocation._currencyCode),
74 _continentCode (iLocation._continentCode),
75 _continentName (iLocation._continentName),
76 _latitude (iLocation._latitude), _longitude (iLocation._longitude),
77 _featClass (iLocation._featClass), _featCode (iLocation._featCode),
78 _admin1Code (iLocation._admin1Code),
79 _admin1UtfName (iLocation._admin1UtfName),
80 _admin1AsciiName (iLocation._admin1AsciiName),
81 _admin2Code (iLocation._admin2Code),
82 _admin2UtfName (iLocation._admin2UtfName),
83 _admin2AsciiName (iLocation._admin2AsciiName),
84 _admin3Code (iLocation._admin3Code), _admin4Code (iLocation._admin4Code),
85 _population (iLocation._population), _elevation (iLocation._elevation),
86 _gTopo30 (iLocation._gTopo30),
87 _timeZone (iLocation._timeZone), _gmtOffset (iLocation._gmtOffset),
88 _dstOffset (iLocation._dstOffset), _rawOffset (iLocation._rawOffset),
89 _modificationDate (iLocation._modificationDate),
90 _wikiLink (iLocation._wikiLink),
91 _geonameLatitude (iLocation._geonameLatitude),
92 _geonameLongitude (iLocation._geonameLongitude),
93 _pageRank (iLocation._pageRank),
94 _nameMatrix (iLocation._nameMatrix),
95 _originalKeywords (iLocation._originalKeywords),
96 _correctedKeywords (iLocation._correctedKeywords),
97 _percentage (iLocation._percentage),
98 _editDistance (iLocation._editDistance),
99 _allowableEditDistance (iLocation._allowableEditDistance),
100 _extraLocationList (iLocation._extraLocationList),
101 _alternateLocationList (iLocation._alternateLocationList),
102 _rawDataString (iLocation._rawDataString),
103 _itLanguageCodeNum (iLocation._itLanguageCodeNum),
146 const std::string& iOriginalKeywords,
147 const std::string& iCorrectedKeywords,
152 _key (iIataCode, iIataType, iGeonamesID),
153 _icaoCode (iIcaoCode), _faaCode (iFaaCode),
154 _commonName (iCommonName),_asciiName (iASCIIName),
156 _tvlPORListString (iTvlPORListString),
157 _envelopeID (iEnvelopeID),
158 _dateFrom (iDateFrom), _dateEnd (iDateEnd),
160 _cityList (iCityDetailsList),
161 _stateCode (iStateCode),
162 _countryCode (iCountryCode), _altCountryCode (iAltCountryCode),
163 _countryName (iCountryName),
164 _wac (iWAC), _wacName (iWACName),
165 _currencyCode (iCurrencyCode),
166 _continentCode (
"NA"), _continentName (iContinentName),
167 _latitude (iLatitude), _longitude (iLongitude),
168 _featClass (iFeatureClass), _featCode (iFeatureCode),
169 _admin1Code (iAdmin1Code),
172 _admin2Code (iAdmin2Code),
175 _admin3Code (iAdmin3Code), _admin4Code (iAdmin4Code),
176 _population (iPopulation), _elevation (iElevation), _gTopo30 (iGTopo30),
177 _timeZone (iTimeZone),
178 _gmtOffset (iGMTOffset), _dstOffset (iDSTOffset), _rawOffset (iRawOffset),
179 _modificationDate (iModDate),
180 _wikiLink (iWikiLink),
181 _geonameLatitude (iGeonameLatitude), _geonameLongitude (iGeonameLongitude),
182 _pageRank (iPageRank),
183 _originalKeywords (iOriginalKeywords),
184 _correctedKeywords (iCorrectedKeywords),
185 _percentage (iPercentage), _editDistance (iEditDistance),
186 _allowableEditDistance (iAllowableEditDistance),
187 _rawDataString (iRawDataString),
188 _itLanguageCodeNum (
Language::LAST_VALUE),
207 std::ostringstream oStr;
219 std::ostringstream oStr;
222 oStr <<
", " << _pageRank <<
"%"
223 <<
", " << _commonName <<
", " << _asciiName
224 <<
", " << _icaoCode <<
", " << _faaCode
227 <<
", " << _envelopeID
228 <<
", " << _dateFrom <<
", " << _dateEnd <<
", " << _comment
230 <<
", " << _stateCode
231 <<
", " << _countryCode <<
", " << _altCountryCode
232 <<
", " << _countryName
233 <<
", " << _wac <<
", " << _wacName
234 <<
", " << _currencyCode
235 <<
", " << _continentCode <<
", " << _continentName
236 <<
", " << _latitude <<
", " << _longitude
237 <<
", " << _featClass <<
", " << _featCode
238 <<
", " << _admin1Code
239 <<
", " << _admin1UtfName <<
", " << _admin1AsciiName
240 <<
", " << _admin2Code
241 <<
", " << _admin2UtfName <<
", " << _admin2AsciiName
242 <<
", " << _admin3Code <<
", " << _admin4Code
243 <<
", " << _population <<
", " << _elevation <<
", " << _gTopo30
245 <<
", " << _gmtOffset <<
", " << _dstOffset <<
", " << _rawOffset
246 <<
", " << _modificationDate
247 <<
", " << _tvlPORListString
249 <<
", " << _geonameLatitude <<
", " << _geonameLongitude
250 <<
", " << _originalKeywords <<
", " << _correctedKeywords
251 <<
", " << _percentage <<
"%"
252 <<
", " << _editDistance <<
", " << _allowableEditDistance;
259 std::ostringstream oStr;
262 if (_extraLocationList.empty() ==
false) {
263 oStr <<
" with " << _extraLocationList.size() <<
" extra match(es)";
266 if (_alternateLocationList.empty() ==
false) {
267 oStr <<
" with " << _alternateLocationList.size()
268 <<
" alternate match(es)";
276 std::ostringstream oStr;
283 std::ostringstream oStr;
285 oStr <<
"; name matrix {" << _nameMatrix.
describe() <<
"}";
287 if (_extraLocationList.empty() ==
false) {
288 oStr <<
"; Extra matches: {";
289 unsigned short idx = 0;
290 for (LocationList_T::const_iterator itLoc = _extraLocationList.begin();
291 itLoc != _extraLocationList.end(); ++itLoc, ++idx) {
295 const Location& lExtraLocation = *itLoc;
301 if (_alternateLocationList.empty() ==
false) {
302 oStr <<
"; Alternate matches: {";
303 unsigned short idx = 0;
304 for (LocationList_T::const_iterator itLoc =
305 _alternateLocationList.begin();
306 itLoc != _alternateLocationList.end(); ++itLoc, ++idx) {
310 const Location& lAlternateLocation = *itLoc;
327 std::ostringstream oStr;
328 unsigned short idx = 0;
329 for (UNLOCodeList_T::const_iterator itUNLOCode = _unLOCodeList.begin();
330 itUNLOCode != _unLOCodeList.end(); ++itUNLOCode, ++idx) {
343 std::ostringstream oStr;
344 unsigned short idx = 0;
345 for (UICCodeList_T::const_iterator itUICCode = _uicCodeList.begin();
346 itUICCode != _uicCodeList.end(); ++itUICCode, ++idx) {
359 std::ostringstream oStr;
360 unsigned short idx = 0;
361 for (CityDetailsList_T::const_iterator itCity = _cityList.begin();
362 itCity != _cityList.end(); ++itCity, ++idx) {
367 oStr << lCityDetails;
381 _cityList.push_back (lCityDetails);
386 std::ostringstream oStr;
387 unsigned short idx = 0;
394 oStr << lAlternateLocation;
398 const std::string lAltNameShortListString (oStr.str());
404 std::ostringstream oStr;
405 unsigned short idx = 0;
406 for (IATACodeList_T::const_iterator itCode =
_itTvlPORList.begin();
416 const std::string lTvlPORCodeList (oStr.str());
426 const std::string l2CharFeatCode = iFeatureCode.substr (0, 2);
427 const std::string l3CharFeatCode = iFeatureCode.substr (0, 3);
429 if (iFeatureCode ==
"AIRP" || iFeatureCode ==
"AIRF"
430 || iFeatureCode ==
"AIRQ") {
442 }
else if (iFeatureCode ==
"AIRB") {
450 }
else if (iFeatureCode ==
"AIRS") {
460 }
else if (iFeatureCode ==
"AIRH") {
466 }
else if (iFeatureCode ==
"RSTN") {
475 }
else if (l3CharFeatCode ==
"BUS") {
486 }
else if (iFeatureCode ==
"MTRO") {
494 }
else if (iFeatureCode ==
"FY" || iFeatureCode ==
"PRT"
495 || iFeatureCode ==
"PORT" || iFeatureCode ==
"HBR") {
506 }
else if (l3CharFeatCode ==
"PPL" || l3CharFeatCode ==
"ADM"
507 || iFeatureCode ==
"LCTY") {
516 }
else if (l3CharFeatCode ==
"PCL" || iFeatureCode ==
"AREA") {
528 }
else if (iFeatureCode ==
"MT") {
534 }
else if (iFeatureCode ==
"PLAT") {
539 }
else if (iFeatureCode ==
"OAS") {
544 }
else if (iFeatureCode ==
"PRK") {
550 }
else if (l3CharFeatCode ==
"RES") {
556 }
else if (iFeatureCode ==
"CMP") {
562 }
else if (l2CharFeatCode ==
"MN") {
567 }
else if (iFeatureCode ==
"HMSD") {
572 }
else if (l2CharFeatCode ==
"RK") {
577 }
else if (iFeatureCode ==
"PT") {
583 }
else if (l3CharFeatCode ==
"RSV") {
589 }
else if (iFeatureCode ==
"LK") {
595 }
else if (iFeatureCode ==
"BAY") {
600 }
else if (iFeatureCode ==
"CHN") {
606 }
else if (l3CharFeatCode ==
"ISL") {
613 }
else if (iFeatureCode ==
"ATOL") {
unsigned short NbOfErrors_T
double MatchingPercentage_T
std::list< CityDetails > CityDetailsList_T
A list of cities, for instance the list of cities served by a travel-/transport-related POR (point of...
const Percentage_T K_DEFAULT_PAGE_RANK
boost::gregorian::date Date_T
unsigned int EnvelopeID_T
std::list< FeatureName_T > FeatureNameList_T
unsigned int Population_T
unsigned int GeonamesID_T
Class modelling the elementary details of a city.
Enumeration of place/location types with respect to their use for transportation purposes.
std::string describe() const
Structure modelling a (geographical) location.
void consolidateAltNameShortListString()
Date_T calculateDate() const
void toStream(std::ostream &) const
AltNameShortList_T _itAltNameShortList
std::string toBasicString() const
std::string toShortString() const
IATACodeList_T _itTvlPORList
std::string _itCityIataCode
std::string _itCityUtfName
GeonamesID_T _itCityGeonamesID
std::string describeShortKey() const
void setAltNameShortListString(const std::string &iNameListString)
std::string describeUNLOCodeList() const
std::string describeKey() const
std::string describeCityDetailsList() const
std::string _itCityAsciiName
void consolidateCityDetailsList()
void consolidateTvlPORListString()
void setTvlPORListString(const std::string &iPORListString)
void fromStream(std::istream &)
std::string toString() const
std::string _itCityCountryCode
std::string _itCityStateCode
std::string describeUICCodeList() const
static FeatureNameList_T getFeatureList(const FeatureCode_T &)
std::string toSingleLocationString() const
std::string describe() const