visgl / loaders.gl

Loaders for big data visualization. Website:
https://loaders.gl
Other
700 stars 191 forks source link

tile-converter - ReferenceError: fetch is not defined #1648

Closed radoslavirha closed 2 years ago

radoslavirha commented 3 years ago

Hi I'm trying to use tile-converter API (not CLI), but I'm getting some errors.

Screenshot 2021-07-11 at 11 05 40

egm is installed.

converter = new I3SConverter();
await converter.convert({
  inputUrl: url,
  outputPath: ...,
  tilesetName: ...,
  egmFilePath: absolute path to egm
});

without egmFilePath I'm getting:

Loading egm file...
Error: Cannot convert supplied data type

I also tried CLI, but it only works with absolute path to data, not with URL. I'm using own server. Is it supposed to be used only with ION?

npx tile-converter --input-type 3dtiles --tileset http://localhost:6430/data/cesium-3d-tile/MS9wcmFoYV80NmNkMDNiZi1mOTY4LTRjOTUtOWEyNi0zOWUxMjZiMTFlZmU/tileset.json --name test

Screenshot 2021-07-11 at 11 28 57

Thanks

ibgreen commented 3 years ago

Which version of loaders.gl are you using? We are publishing final beta releases of loaders.gl 3.0.0 and are trying to catch any regressions before we publish the official 3.0.0 version.

We do have special handling for ION as it requires a "ping pong" authentication. It is a hack but since ION is a main source for 3D tiles we did want to support it out of the box. It is possible this interferes with using a separate server. If we can narrow it down we will try to fix.

radoslavirha commented 3 years ago

Hi,

I installed

"@loaders.gl/core": "3.0.0-beta.10",
"@loaders.gl/tile-converter": "3.0.0-beta.10"

I will play with this in the coming days and let you know. I'm only confused from EAI_AGAIN api.cesium.com even when I provide localhost url (working in postman)

Preferred way for me is javascript API, but CLI is ok too

belom88 commented 2 years ago

Hi, @Radik24 it is still actual... Could you provide us some steps to setup local cesium server like you do? We could reproduce your issue and solve it.

radoslavirha commented 2 years ago

Hello @belom88 I'll try it again and let you know if it's still an issue. There was few releases since I created this issue.

radoslavirha commented 2 years ago

Hello @belom88 I'll try it again and let you know if it's still an issue. There was few releases since I created this issue.

belom88 commented 2 years ago

I checked this again. The tile converter doesn't work without egm file. Use npx tile-converter --help . The is said that default path is ./deps/egm2008-5.zip. Use npx tile-converter --install-dependencies. This file will be loaded to ./deps/egm2008-5.zip. As for JS API. I suppose the option is mandatory and you must pass some correct file location there.

radoslavirha commented 2 years ago

Hello @belom88, sorry for my delay.

Consider this closed, for some reasons I must stay with CLI commands and it seems to be working. But I always see some altitude shift. But it's related to https://github.com/visgl/loaders.gl/issues/1734