-
Notifications
You must be signed in to change notification settings - Fork 29
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
add_raster() isn't adding the downloaded image into the map #158
Comments
Are you running this in a remote Jupyter environment like a JupyterHub? Or are you running locally? If remote, you'll need to make sure you are using jupyter-server-proxy: https://localtileserver.banesullivan.com/installation/remote-jupyter.html |
I am running this on a Ubuntu PC in the same network remotely. (Remote-SSH from VSCode) So, I did the first two steps as the link said but it is still not showing up. |
Did you restart Jupyter after installing Would you please provide a report: import localtileserver
print(localtileserver.Report()) |
|
Hello, |
Not a dumb question at all! Getting Did you try setting the prefix like I mentioned above? With the preceding
from localtileserver import TileClient
client = TileClient('raster.tif')
client.server.port I presume you are asking this so that you can forward/proxy that port much like you do for Jupyter -- thing is this is dynamic and allocated at runtime. This is why I recommend using You can debug the right server proxy prefix by experimenting with the client = TileClient('raster.tif', client_prefix='/proxy/{port}')
client If you can past the URL you see at the top of your browser for Jupyter, I can help you get this right. |
@banesullivan Thanks for the tip. I meet the same problem using SSH jupyter. UpdateHa, I forgot to install jupyter-server-proxy locally, keeping client_prefix with installed jupyter-server-proxy works well! SolutionOption1. set Note that both methods need the installation of |
Sorry I am still having trouble as I am new to this. So, here are the steps right:
|
After installing jupyter-server-proxy, run the following code block before using localtileserver or leafmap, it should work. import os
os.environ['LOCALTILESERVER_CLIENT_PREFIX'] = 'proxy/{port}' |
It is a placeholder that will be automatically handled |
Sorry, this is what I have so far and it's still not showing up: import os import os if m.user_roi is not None: image = "satellite.tif" m.layers[-1].visible = False |
@zxdawn Hello, can you see what I am missing here? |
@rafiibnsultan Would you please share the URL you see in the browser when you have the notebook open? |
@banesullivan I am actually running it on VSCode. Right now, I am working directly on the Ubuntu PC (that I was doing SSH to) for the project. |
@rafiibnsultan I just run it in the remote Jupyter Notebook by ssh and didn't test VSCode. Could you test it in Notebook? |
So, I was replicating this notebook: https://samgeo.gishub.org/examples/input_prompts/
The code:
The downloaded image isn't showing up in the map, only the map is being shown while running it on my PC. However, in the google colab it is working fine. Can you suggest what could be the problem?
Output of my PC: https://drive.google.com/file/d/1Ac8r0aXp0u0Wt4GeG7ckG8E79kweb55X/view?usp=drive_link
Output of Colab: https://drive.google.com/file/d/1Ku9QzrowH6FRMc3ursi4NZ4N1bYTs30U/view?usp=drive_link
The author said it could be the localtileserver issue. So, I tried running your example: https://localtileserver.banesullivan.com/
It's not showing up on the map either.
The text was updated successfully, but these errors were encountered: