Skip to content

Fix __geo_interface__ #1049

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

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Fix __geo_interface__ #1049

merged 1 commit into from
Mar 21, 2023

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Mar 16, 2023

Related Issue(s):

Description:

__geo_interface__ should be the feature, not just the geometry. I misread the protocol on my first implementation. I made the choice to just call to_dict with all the dials set to no to make it as quick and light as possible. An alternative implementation would be to build a new dict with only the __geo_interface__ required fields (type, bbox, properties, geometry, coordinates).

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@gadomski gadomski added this to the 1.7.1 milestone Mar 16, 2023
@gadomski gadomski requested a review from philvarner March 16, 2023 16:13
@gadomski gadomski self-assigned this Mar 16, 2023
@gadomski gadomski force-pushed the issues/1048-incorrect-geo-interface branch from 5a3e722 to efc0373 Compare March 16, 2023 16:13
@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.34%. Comparing base (0f9ff83) to head (1cd25e7).
Report is 258 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1049   +/-   ##
=======================================
  Coverage   90.34%   90.34%           
=======================================
  Files          47       47           
  Lines        6213     6213           
  Branches      929      929           
=======================================
  Hits         5613     5613           
  Misses        422      422           
  Partials      178      178           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gadomski gadomski requested a review from pjhartzell March 20, 2023 23:13
@gadomski gadomski force-pushed the issues/1048-incorrect-geo-interface branch from c9dfe79 to 6b65681 Compare March 20, 2023 23:14
@philvarner
Copy link
Collaborator

I think returning every field (instead of just the required GeoJSON Feature fields) is the correct behavior.

@gadomski gadomski force-pushed the issues/1048-incorrect-geo-interface branch from a4cfc77 to 1cd25e7 Compare March 21, 2023 14:42
@gadomski gadomski requested a review from philvarner March 21, 2023 14:43
@gadomski gadomski added this pull request to the merge queue Mar 21, 2023
@gadomski gadomski merged commit bda69fd into main Mar 21, 2023
@gadomski gadomski deleted the issues/1048-incorrect-geo-interface branch March 21, 2023 15:45
@gadomski gadomski mentioned this pull request Mar 21, 2023
5 tasks
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.

Item __geo_interface__ returns the wrong represenation
3 participants