-
Notifications
You must be signed in to change notification settings - Fork 142
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
Getting raster data from timeseries rasters under annotation layer #128
Comments
@digitaltopo Assuming you've set up your RasterDataCollection correctly then Would it be possible to provide a minimum working example of the error you're seeing? |
Thanks, this was my assumption too, but the # Add layer with data from rasters
DATA_DIR="data/"
tifs = sorted(glob(DATA_DIR + '/**/*.tif'))
rdc = RasterDataCollection(tifs)
M.add_layer(rdc[:,[1]], 'TimeSeriesLayer', colormap=cmap, opacity=0.8, gamma=1.0)
# Time series control
def render_timeseries(idx=0):
M.layers[0].idx(idx)
interact(render_timeseries, idx=(0, len(M.layers[0].data) - 1))
layer, data = next(M.layers.annotation.rectangles[0].data)
layer The "error" is that the
Is this the correct process, or perhaps there is an issue with my raster? The rasters display fine on the map etc. |
@digitaltopo No, that looks right to me. If it's not too much trouble could you try going into tests/integration folder and running Then you should be able to run Then:
Something like:
If this works then it might be some incompatibility with the files your using in which case i'd love to see if I can reproduce the error locally. |
Yes it seems to work as you've posted with the test rasters. What property on the TimeSeriesLayer is it looking at, maybe I can try to see how my rasters differ from the test rasters. Thanks! |
@digitaltopo We merged a PR which should solve this issue. Can you pull the latest geonotebook master and try with your data now? |
@dorukozturk I pulled master and reinstalled but I am now getting an error when I start
Full stack trace:
My update process was to pull master, run |
What is your gdal version? You can do:
for gdal system version and
for your gdal-python binding version. The result of gdal-config --version and gdal version on pip freeze should match and should be >= 1.9. |
|
I see you are on Conda. Can you try to install rasterio with:
|
I have a layer created using a raster data collection
RasterDataCollection()
that I'm using to create a time series, following the03_Time_Series.ipynb
example notebook.I'm trying to grab raster data that is bounded by an annotation for each raster included in the time series (each date in timeseries). In the
02_Raster_Data.ipynb
example notebook, there is an example of getting raster data from the annotation using:I'm seeing this output:
But not sure where to go from here. How does the annotation layer relate to data in other layers? Thanks!
The text was updated successfully, but these errors were encountered: