Page MenuHomePhabricator

#coordinates doesn't seem to understand type:city(<integer>)
Closed, DeclinedPublic

Description

For type:city it's common to include the number of inhabitants after it, so for example type:city(146753). This is useful for seeing the difference between small and large cities. At the moment this is not parsed and gt_type is set to null.

This should be parsed and stored in the geo_tags table. Two options:

  • Store it as "city(146753)"
  • Strip off the (146753) part and only store "city"

Either is fine with me


Version: unspecified
Severity: normal

Details

Reference
bz50857

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:51 AM
bzimport added a project: GeoData.
bzimport set Reference to bz50857.
bzimport added a subscriber: Unknown Object (MLST).

Hmm, funny - we even have tests that are supposed to verify that the latter works - however in practice it doesn't work:P

We need unit tests to tests the unit tests? ;-)

https://en.wikipedia.org/w/index.php?title=User:MaxSem/sandbox&oldid=576195752 results in the following:

{

"query": {
    "pages": {
        "34832133": {
            "pageid": 34832133,
            "ns": 2,
            "title": "User:MaxSem/sandbox",
            "coordinates": [
                {
                    "lat": 45.7572,
                    "lon": 21.2336,
                    "type": "city",
                    "dim": "10000",
                    "globe": "earth"
                }
            ]
        }
    }
}

}

WORKSFORME? But I remeber it indeed had some problems when I first investigated it.