![]() |
City Generator 1.0.1
Procedural city generation for C++23
|
Return type for city generation, holding all GeoNames fields. More...
#include <citygen.hpp>
Public Member Functions | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this city. | |
| operator std::string () const | |
| Implicit conversion to std::string. | |
Public Attributes | |
| std::uint32_t | geonameid {0} |
| GeoNames primary key. | |
| std::string | name |
| UTF-8 city name. | |
| std::string | asciiname |
| Plain ASCII transliteration of the name. | |
| double | latitude {0.0} |
| WGS84 latitude in decimal degrees. | |
| double | longitude {0.0} |
| WGS84 longitude in decimal degrees. | |
| std::string | feature_code |
| GeoNames feature code (PPL, PPLA, PPLC, etc.). | |
| std::string | country_code |
| ISO-3166 two-letter country code. | |
| std::string | cc2 |
| Alternate country codes (comma-separated). | |
| std::string | admin1_code |
| First-level administrative division code (state/province). | |
| std::string | admin2_code |
| Second-level administrative division code (county/district). | |
| std::string | admin3_code |
| Third-level administrative division code (township/commune). | |
| std::string | admin4_code |
| Fourth-level administrative division code (sub-district). | |
| std::uint64_t | population {0} |
| City population. | |
| std::int16_t | elevation {-9999} |
| Elevation in meters (-9999 if unknown). | |
| std::int16_t | dem {0} |
| Digital elevation model value (more reliable than elevation). | |
| std::string | timezone |
| IANA timezone identifier (e.g., "Europe/London"). | |
Friends | |
| class | cg |
| Allows cg to set the seed. | |
| std::ostream & | operator<< (std::ostream &os, const city &c) |
| Stream the city name to an output stream. | |
Return type for city generation, holding all GeoNames fields.
Supports implicit conversion to std::string (returns the city name) and streaming via operator<<.
Definition at line 42 of file citygen.hpp.
|
inline |
Implicit conversion to std::string.
Definition at line 103 of file citygen.hpp.
|
inline |
Retrieve the random seed used to generate this city.
Definition at line 96 of file citygen.hpp.
|
friend |
Allows cg to set the seed.
Definition at line 121 of file citygen.hpp.
|
friend |
Stream the city name to an output stream.
| os | Output stream. |
| c | City to stream. |
Definition at line 112 of file citygen.hpp.
| std::string dasmig::city::admin1_code |
First-level administrative division code (state/province).
Definition at line 70 of file citygen.hpp.
| std::string dasmig::city::admin2_code |
Second-level administrative division code (county/district).
Definition at line 73 of file citygen.hpp.
| std::string dasmig::city::admin3_code |
Third-level administrative division code (township/commune).
Definition at line 76 of file citygen.hpp.
| std::string dasmig::city::admin4_code |
Fourth-level administrative division code (sub-district).
Definition at line 79 of file citygen.hpp.
| std::string dasmig::city::asciiname |
Plain ASCII transliteration of the name.
Definition at line 52 of file citygen.hpp.
| std::string dasmig::city::cc2 |
Alternate country codes (comma-separated).
Definition at line 67 of file citygen.hpp.
| std::string dasmig::city::country_code |
ISO-3166 two-letter country code.
Definition at line 64 of file citygen.hpp.
| std::int16_t dasmig::city::dem {0} |
Digital elevation model value (more reliable than elevation).
Definition at line 88 of file citygen.hpp.
| std::int16_t dasmig::city::elevation {-9999} |
Elevation in meters (-9999 if unknown).
Definition at line 85 of file citygen.hpp.
| std::string dasmig::city::feature_code |
GeoNames feature code (PPL, PPLA, PPLC, etc.).
Definition at line 61 of file citygen.hpp.
| std::uint32_t dasmig::city::geonameid {0} |
GeoNames primary key.
Definition at line 46 of file citygen.hpp.
| double dasmig::city::latitude {0.0} |
WGS84 latitude in decimal degrees.
Definition at line 55 of file citygen.hpp.
| double dasmig::city::longitude {0.0} |
WGS84 longitude in decimal degrees.
Definition at line 58 of file citygen.hpp.
| std::string dasmig::city::name |
UTF-8 city name.
Definition at line 49 of file citygen.hpp.
| std::uint64_t dasmig::city::population {0} |
City population.
Definition at line 82 of file citygen.hpp.
| std::string dasmig::city::timezone |
IANA timezone identifier (e.g., "Europe/London").
Definition at line 91 of file citygen.hpp.