24 _dateFrom (1970, 01, 01), _dateEnd (2999, 12, 31), _comment (
""),
32 _latitude (0), _longitude (0),
41 _population (0), _elevation (0), _gTopo30 (0),
43 _gmtOffset (0), _dstOffset (0), _rawOffset (0),
44 _modificationDate (2000, 01, 01),
45 _wikiLink (
WikiLink_T (
"http://en.wikipedia.org")),
47 _originalKeywords (
"NA"), _correctedKeywords (
"NA"),
48 _percentage (0), _editDistance (0), _allowableEditDistance (0),
49 _rawDataString (
"NA"),
56 _key (iLocation._key),
57 _icaoCode (iLocation._icaoCode), _faaCode (iLocation._faaCode),
58 _commonName (iLocation._commonName), _asciiName (iLocation._asciiName),
59 _altNameShortListString (iLocation._altNameShortListString),
60 _tvlPORListString (iLocation._tvlPORListString),
61 _envelopeID (iLocation.getEnvelopeID()),
62 _dateFrom (iLocation.getDateFrom()), _dateEnd (iLocation.getDateEnd()),
63 _comment (iLocation.getComment()),
64 _cityCode (iLocation._cityCode),
65 _cityUtfName (iLocation._cityUtfName),
66 _cityAsciiName (iLocation._cityAsciiName),
67 _cityGeonamesID (iLocation._cityGeonamesID),
68 _stateCode (iLocation._stateCode), _countryCode (iLocation._countryCode),
69 _altCountryCode (iLocation._altCountryCode),
70 _countryName (iLocation._countryName),
71 _continentCode (iLocation._continentCode),
72 _continentName (iLocation._continentName),
73 _latitude (iLocation._latitude), _longitude (iLocation._longitude),
74 _featClass (iLocation._featClass), _featCode (iLocation._featCode),
75 _admin1Code (iLocation._admin1Code),
76 _admin1UtfName (iLocation._admin1UtfName),
77 _admin1AsciiName (iLocation._admin1AsciiName),
78 _admin2Code (iLocation._admin2Code),
79 _admin2UtfName (iLocation._admin2UtfName),
80 _admin2AsciiName (iLocation._admin2AsciiName),
81 _admin3Code (iLocation._admin3Code), _admin4Code (iLocation._admin4Code),
82 _population (iLocation._population), _elevation (iLocation._elevation),
83 _gTopo30 (iLocation._gTopo30),
84 _timeZone (iLocation._timeZone), _gmtOffset (iLocation._gmtOffset),
85 _dstOffset (iLocation._dstOffset), _rawOffset (iLocation._rawOffset),
86 _modificationDate (iLocation._modificationDate),
87 _wikiLink (iLocation._wikiLink), _pageRank (iLocation._pageRank),
88 _nameMatrix (iLocation._nameMatrix),
89 _originalKeywords (iLocation._originalKeywords),
90 _correctedKeywords (iLocation._correctedKeywords),
91 _percentage (iLocation._percentage),
92 _editDistance (iLocation._editDistance),
93 _allowableEditDistance (iLocation._allowableEditDistance),
94 _extraLocationList (iLocation._extraLocationList),
95 _alternateLocationList (iLocation._alternateLocationList),
96 _rawDataString (iLocation._rawDataString),
97 _itLanguageCodeNum (iLocation._itLanguageCodeNum),
139 const std::string& iOriginalKeywords,
140 const std::string& iCorrectedKeywords,
145 _key (iIataCode, iIataType, iGeonamesID),
146 _icaoCode (iIcaoCode), _faaCode (iFaaCode),
147 _commonName (iCommonName),_asciiName (iASCIIName),
149 _tvlPORListString (iTvlPORListString),
150 _envelopeID (iEnvelopeID),
151 _dateFrom (iDateFrom), _dateEnd (iDateEnd),
153 _cityCode (iCityCode),
154 _cityUtfName (iCityUtfName), _cityAsciiName (iCityAsciiName),
155 _cityGeonamesID (iCityGeonamesID),
156 _stateCode (iStateCode),
157 _countryCode (iCountryCode), _altCountryCode (iAltCountryCode),
158 _countryName (iCountryName),
159 _continentCode (
"NA"), _continentName (iContinentName),
160 _latitude (iLatitude), _longitude (iLongitude),
161 _featClass (iFeatureClass), _featCode (iFeatureCode),
162 _admin1Code (iAdmin1Code),
165 _admin2Code (iAdmin2Code),
168 _admin3Code (iAdmin3Code), _admin4Code (iAdmin4Code),
169 _population (iPopulation), _elevation (iElevation), _gTopo30 (iGTopo30),
170 _timeZone (iTimeZone),
171 _gmtOffset (iGMTOffset), _dstOffset (iDSTOffset), _rawOffset (iRawOffset),
172 _modificationDate (iModDate),
173 _wikiLink (iWikiLink), _pageRank (iPageRank),
174 _originalKeywords (iOriginalKeywords),
175 _correctedKeywords (iCorrectedKeywords),
176 _percentage (iPercentage), _editDistance (iEditDistance),
177 _allowableEditDistance (iAllowableEditDistance),
178 _rawDataString (iRawDataString),
198 std::ostringstream oStr;
210 std::ostringstream oStr;
213 oStr <<
", " << _pageRank <<
"%"
214 <<
", " << _commonName <<
", " << _asciiName
215 <<
", " << _icaoCode <<
", " << _faaCode
216 <<
", " << _envelopeID
217 <<
", " << _dateFrom <<
", " << _dateEnd <<
", " << _comment
218 <<
", " << _cityCode <<
", " << _cityUtfName <<
", " << _cityAsciiName
219 <<
", " << _cityGeonamesID
220 <<
", " << _stateCode
221 <<
", " << _countryCode <<
", " << _altCountryCode
222 <<
", " << _countryName
223 <<
", " << _continentCode <<
", " << _continentName
224 <<
", " << _latitude <<
", " << _longitude
225 <<
", " << _featClass <<
", " << _featCode
226 <<
", " << _admin1Code
227 <<
", " << _admin1UtfName <<
", " << _admin1AsciiName
228 <<
", " << _admin2Code
229 <<
", " << _admin2UtfName <<
", " << _admin2AsciiName
230 <<
", " << _admin3Code <<
", " << _admin4Code
231 <<
", " << _population <<
", " << _elevation <<
", " << _gTopo30
233 <<
", " << _gmtOffset <<
", " << _dstOffset <<
", " << _rawOffset
234 <<
", " << _modificationDate
235 <<
", " << _tvlPORListString
237 <<
", " << _originalKeywords <<
", " << _correctedKeywords
238 <<
", " << _percentage <<
"%"
239 <<
", " << _editDistance <<
", " << _allowableEditDistance;
246 std::ostringstream oStr;
249 if (_extraLocationList.empty() ==
false) {
250 oStr <<
" with " << _extraLocationList.size() <<
" extra match(es)";
253 if (_alternateLocationList.empty() ==
false) {
254 oStr <<
" with " << _alternateLocationList.size()
255 <<
" alternate match(es)";
263 std::ostringstream oStr;
270 std::ostringstream oStr;
272 oStr <<
"; name matrix {" << _nameMatrix.
describe() <<
"}";
274 if (_extraLocationList.empty() ==
false) {
275 oStr <<
"; Extra matches: {";
276 unsigned short idx = 0;
277 for (LocationList_T::const_iterator itLoc = _extraLocationList.begin();
278 itLoc != _extraLocationList.end(); ++itLoc, ++idx) {
282 const Location& lExtraLocation = *itLoc;
288 if (_alternateLocationList.empty() ==
false) {
289 oStr <<
"; Alternate matches: {";
290 unsigned short idx = 0;
291 for (LocationList_T::const_iterator itLoc =
292 _alternateLocationList.begin();
293 itLoc != _alternateLocationList.end(); ++itLoc, ++idx) {
297 const Location& lAlternateLocation = *itLoc;
314 std::ostringstream oStr;
315 unsigned short idx = 0;
322 oStr << lAlternateLocation;
326 const std::string lAltNameShortListString (oStr.str());
332 std::ostringstream oStr;
333 unsigned short idx = 0;
334 for (TvlPORList_T::const_iterator itCode =
_itTvlPORList.begin();
344 const std::string lTvlPORCodeList (oStr.str());
354 const std::string l2CharFeatCode = iFeatureCode.substr (0, 2);
355 const std::string l3CharFeatCode = iFeatureCode.substr (0, 3);
357 if (iFeatureCode ==
"AIRP" || iFeatureCode ==
"AIRF"
358 || iFeatureCode ==
"AIRQ") {
370 }
else if (iFeatureCode ==
"AIRB") {
378 }
else if (iFeatureCode ==
"AIRS") {
388 }
else if (iFeatureCode ==
"AIRH") {
394 }
else if (iFeatureCode ==
"RSTN") {
403 }
else if (l3CharFeatCode ==
"BUS") {
414 }
else if (iFeatureCode ==
"MTRO") {
422 }
else if (iFeatureCode ==
"FY" || iFeatureCode ==
"PRT"
423 || iFeatureCode ==
"PORT" || iFeatureCode ==
"HBR") {
434 }
else if (l3CharFeatCode ==
"PPL" || l3CharFeatCode ==
"ADM"
435 || iFeatureCode ==
"LCTY") {
444 }
else if (l3CharFeatCode ==
"PCL" || iFeatureCode ==
"AREA") {
456 }
else if (iFeatureCode ==
"MT") {
462 }
else if (iFeatureCode ==
"PLAT") {
467 }
else if (iFeatureCode ==
"OAS") {
472 }
else if (iFeatureCode ==
"PRK") {
478 }
else if (l3CharFeatCode ==
"RES") {
484 }
else if (iFeatureCode ==
"CMP") {
490 }
else if (l2CharFeatCode ==
"MN") {
495 }
else if (iFeatureCode ==
"HMSD") {
500 }
else if (l2CharFeatCode ==
"RK") {
505 }
else if (iFeatureCode ==
"PT") {
511 }
else if (l3CharFeatCode ==
"RSV") {
517 }
else if (iFeatureCode ==
"LK") {
523 }
else if (iFeatureCode ==
"BAY") {
528 }
else if (iFeatureCode ==
"CHN") {
534 }
else if (l3CharFeatCode ==
"ISL") {
541 }
else if (iFeatureCode ==
"ATOL") {
void fromStream(std::istream &)
const Percentage_T K_DEFAULT_PAGE_RANK
TvlPORList_T _itTvlPORList
void consolidateAltNameShortListString()
std::string toSingleLocationString() const
Date_T calculateDate() const
Structure modelling a (geographical) location.
std::string toShortString() const
static FeatureNameList_T getFeatureList(const FeatureCode_T &)
std::list< FeatureName_T > FeatureNameList_T
boost::gregorian::date Date_T
unsigned int Population_T
std::string describeKey() const
unsigned short NbOfErrors_T
std::string describeShortKey() const
void setTvlPORListString(const std::string &iPORListString)
std::string toString() const
std::string toBasicString() const
AltNameShortList_T _itAltNameShortList
std::string describe() const
void consolidateTvlPORListString()
void setAltNameShortListString(const std::string &iNameListString)
Enumeration of output types.
std::string describe() const
double MatchingPercentage_T
void toStream(std::ostream &) const