njam / citygml-to-3dtiles

Convert from CityGML to Cesium 3D Tiles.
Apache License 2.0
160 stars 41 forks source link

can't display the converted tileset #23

Closed yaryaraldebaran closed 2 years ago

yaryaraldebaran commented 2 years ago

i've tried the conversion process and when i call the output on cesium html it doesn't show any buildings.

let converter = new Converter({
        srsProjections: {'EPSG:28992':'+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs',}});
converter.convertFiles('Random3Dcity_2015-03-11/CityGML/LOD2_3_F0.gml', './output3/');

and this is the page look Screenshot_20211124_160346 and here's the html

<!DOCTYPE html>
<html lang="en">
<head>
  <script src="https://cesium.com/downloads/cesiumjs/releases/1.85/Build/Cesium/Cesium.js"></script>
  <link href="https://cesium.com/downloads/cesiumjs/releases/1.85/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
  <link href="style.css" rel="stylesheet">
</head>
<body>
  <div id="measureContainer"></div>
  <div id="cesiumContainer"></div>
  <script>
  Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkNDIwOGFhZC05NGM1LTRmOGItOTVjMS1kZmZlNDFiNjc1MzciLCJpZCI6MzEwMzgsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1OTQ3NDAzMjZ9.2VC0njaqUn3Oy4BNOKW06q3qBEWYZlmicucRG5iVgAQ";
  // Grant CesiumJS access to your ion assets
var viewer = new Cesium.Viewer("cesiumContainer");

var tileset = viewer.scene.primitives.add(
  new Cesium.Cesium3DTileset({
    url: 'output3/tileset.json',
  })
);
viewer.zoomTo(tileset);

  </script>
</body>
</html>
njam commented 2 years ago

Difficult to say without having the data.

Maybe the buildings are too low (below ground), or too high (high in the sky)? Or maybe there's an error in CesiumJS that stops rendering completely.

If you share the data I can take a look.

yaryaraldebaran commented 2 years ago

Difficult to say without having the data.

Maybe the buildings are too low (below ground), or too high (high in the sky)? Or maybe there's an error in CesiumJS that stops rendering completely.

If you share the data I can take a look.

how do i share the data to you? can you give me your email address so that i can share my data?

njam commented 2 years ago

@yaryaraldebaran you can send it to me via email: (removed)