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

Add arbitrary rotation at the same time as projection #14

Closed
dansand opened this issue Aug 25, 2015 · 4 comments
Closed

Add arbitrary rotation at the same time as projection #14

dansand opened this issue Aug 25, 2015 · 4 comments

Comments

@dansand
Copy link

dansand commented Aug 25, 2015

I have a situation where I want to take geographic features and use these as an input for numerical modelling. The modelling is cartesian, so I need to project the coordinates. At the same time, it is often useful to apply a rotation of the coordinate system, as it can help to make more natural model boundary conditions.

Is there any way I can add a rotation to a projection, so that I can call my point transformation (rotation/projection) in a single step?

Thanks

Dan

@micahcochran
Copy link
Collaborator

I'll be up front, I don't know much about this. I ran across a tilted perspective projection in PROJ.4, which is interesting.

I assume the usual way to deal with this is to rotate the "map canvas" during rendering.

matplotlib has some transformation matrix functions, but I can't be of any further help with that.

@georgeouzou
Copy link
Contributor

georgeouzou commented Apr 21, 2016

A little late but here goes: use the library Shapely (it contains an affine transformation module) in conjunction with the wanted projection to transform your features (It works well with pyproj library).Read more here. Check shapely.ops.transform and shapely.affinity.rotate

@snowman2
Copy link
Member

@snowman2
Copy link
Member

Closing as this thread due to inactivity. Feel free to reopen if you have any questions. Thanks!

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

4 participants