VCityTeam / UD-Viz

UD-Viz is a javascript mono repository for creating web applications for visualizing and interacting with geospatial 3D urban data.
Other
34 stars 19 forks source link

Provide means to automatically adapt the (territory) extent to a loaded set of 3DTiles tilesets #397

Open EricBoix opened 2 years ago

EricBoix commented 2 years ago

Related issue: #146

The need

When realizing 3DTiles based demos, the territory extent (the portion of the territory whose map is displayed) is usually specified manually (e.g. this py3dTilers demo). Such an extent depends on the considered set of 3DTiles tilesets and is usually manually extracted (through a lengthy trial and error process). Because (3DTiles) tilesets encode their own extent, the demo extent could be automatically extracted and computed out of the considered tileset set.

valentinMachado commented 1 year ago

Today that's not really possible because a 3DTilesLayer needs a view as param constructor and a view needs an extent as param constructor. So in order to create a 3DTiles layer we have to fix before the extent, the problem belongs to itowns.

EricBoix commented 1 year ago

@valentinMachado Couldn't we automatically extract the bounding of the considered Tileset, consider it's 2d extension to make it an extent PRIOR to constructing the view and only then the 3DTilesLayer ?

valentinMachado commented 1 year ago

Yes we could but that's not very elegant to request the tileset.json since C3DTilesLayer is going to do it. The problem here is that a C3DTilesLayer should be able to be instanciated without a View. It's also quite weird to write something like:

const layer = new Layer(..., view);
view.add(layer)

see

Iam not sure why this has been implemented this way but I've discussed of it with @jailln and it should be refacto in itowns at some point.