Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Provide GeoNames city db in API #1

Closed
jace opened this issue Dec 27, 2012 · 6 comments
Closed

Provide GeoNames city db in API #1

jace opened this issue Dec 27, 2012 · 6 comments

Comments

@jace
Copy link
Member

jace commented Dec 27, 2012

Addresses are a common feature on HasGeek sites. They appear on hasjob (city only), geekup, hacknight and eventframe.

Filtering by city is a frequently requested feature. It's currently text-only because the city is stored as a string. We don't have a database of city names.

The GeoNames project provides free databases of cities around the world, with a consistent place id. This place id replaces City, State and Country in our fields.

Hascore should provide a copy of the GeoNames city db that other projects can use to provide an autocomplete field for city name. From their documentation, the cities1000.zip dump seems appropriate for our needs.

Instructions for importing to PostgreSQL.

@kracekumar
Copy link
Contributor

How about having this in coaster ?Whenever the project needs places, we can create schema + data ?

@jace
Copy link
Member Author

jace commented Dec 27, 2012

Coaster contains code patterns, not data. Baseframe has some data such as the country list, but that data doesn't quite belong there either. We don't have a sensible place to store frequently reused data. We need:

  1. One code module in which to place reusable data, from where we can import it, and
  2. One web service from which to serve reusable data, so that users can benefit from browser caching.

The geonames db shouldn't be in code at all because it changes often. It comes under use case 2, a shared webservice, and hence hascore.

@kracekumar
Copy link
Contributor

Makes sense.

@kracekumar
Copy link
Contributor

Will this architecture affect mobile user experience ?

@jace
Copy link
Member Author

jace commented Dec 27, 2012

It shouldn't be any different from the web experience.

@jace
Copy link
Member Author

jace commented May 31, 2014

Implemented in bc6736e.

@jace jace closed this as completed May 31, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants