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

Antimeridian problem #285

Merged
merged 12 commits into from
Nov 28, 2023
Merged

Antimeridian problem #285

merged 12 commits into from
Nov 28, 2023

Conversation

aabelean
Copy link
Contributor

@aabelean aabelean commented Nov 28, 2023

  • Summary of changes (Bug fix, feature, docs update, ...)
    Solves the antimeridian problem in mapping: split all polygons that cross the dateline/antimeridian. Added this function as optional for plot_map because the user-defined polygons might be too complex and cause errors.

  • Please check if the PR fulfills these requirements

  • Closes Dealing with wrapping longitude boundary #225
  • Tests added and passed
  • All code checks passing - styler run over code
  • Added an entry in the latest CHANGELOG.md file if fixing a bug or adding a new feature
  • Any new libraries added to DESCRIPTION

@aabelean aabelean changed the title Iss225/antimeridian problem Antimeridian problem Nov 28, 2023
Copy link
Contributor

@XueqingYin XueqingYin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @aabelean. Both plot_mapping.R and plot_mesh.R work ok, but shiny_meshbuilder.R returns an error when testing it with the covid19 data. The error is attached below.

image

@aabelean
Copy link
Contributor Author

I wonder if it now works. Tests seem to fail because the functions do not yet appear in NAMESPACE.

Thank you @aabelean. Both plot_mapping.R and plot_mesh.R work ok, but shiny_meshbuilder.R returns an error when testing it with the covid19 data. The error is attached below.

image

Copy link
Contributor

@XueqingYin XueqingYin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aabelean, the argument "map" is missing now in the function leaflet::addMeasure() in shiny_meshbuilder.R. Once fixing it as m <- leaflet::addMeasure(m, position = 'bottomleft', primaryLengthUnit = 'kilometers', primaryAreaUnit = 'sqmeters'), it works.

image

@aabelean
Copy link
Contributor Author

Thanks for checking, @XueqingYin .

Copy link
Contributor

@XueqingYin XueqingYin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks.

Added package `sfheaders`
@aabelean aabelean marked this pull request as ready for review November 28, 2023 15:19
@aabelean aabelean merged commit 46015b8 into devel Nov 28, 2023
2 checks passed
@aabelean aabelean deleted the Iss225/AntimeridianProblem branch November 28, 2023 15:21
@gareth-j gareth-j mentioned this pull request Dec 19, 2023
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.

Dealing with wrapping longitude boundary
2 participants