-
Notifications
You must be signed in to change notification settings - Fork 217
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
get lon,lat from image coordinates (using mapproject) #1986
Comments
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct. |
Hi @espiritocz, glad to see someone checking out the EGU short course materials! From the sounds of what you're trying to do (click on a map to get lon/lat coordinates), you may want to check out https://geoviews.org/index.html instead. Unfortunately it'll be quite difficult to get PyGMT to respond to clicks on a map (since GMT isn't actually designed for interactivity). Geoviews has a forum at https://discourse.holoviz.org/c/geoviews/7 which would be suited for these types of questions. Good luck! |
thank you Wei Ji,
actually, the question is rather about function that would have input as
x,y coordinates of an image (that contains map on canvas, generated by GMT)
and in my opinion it should be fairly easy to just get lat,lon from there,
as GMT should know where it places related pixels.
i can do the rest )
…On Sat, 2 Jul 2022, 16:22 Wei Ji, ***@***.***> wrote:
Hi @espiritocz <https://github.com/espiritocz>, glad to see someone
checking out the EGU short course materials! From the sounds of what you're
trying to do (click on a map to get lon/lat coordinates), you may want to
check out https://geoviews.org/index.html instead. Unfortunately it'll be
quite difficult to get PyGMT to respond to clicks on a map (since GMT isn't
actually designed for interactivity).
Geoviews has a forum at https://discourse.holoviz.org/c/geoviews/7 which
would be suited for these types of questions. Good luck!
—
Reply to this email directly, view it on GitHub
<#1986 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADYYKQXWWS2TKTAWDXWB4DVSBND5ANCNFSM52O4HMKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ah ok, so if you just want to convert image x y coordinates to longitude and latitude, that can be done with an affine transform that encodes information about the top left corner's coordinates and the pixel size, e.g. following https://gis.stackexchange.com/questions/395667/translating-x-y-coordinates-to-lat-long/395680#395680. If you don't mind the command line, GMT does have |
I'm closing the issue because I think this feature is beyond the scope of the PyGMT project. Feel free to reopen the issue if you think more should be discussed. |
The single lonlat to xy conversion could be considered as a feature request for |
thank you Wei Ji,
actually, can you share some material/code that would help me figure out
how to best wrap the (compiled) C code to python (outside of just
os.system)?
that might be helpful.
cheers!
M.
…On Mon, 11 Jul 2022, 03:22 Wei Ji, ***@***.***> wrote:
Reopened #1986 <#1986>.
—
Reply to this email directly, view it on GitHub
<#1986 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADYYKWT4EANOOXACDIRLLDVTOAQFANCNFSM52O4HMKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
hi.
only wanted to ask whether there is a chance this year to have bindings to
mapproject through pygmt?
thanks
…On Tue, 19 Jul 2022, 11:48 Milan Lazecky, ***@***.***> wrote:
thank you Wei Ji,
actually, can you share some material/code that would help me figure out
how to best wrap the (compiled) C code to python (outside of just
os.system)?
that might be helpful.
cheers!
M.
On Mon, 11 Jul 2022, 03:22 Wei Ji, ***@***.***> wrote:
> Reopened #1986 <#1986>
> .
>
> —
> Reply to this email directly, view it on GitHub
> <#1986 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADYYKWT4EANOOXACDIRLLDVTOAQFANCNFSM52O4HMKQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
hi guys,
inspired by your egu materials (the trick with Panel), i thought about another interactive feature in ipynb. i want to run a function (show time series plot) upon clicking to the map.
for this, i can get x,y coordinates in generated image, as in:
https://stackoverflow.com/questions/52235476/jupyter-notebook-register-mouse-position-clicks-moves-on-a-displayed-image-j
is there a way on how to get original geographic coordinates, i.e. back-projection from final image coordinates to lon, lat of the source?
thank you for any hints to push this forward
The text was updated successfully, but these errors were encountered: