molybdenum-99 / reality

Comprehensive data proxy to knowledge about real world
MIT License
818 stars 43 forks source link

City concept #3

Closed zverok closed 8 years ago

zverok commented 8 years ago

Test cases:

Reality.city('Dallas') # => should be Reality::City
Reality.city('Nothing') # => should be nil
Reality.city('New York') # => what should it be? In wikipedia, "New York" is state, and "New York City" is a city...
Reality.city('Odessa') # => city in Ukraine, but how to extract all other Odessas? https://en.wikipedia.org/wiki/Odessa_(disambiguation)

The requirements are the roughly same as for country (#1), plus city.country should return Country object, of course.

zverok commented 8 years ago

In fact, there's one cozy template Infobox settlement for all human settlements. So, potential usage is wider than "only city".

NB: some countries cities have subclasses of forementioned template ("Infobox German location", "Infobox Greek Dimos" and so on). It will be not so easy, as my first guess.

zverok commented 8 years ago

Most obvious fields:

zverok commented 8 years ago

Something is pushed. #country is awfully incomplete. Next target:

zverok commented 8 years ago

Some naive Geo::Coord implementation added.