You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone. I'm trying to overlay/add terrain detail on a map, and not having much bash, C, jupyter notebook, or c family language experience, attempting to add a hillshade map has been difficult.
I've got a fair bit of experience with python projects collaboration and OOP stuff, and Id be willing to help implement this feature, but of course the C side stuff is very foreign to me.
Hi @El-minadero, thanks for writing and offering to help! Sorry for the late reply.
There is still a piece of infrastructure missing from LibGMT to make the grd modules work: passing netCDF style grids to GMT throught the virtual file machinery. This isn't a huge a problem and I'm hopping to have it done within the next 2 weeks. I just haven't had time to implement it yet.
Since GMT uses netCDF grids, I'm thinking of having xarray.Dataset as our "official" grid format. We can't use plain numpy arrays most of the time because there are no coordinates attached (and we need those). It would also make it easy to load netCDF data and pass it directly to fig.grdimage, for example.
The hillshading in GMT6 is a lot easier. You can get a hillshaded map with a single option (-I).
I'll ping back here when I have the xarray support working and we can discuss adding grdimage if you're still up for it.
Quick update on this issue, now that #159 is merged we can start wrapping the grid plotting modules.
@El-minadero if you want to take a stab at wrapping grdimage let me know. Look at the docs for LibGMT.grid_to_vfile for an example of how to pass in the grid object to a GMT module.
@seisman I'm working out some kinks still on the API to get this working. We found a few bugs in GMT related to grids because this part of the API was never exercised. I'm hoping to have it done tomorrow.
Activity
leouieda commentedon Feb 7, 2018
Hi @El-minadero, thanks for writing and offering to help! Sorry for the late reply.
There is still a piece of infrastructure missing from
LibGMTto make the grd modules work: passing netCDF style grids to GMT throught the virtual file machinery. This isn't a huge a problem and I'm hopping to have it done within the next 2 weeks. I just haven't had time to implement it yet.Once that is done, we can work on wrapping the
grdimagemodule and I'd love help with that. It will probably look very similar to something like the wrapper forplot: https://github.com/GenericMappingTools/gmt-python/blob/master/gmt/base_plotting.py#L195Since GMT uses netCDF grids, I'm thinking of having xarray.Dataset as our "official" grid format. We can't use plain numpy arrays most of the time because there are no coordinates attached (and we need those). It would also make it easy to load netCDF data and pass it directly to
fig.grdimage, for example.The hillshading in GMT6 is a lot easier. You can get a hillshaded map with a single option (
-I).I'll ping back here when I have the xarray support working and we can discuss adding
grdimageif you're still up for it.adamnicholasprice commentedon Mar 7, 2018
I second this feature request! Actually, just more support for the whole grd[cmd] interface!
leouieda commentedon Mar 7, 2018
@adamnicholasprice thanks for the feedback! I'll update this issue when the required infrastructure is in place.
Create LibGMT.grid_to_vfile for xarray input support (#159)
leouieda commentedon Apr 10, 2018
Quick update on this issue, now that #159 is merged we can start wrapping the grid plotting modules.
@El-minadero if you want to take a stab at wrapping grdimage let me know. Look at the docs for
LibGMT.grid_to_vfilefor an example of how to pass in the grid object to a GMT module.[-]More Pythonic support for grdimage[/-][+]Wrapper for grdimage[/+]Basic support for grdimage with file input (#183)
seisman commentedon Jun 20, 2018
@El-minadero @adamnicholasprice @leouieda I'd like to help implement it if no one is working on this issue.
leouieda commentedon Jun 20, 2018
@seisman I'm working out some kinks still on the API to get this working. We found a few bugs in GMT related to grids because this part of the API was never exercised. I'm hoping to have it done tomorrow.
Pass in grids to grdimage (#197)