Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/carlisia/geolocationapp

This geolocation app demonstrates the use of PostGIS.
https://github.com/carlisia/geolocationapp

Last synced: 4 days ago
JSON representation

This geolocation app demonstrates the use of PostGIS.

Awesome Lists containing this project

README

        

= Geolocation App

This geolocation app demonstrates the use of PostGIS.

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.

The app accepts file uploads, stores the records in a database, and then displays a list of locations ordered by distance from a given point (lat/lon).

== Development

=== Rules of the road

This project attempts to follow Sandi Metz's Rules.

A [description of the rules here](http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers).

=== Dependencies

$ Rails 4.0.0
$ Ruby 2.1.1
$ PostgreSQL 9.2
$ PostGIS

=== Setup

1. Install Homebrew packages.

$ brew install postgres --no-python

2. Follow post-install instructions for loading launch agents.

$ brew info postgres

3. To enable PostGIS once connected to your PostgreSQL 9.2 database run:

$ CREATE EXTENSION postgis;

4. Create a application.yml file under /config and add your ENV variables. Mine looks like this:

$ LOCAL_PG_USER: "carlisia"
$ LOCAL_HOST: "localhost"

$ GEO_SUPERUSER: "geo_rails_test_creator"
$ GEO_SUPER_PWD: "geo_pwd"

$ GEO_USER: "geo_rails_test_creator"
$ GEO_PWD: "geo_pwd"

4. Install RVM.

$ \curl -L https://get.rvm.io | bash -s stable --ruby

5. Get the code.
$ git clone [email protected]:carlisia/geolocationapp.git

6. Verify that the app is up and running.

$ open http://localhost:5000

=== To-do list

$ Better error handling and reporting
$ Better test coverage
$ Hookup to Code Climate
$ Document the API
# Better document environment configuration
# Document deployment