Skip to content
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

MosaicJSON notebook example not working #160

Closed
giswqs opened this issue Dec 5, 2020 · 19 comments
Closed

MosaicJSON notebook example not working #160

giswqs opened this issue Dec 5, 2020 · 19 comments

Comments

@giswqs
Copy link
Contributor

giswqs commented Dec 5, 2020

It seems the MosaicJSON notebook example no longer works. s = soup.findAll('a') does not return any content contain "tif". Is it because digitalglobe changed their webpage recently?

@vincentsarago
Copy link
Member

thanks for the report @giswqs
I've fixed this but I now have another issue with our public stack that will get fixed in the afternoon. Also again, feel free to use cogeo.xyz API but remember that it's a use for DEMO only endpoint 😉

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

@vincentsarago Thanks for the quick fix. And yes, I understand that api.cogeo.xyz is a demo only endpoint. The add_COG_layer() in geemap allow users to use their own endpoint. I am also trying to set up an endpoint myself.

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

BTW, I was able to fix the BeautifulSoup error, but I got another error (AccessDeniedException) during step 5.2 (Create Mosaic). Here is the notebook I am using. Is it because the demo endpoint no longer allows anonymous users to create mosaic?

@vincentsarago
Copy link
Member

vincentsarago commented Dec 8, 2020

yes that's what I'm fixing right now!

Is it because the demo endpoint no longer allows anonymous users to create mosaic?

No it's because we switched to dynamodb mosaic backend ... and need to update the IAM role in our stack 🤦

@vincentsarago
Copy link
Member

stack and notebook have been updated

closed by e81c52e

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

I just tested the updated notebook and encountered an error.

@vincentsarago
Copy link
Member

🤔 so it fails to get the bbox from the files... this work on my local machine, not sure what's going on for you!

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

I created a fresh conda env to test it. The rasterio version is v1.1.8. My OS is Manajaro KDE Linux.

conda create -n tiler python=3.8
pip install rasterio ipyleaflet requests tqdm bs4 requests
pip install rio-tiler cogeo-mosaic --pre

@vincentsarago
Copy link
Member

the errors comes from the fact you can't retrieve the info from the files (not from the titiler API).

On the block you shared can you print responses?

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

Indeed, the responses variable is empty. Here is the notebook with outputs.

@vincentsarago
Copy link
Member

vincentsarago commented Dec 8, 2020

oh I think this is because you are using binder, you need to set the env variable CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt I guess.

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

Setting CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt did the trick! Thank you very much for your help!

@kylebarron
Copy link
Member

I think the newest version of rasterio should fix this, but yeah this is necessary for now

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

How to overwrite an existing mosaic layer? Where to put overwrite=True? Inside the json dict or params dict? I tried both, it seems not working.

@vincentsarago
Copy link
Member

ah that's the new feature on cogeo-mosaic and the API is not ready for this 🤦

I'm sorry that the full api for cogeo.xyz is not public (the only diff is the token auth). I'll try to fix this tonight @giswqs

@giswqs
Copy link
Contributor Author

giswqs commented Dec 8, 2020

Good to know. Thanks a lot for your time.

@vincentsarago
Copy link
Member

@giswqs sorry it took so long, but this is fixed in api.cogeo.xyz

@giswqs
Copy link
Contributor Author

giswqs commented Dec 12, 2020

@vincentsarago Thanks for the fix. Where should I put overwrite=True?

@vincentsarago
Copy link
Member

in the body

json={
    username:
    layername:
    files:
    overwrite=True
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants