raksha-life / rescuekerala

Website for coordinating rehabilitation of people affected in the Kerala Floods
https://keralarescue.in
MIT License
675 stars 575 forks source link

Add PostGIS extension to Postgres to add geospatial indexes #513

Open eapen opened 6 years ago

eapen commented 6 years ago

Subject of the issue

Add the PostGIS extension to Postgres which will allow you to create geospatial indexes which will speed up lat/lng + radius queries

Your environment

https://devcenter.heroku.com/articles/heroku-postgres-extensions-postgis-full-text-search#postgis

Steps to reproduce

This will likely have to be done via CLI and can be verified on a spare instance first

Expected behaviour

Will speed up queries and enable better location-based searches I believe the current plan is to use text-based indexes which will be much less efficient

shasts commented 6 years ago

@eapen Just in case if you haven't noticed, the coordinates are captured as text and I went through the data set, so it contains google maps URLs and even handwritten text.

The first step would be to clean up that data and run migration to convert to (lat,lon) coordinates.