SmartCambridge / tfc_web

Web access to the TFC platform
MIT License
3 stars 2 forks source link

Remove remaining PostGIS functionality #144

Closed jw35 closed 6 years ago

jw35 commented 6 years ago

Date: Mon, 4 Jun 2018 15:16:02 +0100 From: Ian Lewis To: Dr Abraham Martin Campillo CC: Jon Warbrick Subject: postgresql tfcweb postgis tidyup

For when we're done with the SmartPanel rollout...

I think at this stage combining Django and PostGIS is an unnecessary complication. From inspecting the code it seems we're barely using PostGIS in prod code, if at all (I see the tfc_gis app, and the 'gis_location' field in transport.Stop).

Migrating a Django database with PostGIS in it is problematic (although I'm sure fixable), e.g. I just hit this error: https://stackoverflow.com/questions/18643998/geodjango-geosexception-error.

So unless I'm mistaken, I think we should plan for the PostGIS removal from tfc_web.

abrahammartin commented 6 years ago

It is still used to find out which bus lines and bus stops have some defined areas: https://smartcambridge.org/transport/areas/

These areas are not squared (like in a map), but instead defined by a polygon (like the area of Cambridge in this case: https://smartcambridge.org/transport/area/1/). Using PostGIS is the only efficient way to find which objects (bus stops) are in this polygon.