Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS Support #93

Open
nam20485 opened this issue Aug 6, 2018 · 1 comment
Open

PostGIS Support #93

nam20485 opened this issue Aug 6, 2018 · 1 comment
Assignees

Comments

@nam20485
Copy link
Member

nam20485 commented Aug 6, 2018

Do we want add PostGIS support to the backend-exemplar's service?

I implemented it successfully in my disaster-resilience backend service, and its not too hard. It does not require any changes to the DB, just the Django app. As far as geojson responses, they will not automatically be parsed out of the wkb_geometry fields, but only after the endpoint is created and setup to take advantage of the Geometry Fields encoded in a table's model's wkb_geometry column/field.

I figured I would ask since we are currently focussed on bringing the backend_exemplar up-to-date.

The advantage would be that people spawning new backend repos would be automatically set up out-of the-box to take advantage of PostGIS columns that may exist in the DB schema. As mentioned above, they would not be automatically returned in the endpoint responses, so the creator could decide at that point whether to enable geojson responses or not. As @AraOshin has advised in the past, decoding and returning geoson from wkb_geometry fields can be expensive and bandwidth/response time intensive so I think its important to not enable them on the endpoint responses by default, but rather let the creator decide on case by case basis.

@znmeb
@AraOshin
@BrianHGrant
@MikeTheCanuck

@znmeb
Copy link
Contributor

znmeb commented Aug 7, 2018

  1. PostGIS is in the database container - see https://github.com/hackoregon/backend-examplar-2018/blob/staging/DOCKERFILE.db.development. So is pgRouting - that's one of the tools I wanted to have available for Transportation Systems, although we ended up not using it.
  2. GeoDjango is in the API container, and it requires PostGIS.

A bit o' history - we didn't know whether we'd have PostGIS on the AWS server until about halfway through the season, so we made sure we'd be able to do GIS calculations offline and upload processed data as GeoJSON or just lat-long pairs.

@nam20485 nam20485 self-assigned this Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants