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

Instructions needed regarding how to use TGS #39

Closed
fnicollet opened this issue Feb 7, 2018 · 4 comments
Closed

Instructions needed regarding how to use TGS #39

fnicollet opened this issue Feb 7, 2018 · 4 comments

Comments

@fnicollet
Copy link

Hello,

We are looking into solutions to be able to use a custom TIFF file as elevation data in Cesium. It seems like you need a server to serve quatified meshes, which seem to be what this Github project is about.
I installed TGS and registered (fnicollet gmail com) but I don't really understand how it really works.

In the "Remote Databases" section, I clicked "Request" on "Gtopo30.terraindb". It didn't really do anything, the Request button is just greyed out (no download progress?).

In the "Local Databases" section, it seems like you can only add files with the "terraindb" extension. What are terraindb files exactly? How do you create them? I mean from "regular" GIS formats.

If I access the URL:

http://127.0.0.1:8080/

I get:

"Not Found /"

So I don't really know what URL I should put in my JS to be able to load a terrain from TGS. I think it should be something like

https://www.terrainserver.com/serveTerrain/world/layer.json

I tried a few combinations but nothing worked. What's the URL scheme here?

Also, I installed the online example (https://www.terrainserver.com) locally on my web server but I get errors because you don't have CORS headers:

Invalid asm.js: Invalid member of stdlib
localhost/:1 Failed to load https://www.terrainserver.com/serveTerrain/world/layer.json: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
Cesium.js:523 An error occurred in "E": An error occurred while accessing https://www.terrainserver.com/serveTerrain/world/layer.json.

it would be nice to have this headers for testing.

It looks like your project is still in his early days, so it is probably all some documentation issues

Thanks for your help!
Fabien

@fnicollet
Copy link
Author

Also the CORS headers issue prevent the online example from working (the one in the readme):
https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=662d86203a93fab5f8385c0360d4d70b

@MuhammedKalkan
Copy link
Owner

MuhammedKalkan commented Feb 7, 2018

Thank you for the extensive explanation

I want to explain these two projects . TGS is a Quantized Mesh generator from TIFF, HGT,..etc other common formats into terraindb files (Cesium Terrain Database format). Also it is capable of serving but important part is generating which is unavailable yet. (Remote databases in TTS are pregenerated terrains by TGS or STK)

TTS on the other hand, that you have installed, is another project that aims for most users to be able to use their existent terraindb data files with minimal effort. Created by TGS or Cesium STK Terrainserver

In the "Remote Databases" section, I clicked "Request" on "Gtopo30.terraindb". It didn't really do anything, the Request button is just greyed out (no download progress?).

You will be supplied with a download link to your email. You can get your terraindb file there and add it locally for serving. Check your spam folder

While you add it, you will define a serve path. Which will be something like

http://127.0.0.1/db/yourdbservepath

Afterwards you can start viewing by adding this to your cesium application

var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
     url: 'http://127.0.0.1/db/yourdbservepath',
     requestWaterMask: true,
     requestVertexNormals : true
});

As for the CORS headers, it seems one of my updates removed that, i have added it again so you can try it whereever you want.

@fnicollet
Copy link
Author

Thanks, the CORS headers would be a nice addition as right now, you need to setup a reverse proxy for port 8080, which is quite annoying.
I don't understand your explanation about TGS. The TTS is the Tile Server, which is the software you install.

But then where is the "Terrain Generator Server" which create the terraindb files from TIFF files?
There is nothing in the README about it. Is it a tool provided by Cesium? Is it one of your own tool?

There seem to be no "TGS" code in this repo, and nothing on your website, this is very opaque.

Thanks,
Fabien

@MuhammedKalkan
Copy link
Owner

TGS is this tool and produces and serves terraindb files. Confusing part for you is source is not released and in development phase at the moment.

TTS is another tool which only serves these files.

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

2 participants