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

mapPlot() problem with space-containing plots #1334

Closed
dankelley opened this issue Nov 15, 2017 · 3 comments
Closed

mapPlot() problem with space-containing plots #1334

dankelley opened this issue Nov 15, 2017 · 3 comments
Assignees
Labels

Comments

@dankelley
Copy link
Owner

dankelley commented Nov 15, 2017

This is a placeholder for work I'm doing in the "dk" branch, to try to fix a problem with missing grid lines (OAR figure, left). I am not going to document very much here, because nobody else really ought to be playing with "dk" (which might not even build, at any time). Sample code:

library(oce)
data(coastlineWorld)
mapPlot(coastlineCut(coastlineWorld, -45),projection="+proj=ortho +lon_0=-45", col="gray")

It all stems from an attempt at efficiency in maps that span a small portion of the earth (for which there's no need to draw a lot of non-intersecting grid lines). If there is a lot of space around a world view, the code cannot detect any intersections, because what it's doing is to trace along the par("usr") perimeter, attempting inverse map projections. My plan is to trace a grid through the whole plot are, not just the perimeter. That should help in this case, but also I think it can help with the UHL problems, if I store information about the mapping. (The whole challenge with UHL is making it general, so the problem goes away with any legal projection, including both lon and lat shifts.)

I don't have any particular timetable for fixing this issue, which is why it's going in the dk branch, where I can experiment a lot without users getting tangled up with changes.

screen shot 2017-11-15 at 8 09 52 am

@dankelley dankelley self-assigned this Nov 15, 2017
@richardsc
Copy link
Collaborator

Also notice issue #616 on the orthographic plot ... 😢

@dankelley
Copy link
Owner Author

Yes, when I go to my envisioned grid-based scheme, we'll know whether Antarctica should be completed with line going to the pole, or something else. I think coastlineCut could be altered, to fix up such things. I also think it could be altered -- and this is the holy grail -- to use the edge of the earth, in space-revealing plots.

@dankelley
Copy link
Owner Author

I think this works ok now in the "develop" branch. I've updated a blog item on this (http://dankelley.github.io/r/2015/04/03/oce-proj.html) as an additional test. This grid-based method is what I should have been doing from the start, instead of the perimeter-trace method. I think the blog is a good test suite for such things, and I'll be using it from now on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants