visgl / loaders.gl

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

tile-converter: better error messages for splk and expired token #1412

Closed giserkej closed 2 years ago

giserkej commented 3 years ago

hi. I want to use your tile-converter tools to convert i3s service to 3D Tiles. Here is my CLI code: npx tile-converter --input-type I3S --tileset http://kejin.geoscene.cn/server/rest/services/Hosted/GRID1/SceneServer/layers/0 --output D:\Esri\3dtiles --name D:\Esri\3dtiles\3dtiles.json However, error occurs that unexpected token < in JSON at position 0. Here is my Screenshot: image Previously, I tried using "https" instead of "http" to invoke my I3S service, but it bugged with message: "Failed to fetch resources". Therefore, I changed my service type to HTTP. I checked my service, it is Ok. So could you please give me a good solutions? Thank you in advance.

dryabinin94 commented 3 years ago

Hey @baker5516 . Thanks for using our service. I3S -> 3DTiles conversion feature is experimental now and issues can occur. It will be helpful if you provide your tileset for debugging and fixing process.

giserkej commented 3 years ago

ok, my slpk layer? How can I get it to you?

dryabinin94 commented 3 years ago

ok, my slpk layer? How can I get it to you?

I3S->3DTilesconverter can't convert from slpk file. It can convert only if i3s tileset hosts on some service. You can share your service url.

giserkej commented 3 years ago

my service URL: https://tiles.arcgis.com/tiles/cNXlkTk36vCn8KGq/arcgis/rest/services/GRID1/SceneServer?token=q9eLILtOJ43dQy4pKc6rkCiZEkAF0jYDRGoGbQht67Fig76b0jRyzV3HZqPau2BiVfXrRE7s9znmqM9lbDL4ZvBUdHObhCrYH2TIC00GF7IhwTPy8y4MPCQlS8n1K8ZmN1h-QJO7iBQRJSQWGI9SRE5KpcVRHYnMPRzLMyI6unLPlPZueTaOfbVc9_W9_ngG3sfiRhfKL-y3GNqIKcX9KpAzh1yXiGk5iQuVaIATQ74TI0FFni_4Gb1U8JsXgqBPvThLCpD3Oto0qfXwMF7fWQ..

dryabinin94 commented 3 years ago

my service URL: https://tiles.arcgis.com/tiles/cNXlkTk36vCn8KGq/arcgis/rest/services/GRID1/SceneServer?token=q9eLILtOJ43dQy4pKc6rkCiZEkAF0jYDRGoGbQht67Fig76b0jRyzV3HZqPau2BiVfXrRE7s9znmqM9lbDL4ZvBUdHObhCrYH2TIC00GF7IhwTPy8y4MPCQlS8n1K8ZmN1h-QJO7iBQRJSQWGI9SRE5KpcVRHYnMPRzLMyI6unLPlPZueTaOfbVc9_W9_ngG3sfiRhfKL-y3GNqIKcX9KpAzh1yXiGk5iQuVaIATQ74TI0FFni_4Gb1U8JsXgqBPvThLCpD3Oto0qfXwMF7fWQ..

image

ibgreen commented 3 years ago

@dryabinin-actionengine

dryabinin94 commented 3 years ago

@dryabinin-actionengine

  • Would be great if we could find a way to show this error message from the tile-converter command.
  • Also if we could detect that the user is trying to convert an slpk and issue a message saying this is not yet supported.

@morphoix Please take this two tasks.

giserkej commented 3 years ago

try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer

dryabinin94 commented 3 years ago

@baker5516 @ibgreen I checked our tile-converter and find out that we don't have token support in options yet. We need to implement it before adding checks for invalid token.

dryabinin94 commented 3 years ago

try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer

Ok. Thank you. Will take a look.

dryabinin94 commented 3 years ago

try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer

I successfully converted this tileset to 3DTiles. Result in cesium Ion: image

Looks like it is only token issue now. And also we should implement load from slpk files in the future.

giserkej commented 3 years ago

Could you show me your CLI? Next, do I need token if I convert i3s to 3dtiles?

发自我的iPhone

在 2021年6月3日,17:22,Daniil Ryabinin @.***> 写道:

 try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer

I successfully converted this tileset to 3DTiles. Result in cesium Ion:

