Comments (7)
@davemlz I believe this has to do with some returned indices not having the same coordinates. Problematic coordinates seem to be "gsd", "common_name", "band" and some others. As of my understanding XR.concat should avoid this issue with the compat= "no_conflicts" statement, which is default. Might adding a coordinate check help to ensure all calculated indices contain the same coordinates ?
from spyndex.
Yes. You're totally right, @julianblue! I'm on it and I hope to have it done later :) For now and until then, [@Raziehgithub, @julianblue], if you want, a workaround for this problem is to set returnOrigin=False
. With this the indices are not concatenated and are returned as a list :)
from spyndex.
from spyndex.
Hi, @Raziehgithub!
I wasn't able to reproduce the error you got. Could you please share the code here?
from spyndex.
import pandas as pd
from affine import Affine
import spyndex
import xarray as xr
import rasterio as ro
import os
import glob
tif_files = glob.glob('clipped*.tif')
da = xr.open_rasterio(tif_files[1])
idx_1 = spyndex.computeIndex(
index = ["ARVI", "BNDVI", "CIG", "CIRE", "CVI", "DVI", "GARI", "GNDVI", "MCARI",
"MNLI", "MSR", "NDYI", "NLI","OSAVI", "RDVI", "SAVI", "TGI", "NDVI", "NDREI",
"EVI", "GBNDVI", "GLI", "GRNDVI", "MSAVI", "MTVI2", "VARI"],
params = {
"B": da.sel(band = 1),
"G": da.sel(band = 2),
"R": da.sel(band = 3),
"RE1": da.sel(band = 4),
"N": da.sel(band = 5),
"L": 0.5,
"g": 2.5,
"C1": 6,
"C2": 7.5
}
)
idx_1
from spyndex.
The problem was solved! If you download the dev version it should work now :) pip install git+https://github.com/davemlz/spyndex
.
Thank you for pointing this out!
from spyndex.
[@Raziehgithub, @julianblue], I have released v0.0.2
with the fix. Now you can download the new version with pip install -U spyndex
:)
from spyndex.
Related Issues (20)
- `globals` to `locals` HOT 1
- Missing gamma parameter for ARVI index. HOT 2
- `online` argument is not working HOT 1
- Add `omega` HOT 1
- Add `SpectralIndex` class HOT 1
- Add `kwargs` to `computeIndex` and `computeKernel` HOT 1
- Can't load the package in google colab HOT 2
- [Suggestion] Pin requirement versions (specifically python-box)
- QST: Maturity level of spyndex HOT 2
- Something wrong with NDWI HOT 2
- Default values for constants in spectral indices HOT 6
- QST: Compute custom spectral indices HOT 4
- Extras require for `spyndex` HOT 3
- spyndex.plot.heatmap not working HOT 1
- `spyndex` breaks with `earthengine-api==0.1.365` HOT 1
- migrate from setup.py to pyproject.toml HOT 1
- Error while running the toy example HOT 1
- Separate bands and constants in `SpectralIndex` objects HOT 1
- Support index-specific constant defaults HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spyndex.