-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fall back to footprint when COG isn't georeferenced #14
Comments
I dug a little deeper and the issue is that I'm missing a try-catch in georaster which causes the promise to parse the GeoRaster to never complete when this error occurs. Here's a link to the line where I need to add a try/catch: https://github.com/GeoTIFF/georaster/blob/master/src/parseData.js#L83. When I manually throw the error, stac-layer works fine. I'll fix georaster and this should fix the downstream issues. |
Sounds great, thanks. I thought this would be a new feature and not a bugfix :-) |
Small update. I tried to fix this in georaster with GeoTIFF/georaster@93d6491#diff-5369190f55138dab912f4f97bca88335d0f783f50e14cda286672c7e5821963aR83, but it didn't work. The issue is that georaster uses old school promises and not async/await, so I have to update the code not just there, but everywhere else along the promise chain to make sure the error is sent all the way up (not to mention that the promise rejection is inside a web worker, so the error has to be sent as a message to the main thread). I'm working on a massive upgrade to georaster at the moment (including using async/await), but that probably won't be complete for still a couple months. I've already sank 2 hours into doing a hotfix to georaster, so I'm not optimistic about this path. That said, I think there is an easier solution. I can just fetch the first 1k bytes and then check if the projection information is in there using geotiff.js or is-cog. If it's not, don't run parseGeoraster. I'll keep you updated. |
This will hopefully be addressed by #13 whereby if the georaster doesn't finish parsing after 5 seconds, it will move onto the next load option. I know it's not perfect, but should hopefully be sufficient until the next major release of georaster (hopefully by the end of the year). |
The original data is not available anymore, is there a successor URL/file we could test with @AsgerPetersen? |
This is the production version of the STAC api: https://api.dataforsyningen.dk/skraafoto_api/v1.0/?token=6f27c9754e42e3ded6042f804203579b The API and its data are free and open but requires a user token. I have created a token specifically for this issue, but I cannot guarantee for how long the token will survive. Ping me again if it stops working. |
@AsgerPetersen Thanks a lot! Would you be okay with us downloading one of the GeoTiffs and (maybe after cropping), putting it with attribution (CC-BY 4.0) on https://github.com/GeoTIFF/test-data so that we avoid the token issue? |
According to the license link on the items (https://dataforsyningen.dk/Vilkaar) CC-BY 4.0 is allowed. The name of the creator is "Styrelsen for Dataforsyning og Infrastruktur" |
@AsgerPetersen Thank you! @DanielJDufour If you think this is a good idea, could you take care of this? I don't think I can push to the test-data repo... |
Originates from radiantearth/stac-browser#101 and was written originally by @AsgerPetersen:
The text was updated successfully, but these errors were encountered: