-
Notifications
You must be signed in to change notification settings - Fork 213
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
pygmt.sphdistance: data should be an optional parameter if voronoi is used #1641
Comments
This issue comes from |
If tabular data is provided to Since this feature is so closely tied to sphtriangulate, it might be worth drafting out the implementation of that module to make sure there are no unforeseen consequences of the bug fix for the voronoi parameter. I think your suggestion would work for passing file names, but eventually it would be nice to have sphtriangulate return an in-memory object which could be passed to sphdistance. I'm not sure whether it would work for that case. |
Description of the problem
pygmt.sphdistance will give a
GMTInvalidInput: No input data provided
error ifdata
is not used. However, the purpose of thevoronoi
parameter is to allow precomputed Voronoi polygons to be provided instead of raw data. So, thedata
parameter should be made optional ifVoronoi
is set.Full code that generated the error
precompute using gmt's sphtriangulate:
gmt sphtriangulate @gshhs_c.txt -Qv -D > tt.pol
Full error message
System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
:The text was updated successfully, but these errors were encountered: