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

Brendancol/geo transfer functions #661

Merged
merged 16 commits into from
Oct 8, 2018

Conversation

brendancol
Copy link
Collaborator

No description provided.

@ceball
Copy link
Member

ceball commented Oct 5, 2018

On travis and appveyor, after installing datashader's dependencies using conda, a develop/editable install of datashader is done using pip (pip install --no-deps -e .). The current error you're seeing on travis and appveyor seems to be from pip complaining about an already installed package, and is apparently a problem affecting many projects recently (see conda-forge/testpath-feedstock#7, conda-forge/jupyter-feedstock#5).

I had this problem myself on another project, and fixed it temporarily by running conda install -c "testpath<0.4". You could try adding that pin temporarily to install_requires in setup.py to continue with this PR, and hope that by the time you're ready to merge, the problem has been fixed elsewhere...

@jbednar
Copy link
Member

jbednar commented Oct 5, 2018

"clearly an installed package with broken metadata shouldn't break pip like this" -- agreed! @brendancol, please do add that pin to see if it fixes the build or at least lets you go on to the next issue.

ETA: Actually, I've pushed that fix in another PR, so if you rebase your PR on master, the pip problem should go away...

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added Algorithm References section to each of the geo methods


if not agg.attrs.get('res'):
#TODO: maybe monkey-patch a "res" attribute valueing unity is reasonable
raise ValueError('input xarray must have numeric `res` attr.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the docstring explain that res is required, and what it should be?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the following note to the docstring:

    Notes:
    ------

    Input aggregate must contain a `res` (numeric) attribute which specifies the
    x/y cellsize for use in calculating slope.  It is assumed that cells are square
    and have the same resolution in x/y dimensions.

    Algorithm References:
     - http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/how-slope-works.htm
     - Burrough, P. A., and McDonell, R. A., 1998. Principles of Geographical Information Systems (Oxford University Press, New York), pp 406


def mean(agg, passes=1, excludes=[np.nan]):
"""
Returns Mean filtered array using a 3x3 window sum number of times
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Returns mean filtered array using a 3x3 window applied in multiple passes"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes...revised...

"## Bump\n",
"Bump mapping is a cartographic technique often used to create the appearance of trees or other land features.\n",
"\n",
"The `datashader.bump` will produce a bump aggregate that can then used to add detail to the terrain. In this case, I will pretend the bumps are trees and shade them with green."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can then be used

@brendancol
Copy link
Collaborator Author

@jbednar I think I've hit all your review notes. CI is also now passing.

@jbednar jbednar merged commit 441dfb4 into holoviz:master Oct 8, 2018
@jbednar
Copy link
Member

jbednar commented Oct 8, 2018

Thanks! Now on to the tile generation!

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

Successfully merging this pull request may close these issues.

3 participants