Looks like it is only token issue now. And also we should implement load from slpk files in the future.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dryabinin94 commented 3 years ago

Could you show me your CLI? Next, do I need token if I convert i3s to 3dtiles? 发自我的iPhone 在 2021年6月3日,17:22,Daniil Ryabinin @.***> 写道:  try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer I successfully converted this tileset to 3DTiles. Result in cesium Ion: Looks like it is only token issue now. And also we should implement load from slpk files in the future. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

image I use max-depth 3 just not to do conversion for all nodes. To convert full tileset just don't apply max-depth option.

I found your problem url should be http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer/layers/0

So try the following commands: npx -p @loaders.gl/tile-converter tile-converter --install-dependencies npx -p @loaders.gl/tile-converter tile-converter --input-type i3s --tileset http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer/layers/0 --name Hosted --output data

giserkej commented 3 years ago

Ok, thanks a lot.

发自我的iPhone

在 2021年6月3日,18:34,Daniil Ryabinin @.***> 写道:

 Could you show me your CLI? Next, do I need token if I convert i3s to 3dtiles? 发自我的iPhone … 在 2021年6月3日,17:22,Daniil Ryabinin @.***> 写道:  try this: http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer I successfully converted this tileset to 3DTiles. Result in cesium Ion: Looks like it is only token issue now. And also we should implement load from slpk files in the future. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

I use max-depth 3 just not to do conversion for all nodes. To convert full tileset just don't apply max-depth option.

I found your problem url should be http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer/layers/0

So try the following commands: npx -p @loaders.gl/tile-converter tile-converter --install-dependencies npx -p @loaders.gl/tile-converter tile-converter --input-type i3s --tileset http://www.arcgisonline.cn/server/rest/services/Hosted/GRID1/SceneServer/layers/0 --name Hosted --output data

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

giserkej commented 3 years ago

Hi, I noticed that updated command adds parameters "-p" and "@loaders.gl/tile-converter". What does these parameters means? Thank you in advance.

dryabinin94 commented 3 years ago

Hi, I noticed that updated command adds parameters "-p" and "@loaders.gl/tile-converter". What does these parameters means? Thank you in advance.

-p flag allows you to avoid tile-converter installation via npm i @loaders.gl/tile-converter. Actual @loaders.gl/tile-converter now updates as beta versions. To use last version of tile-converter you should use -p @loaders.gl/tile-converter@beta option. @loader.gl/tile converter versions available here.

giserkej commented 3 years ago

I converted one slpk file of 70MB to 3DTiles of 140MB, I thought it was quite large. Do you have plan to optimze that? By the way, you mentioned that you would implement load from slpk directly, when?

giserkej commented 3 years ago

Also, I thought my problem was that my first service URL is LAN, but when using WAN service URL, it would be OK. Can I assume that this module do not support LAN service URL?

ibgreen commented 3 years ago

@baker5516 Not sure if this helps, but I am not sure I can see why the URL matters. But obviously we expect an I3S server to follow a certain protocol. The tileset is served incrementally via various subpaths. Perhaps the arcgis server is responding differently that your server?

belom88 commented 2 years ago

@giserkej Can you provide you url format? There are possible some limitations in @loaders.gl/polifills

giserkej commented 2 years ago

Sure. My service URL is as follows: https://tiles.arcgis.com/tiles/cNXlkTk36vCn8KGq/arcgis/rest/services/GRID1/SceneServer

belom88 commented 2 years ago

npx -p @loaders.gl/tile-converter tile-converter --input-type i3s --tileset https://tiles.arcgis.com/tiles/cNXlkTk36vCn8KGq/arcgis/rest/services/GRID1/SceneServer/layers/0 --name grid1 Does work for me. I close this issue. If you have another issue, feel free to create a new ticket.

ibgreen commented 2 years ago
  • Would be great if we could find a way to show this error message from the tile-converter command.
  • Also if we could detect that the user is trying to convert an slpk and issue a message saying this is not yet supported.

Nit: While it is great that this is working... were the error messages ever improved per the discussion (& title of the issue)? Good error message are really valuable to new users and improve their experience of using the tool.

Also such error messages are usually very small development effort to add, relatively speaking..

belom88 commented 2 years ago

It is message in the loader. From the converter we don't see what is wrong, just null in the result of the load function.