Using the COPC viewer to display data in public buckets? #57
Replies: 7 comments
-
https://s3.amazonaws.com/esip-qhub-public/testing/20230105_MB_SC_Cap_UltraHi_NAD83_2011_UTM10N_ConfWater_Trimmed.copc.laz is not publicly accessible. |
Beta Was this translation helpful? Give feedback.
-
You must make sure your bucket has viewer.copc.io listed in its CORS settings or it will not allow the fetch of data through it. |
Beta Was this translation helpful? Give feedback.
-
@hobu, thanks, I thought you could slap that "s3.amazonaws.com" on the front of a standard s3 url: So the correct public https url to the COPC data should be: I believe this viewer URL: should work once CORS is configured correctly. Does this look like the right CORS JSON policy for S3? [
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedOrigins": [
"https://viewer.copc.io"
],
"ExposeHeaders": []
}
] I tried the above URL for the viewer with this enabled policy and got the "failed to fetch" error. But then I tried adding the COPC dataset in the GUI using the "+" button and now it works! |
Beta Was this translation helpful? Give feedback.
-
Yep, looks good! https://viewer.copc.io?state=6158f9967c8bb8f21a80e8b872d00ab2a1437df913a46547f06867ab152b6551 |
Beta Was this translation helpful? Give feedback.
-
Thanks @hobu! And just in case it's useful to folks who show up at this disussion, we converted our .laz to .copc.laz. using this Jupyter Notebook. The conda environment we used to run the notebook was very simple: name: pdal
channels:
- conda-forge
dependencies:
- python=3.10
- pdal
- python-pdal
- fsspec
- s3fs
- ipykernel |
Beta Was this translation helpful? Give feedback.
-
It is not required to reproject COPC data into EPSG:3857 to use the viewer. It should be able to consume most "boring" WKT data and do the right thing and reproject it as it loads it. |
Beta Was this translation helpful? Give feedback.
-
@hobu, Okay! Thanks for letting us know, since that was the most time consuming step in the workflow! I changed the notebook/gist to simplify it! |
Beta Was this translation helpful? Give feedback.
-
We collected some point cloud data from the recent flooding in California and would like to allow stakeholders to visualize it using the COPC viewer. We successfully converted our LAZ data to COPC using python-pdal and uploaded it to an Earth System Information Partners (ESIP) public bucket. We were hoping this would then work:
https://viewer.copc.io/?copc=https://s3.amazonaws.com/esip-qhub-public/testing/20230105_MB_SC_Cap_UltraHi_NAD83_2011_UTM10N_ConfWater_Trimmed.copc.laz
But this just returns the error:
Failed to fetch
.Is the viewer constrained to only load data from certain whitelisted buckets, to avoid abuse, perhaps?
This is our first time trying this also, so likely some user error, I guess. Hopefully something simple!
Beta Was this translation helpful? Give feedback.
All reactions