Skip to main content

I3S Server

From-v4.0npm version

I3S Server is a NodeJS HTTP service built on top of Express. It can serve I3S data from output path of tile-converter or from SLPK file container.

Installation

The i3s-server is published as a part of @loaders.gl/tile-converter library.

Create a new folder:

mkdir tmp
cd tmp

Install @loaders.gl/tile-converter package:

npm i @loaders.gl/tile-converter

Serve the output data of tile-converter

Convert 3DTiles tileset to I3S:

npx tile-converter --install-dependencies
npx tile-converter --input-type 3DTILES --tileset /path/to/tileset.json --name NewTileset

Start HTTP server

PORT=8080 HTTPS_PORT=4443 I3sLayerPath="./data/NewTileset.slpk" DEBUG=i3s-server:* npx i3s-server

The layer should be available on URLs

  • http://localhost:8080/NewTileset/SceneServer/layers/0
  • https://localhost:4443/NewTileset/SceneServer/layers/0

Open in ArcGIS

https://www.arcgis.com/home/webscene/viewer.html?url=http://localhost:8080/NewTileset/SceneServer

Open in I3S Explorer

https://i3s.loaders.gl/viewer?tileset=http://localhost:8080/NewTileset/SceneServer/layers/0

ENV variables

  • I3sLayerPath - path to resulting SLPK file.
  • PORT - HTTP port. Eg for PORT = 8080 npx i3s-server the server will work on host http://localhost:8080/.... Default value is 80;
  • HTTPS_PORT - HTTPS port. Eg for PORT = 4443 npx i3s-server the server will work on host https://localhost:4443/.... Default value is 443