Open bbodenmiller opened 8 years ago
Another option may be to use the data source API's within_circle(...)
function to find nearest businesses/violations. I'm having an issue with the function and posted about that at https://stackoverflow.com/questions/32091300/combine-socrata-latitude-and-longitude-columns-to-form-point-type-location-colum.
There is also PostGIS, a spatial database extender for PostgreSQL object-relational database, which includes similar query options as MongoDB.
We should consider refining the nearest business search logic so it can run faster.
Currently we are using: http://stackoverflow.com/a/11113010/1233435
This may be more accurate and faster: http://stackoverflow.com/a/5933294/1233435... at least the where clause from this should be used so we can limit the calculations.
Alternatively we might just want to switch to MongoDB so we can use the built in geospatial query operators like $nearSphere: