Location Hierarchy

From BITPlan Wiki
Jump to navigation Jump to search

General hierarchy example with discriminator

gender is the Discriminator - the inheritance tree is theoretically very deep but limited to a few thousand generations since homo sapiens showed up

Design Proposal

As a solution for [/issues/209 Issue 209 - ]"http:///issues/209" has been identified to contain an invalid "/issues/209" authority or path component.

Geography package

This is the analytic problem description and needs not to be implemented if there is no special behavior for any of the derived classes. Since SMW is data only at this time we'll use the generic Location storage and if need be implement the derived classes in the target platform such as Python as a specific geography package.

Generic location implementation

Potentially we could use Property:isA as locationKind if the followUp Problems of this decision are manageable.

Levels

levelKinds: World, Continent,WorldRegion, Country, Region, City 0: World - only entry with partOf being undefined - therefore root of tree

  1. Continent - such as Asia, Europe
  2. WorldRegion - such as Central Europe
  3. Country - such as Germany, Belgium
  4. Region - such as Bavaria
  5. City - such as Munich

pageTitles

Level 0 to 2 have verbatim pageTitles e.g.

  • World
  • North America

... From Countries on hierachical pageTitles are used as outlined in [/issues/220 Issue 220 - ]"http:///issues/220" has been identified to contain an invalid "/issues/220" authority or path component. Level 0 to 2 are ignored for pageTitles of Locations below Countries. That is because the uniqueness problem only shows up from Region/City Level and makes much more natural pageTitles

  • USA/NV/Las Vegas

looks ok

while

  • World/America/North America/United States of America/Nevada/Las Vegas

seems just outright ugly.

ISO based pageTitles ?

What if we'd use: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

Redirects to ISO Codes based pageTitles might by nice!


US/NV/Las Vegas would be the standard