jnhansen / nd Goto Github PK
View Code? Open in Web Editor NEWFramework for the analysis of n-dimensional, multivariate Earth Observation data
License: MIT License
Framework for the analysis of n-dimensional, multivariate Earth Observation data
License: MIT License
I have installed gls, but the error of not finding gsl-config when installing nd
The metadata of a dataset may get corrupted or not contain the CRS information. For those cases it should be possible to manually specify the source CRS in nd.warp.reproject
, e.g. by adding an optional parameter src_crs
.
Should probably throw a warning if src_crs
differs from the CRS detected from metadata.
At the moment, nd.classify
is automatically imported which requires scikit-learn
. Should probably make this optional.
It could be useful to add a suite of command line tools:
nd-align
— equivalent to nd.warp.align
, align a number of input datasets.nd-warp
— equivalent to nd.warp.reproject
, in analogy to gdalwarp
(but working on multi-dimensional NetCDF files)nd-filter
nd-classify
Need to include proper inline documentation for the xarray accesors.
There are two ways to do this:
wrap_algorithm
Most of the remote sensing data has standardized variable names. The library should be able to infer the data source and type from the variable names, convert between different representations and perform different default actions (such as RGB representation) based on these representations.
This is especially relevant polarimetric SAR data, where data will usually be present in the covariance matrix representation, but may need to be converted to and from sigma0
, beta0
, gamma0
etc.
Getting the following error/warning when importing module:
proj_create: init=epsg:/init=IGNF: syntax not supported in non-PROJ4 emulation mode
Import fails if scikit-learn
is not installed because the vector
module is using it.
Possible solutions:
sklearn.preprocessing.LabelEncoder
nd.vector
optionalscikit-learn
a dependencyRelated to #11
Add functionality for GeoTiff output from nd
accessor
In nd.algorithm.wrap_algorithm()
, need to combine docstrings from Algorithm.__init__
and Algorithm.apply
, as follows:
apply
should be prepended to the parameters of __init__
apply
.Bug description
Steps to reproduce
Expected behavior
System (please complete the following information):
It would be great to have a method to create better visualizations of geographic data, e.g. using cartopy
/ geoviews
/ etc.
This would involve displaying the data as an overlay on a map, in an arbitrary projection.
OpenCV is currently needed for lots of things in nd.visualize
. Might consider replacing this with a lighter weight dependency or making it an optional dependency only required when calling the corresponding methods (i.e. to_rgb()
and write_video()
).
test_reproject_with_extra_dims
sometimes fails:
___________________________________ test_reproject_with_extra_dims[dims4] ___________________________________
dims = {'band': 5, 'extra': 2, 'time': 10, 'x': 20, ...}
@pytest.mark.parametrize('dims', [
{'y': 20, 'x': 20, 'time': 10, 'band': 5},
{'x': 20, 'y': 20, 'time': 10, 'band': 5},
{'time': 10, 'band': 5, 'x': 20, 'y': 20},
{'time': 10, 'x': 20, 'band': 5, 'y': 20},
{'y': 20, 'x': 20, 'time': 10, 'band': 5, 'extra': 2}
])
def test_reproject_with_extra_dims(dims):
crs1 = _parse_crs('+init=epsg:4326')
crs2 = _parse_crs('+init=epsg:3395')
ds = generate_test_dataset(
dims=dims, crs=crs1
)
proj = Reprojection(crs=crs2)
reprojected = proj.apply(ds)
# Check that a reprojected slice of the dataset is the same as
# the slice of the reprojection of the entire dataset.
slices = [
{'band': 3},
{'time': slice(1, 3)}
]
for s in slices:
xr_assert_equal(
proj.apply(ds.isel(**s)),
> reprojected.isel(**s)
)
E AssertionError: Left and right Dataset objects are not equal
E
E
E Differing data variables:
E L C12__im (time, extra, y, x) float64 -0.4385 0.295 0.5144 ... 0.0594 -0.1833
E R C12__im (time, y, x, extra) float64 -0.4385 0.7736 ... -0.1302 -0.1833
E L C12__re (time, extra, y, x) float64 0.5077 0.1089 0.2545 ... 0.6105 0.2276
E R C12__re (time, y, x, extra) float64 0.5077 0.1572 0.1089 ... -0.51 0.2276
E L C22 (time, extra, y, x) float64 -0.1661 -1.155 ... -0.6713 -0.06515
E R C22 (time, y, x, extra) float64 -0.1661 -0.3903 ... 0.1816 -0.06515
E L C11 (time, extra, y, x) float64 -0.6673 0.6047 -0.325 ... 0.5696 0.1056
E R C11 (time, y, x, extra) float64 -0.6673 0.03727 ... 0.01081 0.1056
nd/tests/test_warp.py:535: AssertionError
Is your feature request related to a problem? Please describe.
The following methods are not currently very consistent in what information is used to extract the corresponding parameter:
nd.warp.get_transform()
nd.warp.get_bounds()
nd.warp.get_extent()
nd.warp.get_resolution()
Describe the solution you'd like
The most reliable information to determine the transform etc. is probably the coordinate arrays and should be used even if there is relevant metadata present.
The methods may optionally raise a warning if the coordinate arrays don't seem to match the values specified in the metadata.
Need to create tests for the nd.vector
module, particularly nd.vector.rasterize()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.