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

Allow for passing in geo_shape geoJSON when creating a group #847

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

tibetsprague
Copy link
Contributor

No description provided.

@lorenjohnson lorenjohnson temporarily deployed to hylo-node-pr-847 July 28, 2022 19:06 Inactive
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #847 (ccdcaf4) into dev (a061a15) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##              dev     #847      +/-   ##
==========================================
- Coverage   57.15%   57.14%   -0.02%     
==========================================
  Files         211      211              
  Lines        5884     5887       +3     
==========================================
+ Hits         3363     3364       +1     
- Misses       2521     2523       +2     
Impacted Files Coverage Δ
api/models/Group.js 49.24% <50.00%> (-0.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a061a15...ccdcaf4. Read the comment docs.

@thomasgwatson
Copy link
Contributor

So, unfortunately, geomFromGeoJSON in postgis only accepts a single geoJSON geometry, not a feature collection. I think this was part of what was bogging us down in the prior attempt to get this sorted.

We could check if the incoming geoJSON is a feature collection, and then port it to a wkt encoded 'geometry collection', which can then be inserted into the geo_shape row via ST_AsText.

We will also need to validate that the same geometries are being served out as valid geoJSON. Perhaps helper functions for these sorts of operations were already built out when Sophia did the group geometry stuff?

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

Successfully merging this pull request may close these issues.

3 participants