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

Southern hemisphere coordinate transforms #6

Open
deeplycloudy opened this issue Jan 12, 2016 · 0 comments
Open

Southern hemisphere coordinate transforms #6

deeplycloudy opened this issue Jan 12, 2016 · 0 comments

Comments

@deeplycloudy
Copy link
Owner

Via @tjlang, "You had a bug in the attached script, which caused the projections to fail in the southern hemisphere (everything was erroneously rotated 180 degrees around the projection center). The specific issue was the definition of localy in the TangentPlaneCartesianSystem class. I fixed it with a simple if-then statement (see lines 277-280) and now the projections essentially match what Basemap does."

    localy = dot(P, northCenterECEF[:,newaxis] )
    if ctrLat >= 0:
        localy = -localy / norm(localy)  # negation gets x and y pointing in the right direction
    else:
        localy = localy / norm(localy)  # No negation in southern hemisphere
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

No branches or pull requests

1 participant