60 const std::string lIataCodeStr =
61 iPlaceValues.get<std::string> (
"iata_code",
"");
65 const std::string lIataTypeStr =
66 iPlaceValues.get<std::string> (
"location_type",
"");
70 iPlaceValues.get<
int> (
"geoname_id", 0);
78 if (lNewPlaceKey != lPlaceKey) {
102 iPlaceValues.get<
int> (
"envelope_id");
106 const std::string lDateFromStr =
108 const OPENTREP::Date_T lDateFrom (boost::gregorian::from_string (lDateFromStr));
112 const std::string lDateUntilStr =
114 const OPENTREP::Date_T lDateUntil (boost::gregorian::from_string (lDateUntilStr));
119 ioPlace.
setComment (iPlaceValues.get<std::string> (
"comment",
""));
123 ioPlace.
setCommonName (iPlaceValues.get<std::string> (
"utf_name",
""));
127 ioPlace.
setAsciiName (iPlaceValues.get<std::string> (
"asciiname",
""));
131 ioPlace.
setFaaCode (iPlaceValues.get<std::string> (
"faa_code",
""));
134 const std::string lFeatClass = iPlaceValues.get<std::string>(
"fclass",
"");
137 const std::string lFeatCode = iPlaceValues.get<std::string> (
"fcode",
"");
142 ioPlace.
setStateCode (iPlaceValues.get<std::string> (
"state_code",
""));
143 ioPlace.
setCountryCode (iPlaceValues.get<std::string> (
"country_code"));
144 ioPlace.
setCountryName (iPlaceValues.get<std::string> (
"country_name"));
147 ioPlace.
setLatitude (iPlaceValues.get<
double> (
"latitude"));
148 ioPlace.
setLongitude (iPlaceValues.get<
double> (
"longitude"));
149 ioPlace.
setPageRank (iPlaceValues.get<
double> (
"page_rank",
154 ioPlace.
setAdmin1Code (iPlaceValues.get<std::string> (
"admin1_code",
""));
155 ioPlace.
setAdmin1UtfName (iPlaceValues.get<std::string> (
"admin1_UTF8_name",
""));
160 ioPlace.
setAdmin2Code (iPlaceValues.get<std::string> (
"admin2_code",
""));
161 ioPlace.
setAdmin2UtfName (iPlaceValues.get<std::string> (
"admin2_UTF8_name",
""));
166 ioPlace.
setAdmin3Code (iPlaceValues.get<std::string> (
"admin3_code",
""));
170 ioPlace.
setAdmin4Code (iPlaceValues.get<std::string> (
"admin4_code",
""));
174 iPlaceValues.get<
int> (
"population");
179 iPlaceValues.get<
int> (
"elevation");
188 ioPlace.
setTimeZone (iPlaceValues.get<std::string> (
"time_zone",
""));
193 iPlaceValues.get<
int> (
"gmt_offset", 0.0);
196 iPlaceValues.get<
int> (
"dst_offset", 0.0);
199 iPlaceValues.get<
int> (
"raw_offset", 0.0);
203 const std::string lModDateStr =
205 const OPENTREP::Date_T lModDate (boost::gregorian::from_string (lModDateStr));
210 ioPlace.
setWikiLink (iPlaceValues.get<std::string> (
"wiki_link",
""));
214 const std::string& lLanguageString =
215 iPlaceValues.get<std::string> (
"alt_lang_code",
"");
236 const std::string& lUtfName =
237 iPlaceValues.get<std::string> (
"alt_name",
"");
238 ioPlace.
addName (lLanguageStr, lUtfName);
244 ioPlace.
setCityCode (iPlaceValues.get<std::string> (
"city_iata_code",
""));
247 ioPlace.
setCityUtfName (iPlaceValues.get<std::string>(
"city_UTF8_name",
""));
250 ioPlace.
setCityAsciiName (iPlaceValues.get<std::string> (
"city_ASCII_name",
""));
265 indicator& ioIndicator) {
268 const std::string lIataCodeStr (lIataCode);
269 const indicator lIataCodeIndicator = lIataCodeStr.empty() ? i_null : i_ok;
273 const std::string lIcaoCodeStr (lIcaoCode);
274 const indicator lIcaoCodeIndicator = lIcaoCodeStr.empty() ? i_null : i_ok;
278 const std::string lFaaCodeStr (lFaaCode);
279 const indicator lFaaCodeIndicator = lFaaCodeStr.empty() ? i_null : i_ok;
283 const std::string lCityCodeStr (lCityCode);
284 const indicator lCityCodeIndicator = lCityCodeStr.empty() ? i_null : i_ok;
288 const std::string lStateCodeStr (lStateCode);
289 const indicator lStateCodeIndicator = lStateCodeStr.empty() ? i_null : i_ok;
293 const std::string lCountryCodeStr (lCountryCode);
297 const std::string lCountryNameStr (lCountryName);
301 const std::string lContinentNameStr (lContinentName);
305 const std::string lTimeZoneStr (lTimeZone);
309 const std::string lWikiLinkStr (lWikiLink);
312 ioPlaceValues.set (
"iata_code", lIataCodeStr, lIataCodeIndicator);
313 ioPlaceValues.set (
"icao_code", lIcaoCodeStr, lIcaoCodeIndicator);
315 ioPlaceValues.set (
"faa_code", lFaaCodeStr, lFaaCodeIndicator);
316 ioPlaceValues.set (
"city_code", lCityCodeStr, lCityCodeIndicator);
317 ioPlaceValues.set (
"state_code", lStateCodeStr, lStateCodeIndicator);
318 ioPlaceValues.set (
"country_code", lCountryCodeStr);
319 ioPlaceValues.set (
"country_name", lCountryNameStr);
320 ioPlaceValues.set (
"continent_name", lContinentNameStr);
321 ioPlaceValues.set (
"time_zone", lTimeZoneStr);
322 ioPlaceValues.set (
"latitude", iPlace.
getLatitude());
324 ioPlaceValues.set (
"page_rank", iPlace.
getPageRank());
325 ioPlaceValues.set (
"wiki_link", lWikiLinkStr);
const PageRank_T & getPageRank() const
const Percentage_T K_DEFAULT_PAGE_RANK
Class modelling the primary key of a location/POR (point of reference).
void setAsciiName(const std::string &iName)
void setCityUtfName(const std::string &iCityUtfName)
void setModificationDate(const Date_T &iModDate)
void setFeatureClass(const std::string &iFeatClass)
const TimeZone_T & getTimeZone() const
const GeonamesID_T & getGeonamesID() const
const CityCode_T & getCityCode() const
void addName(const LanguageCode_T &iLanguageCode, const std::string &iName)
void setGTopo30(const GTopo30_T &iGTopo30)
const Latitude_T & getLatitude() const
void setDateEnd(const Date_T &iDate)
void setPageRank(const PageRank_T &iPageRank)
void setRawOffset(const RawOffset_T &iOffset)
void setCityAsciiName(const std::string &iCityAsciiName)
void setIataType(const std::string &iIATAType)
void setContinentName(const std::string &iContinentName)
void setCommonName(const std::string &iName)
const FAACode_T & getFaaCode() const
void setAdmin1UtfName(const std::string &iAdminName)
void setWikiLink(const std::string &iWikiLink)
boost::gregorian::date Date_T
void setCountryName(const std::string &iCountryName)
void setAdmin2AsciiName(const std::string &iAdminName)
void setPopulation(const Population_T &iPopulation)
const ICAOCode_T & getIcaoCode() const
const WikiLink_T & getWikiLink() const
unsigned int Population_T
void setAdmin1AsciiName(const std::string &iAdminName)
void setComment(const std::string &iComment)
void setDSTOffset(const DSTOffset_T &iOffset)
void setLongitude(const Longitude_T &iLongitude)
static void to_base(const OPENTREP::Place &, values &ioPlaceValues, indicator &)
void setCityCode(const std::string &iCityCode)
const CountryName_T & getCountryName() const
void setDateFrom(const Date_T &iDate)
const std::string DEFAULT_DATE_STR
Class modelling a place/POR (point of reference).
const StateCode_T & getStateCode() const
static void from_base(values const &iPlaceValues, indicator, OPENTREP::Place &)
void setAdmin3Code(const std::string &iAdminCode)
void setFeatureCode(const std::string &iFeatCode)
const Longitude_T & getLongitude() const
const ContinentName_T & getContinentName() const
void setAltCountryCode(const std::string &iCountryCode)
void setTimeZone(const std::string &iTimeZone)
void setElevation(const Elevation_T &iElevation)
void setFaaCode(const std::string &iFaaCode)
const CountryCode_T & getCountryCode() const
void setEnvelopeID(const EnvelopeID_T &iEnvelopeID)
void setIataCode(const std::string &iIataCode)
Enumeration of output types.
void setLatitude(const Latitude_T &iLatitude)
void setGMTOffset(const GMTOffset_T &iOffset)
const LocationKey & getKey() const
void setAdmin1Code(const std::string &iAdminCode)
void setGeonamesID(const GeonamesID_T &iGeonamesID)
const IATACode_T & getIataCode() const
void setCountryCode(const std::string &iCountryCode)
void setStateCode(const std::string &iStateCode)
void setAdmin2UtfName(const std::string &iAdminName)
void setAdmin4Code(const std::string &iAdminCode)
void setAdmin2Code(const std::string &iAdminCode)