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

Simplify project features response & prep for flatgeobuf osm extracts #932

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

spwoodcock
Copy link
Member

Issue

  1. The response from get_project_features_geojson has many redundant keys, increasing the data transfer size when displaying the data extract.
  2. We currently request for a data extract from raw-data-api, then download the resulting zipped geojson to /tmp, extract, and return the data. In the long run there is no need for this step. We can request a flatgeobuf file from raw-data-api, then either access directly from the S3 url (store the link in db), or upload the flatgeobuf to our own S3 for access.

Solution

  1. Simplify the returned JSON response when getting data extracts, removing keys:
task_id
project_id
geometry.properties.label
geometry.properties.title
geometry.properties.version
geometry.properties.changeset
geometry.properties.timestamp

from each JSON object in the array.

  1. Update to allow passing what format we require to raw-data-api & add comment TODOs about future changes.

@spwoodcock spwoodcock self-assigned this Oct 25, 2023
@spwoodcock spwoodcock temporarily deployed to test October 25, 2023 06:33 — with GitHub Actions Inactive
@github-actions github-actions bot added the backend Related to backend code label Oct 25, 2023
@spwoodcock spwoodcock temporarily deployed to test October 25, 2023 06:34 — with GitHub Actions Inactive
@spwoodcock spwoodcock force-pushed the fix/simplify-features-response branch from 1057435 to 2d1fd9f Compare October 25, 2023 06:41
@spwoodcock spwoodcock merged commit eb66034 into development Oct 25, 2023
1 check passed
@spwoodcock spwoodcock deleted the fix/simplify-features-response branch October 25, 2023 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant