OpenGeoscience / geonotebook

A Jupyter notebook extension for geospatial visualization and analysis
Apache License 2.0
1.08k stars 141 forks source link

Cannot add VRT raster layer #166

Closed naterubin closed 6 years ago

naterubin commented 6 years ago

I am trying to add a layer using a RasterData object initialized with a VRT image.

vrt = RasterData("test.vrt")
M.add_layer(vrt)

The layer does not appear on the map and the Jupyter server throws this error:

    RuntimeError: `/test.vrt' does not exist in the file system,
    and is not recognised as a supported dataset name.

Am I correct in assuming that GeoNotebook supports raster layers from VRTs and if so, have I correctly gone about adding the layer?

kotfic commented 6 years ago

Yes, geonotebook supports adding raster layers from VRTs. It looks like there may be an issue with relative/absolute paths?

danlamanna commented 6 years ago

Are you using the docker setup? A common issue with that is improperly mounting local data.

naterubin commented 6 years ago

Ah, that would make sense. I am using the docker setup, I'm running the image as such:

docker run -p 8888:8888 -v $(pwd):/notebooks -it --rm geonotebook/geonotebook
dorukozturk commented 6 years ago

You can add another volume with your data like "-v /some/directory/with/vrts/and/tiffs:/somedata". Make sure your vrt points to a path that exists in the container.

naterubin commented 6 years ago

This was in fact an issue with absolute paths. Thank you for your help.