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

fix: ParsePolygon.containsPoint() correctly uses longitude and latitude #116

Merged
merged 4 commits into from
Jun 12, 2023

Conversation

cbaker6
Copy link
Member

@cbaker6 cbaker6 commented Jun 12, 2023

New Pull Request Checklist

Issue Description

ParsePolygon is encoded/decoded incorrectly with the latitude and longitude being (latitude, longitude) instead of (longitude, latitude).

Approach

Swap the latitude and longitude from (latitude, longitude) to (longitude, latitude). If a developer used ParseSwift <= 5.7.0 to save ParsePolygon's, they will need to update the respective ParseObjects by swapping the latitude and longitude manually.

TODOs before merging

  • Add tests
  • Add entry to changelog

@cbaker6 cbaker6 linked an issue Jun 12, 2023 that may be closed by this pull request
3 tasks
@cbaker6 cbaker6 changed the title feat: ParsePolygon is encoded/decoded incorrectly fix: ParsePolygon is encoded/decoded incorrectly Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #116 (2688192) into main (7e99505) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   91.58%   91.49%   -0.10%     
==========================================
  Files         173      173              
  Lines       15408    15361      -47     
==========================================
- Hits        14111    14054      -57     
- Misses       1297     1307      +10     
Impacted Files Coverage Δ
Sources/ParseSwift/Types/ParsePolygon.swift 97.72% <100.00%> (ø)

... and 6 files with indirect coverage changes

@cbaker6 cbaker6 changed the title fix: ParsePolygon is encoded/decoded incorrectly fix: ParsePolygon.containsPoint() correctly uses longitude and latitude Jun 12, 2023
@cbaker6 cbaker6 merged commit eb3bf49 into main Jun 12, 2023
@cbaker6 cbaker6 deleted the polygon branch June 12, 2023 18:20
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.

Latitude & Longitude misplacement of decoding ParsePolygon.
1 participant