Hello everyone, I’ve been troubled by this problem recently, I need to load 3dtiles according to polygons, but there is no longitude and latitude information in 3dtiles, I can’t filter, please help me!
It may be necessary to add a few more technical details here. On the one hand, you are right: When you access a 3D Tiles tileset that is stored on a server, then you don’t know where this tileset is located before requesting it. But as soon as you have loaded the
tileset.json, you can obtain the bounding volume of the root node, and this should contain the required information. Then, the question is what it means for a tileset to be “inside” a polygon. A polygon may be a pretty arbitrary shape in space. Does this refer to a certain area on the surface? (Further, more detailed questons are whether you only want to load the data that is contained in the polygon, or whether the polygon should be used for some sort of clipping)
Thank you for your reply.
The effect I want to achieve is this: enter the map to display the building 3dtiles of a certain city, and then select a polygonal area, the building 3dtiles in the selected area will be displayed, and the buildings outside the area will not be displayed or covered by a mask.
ClippingPlaneCollection is the right keyword here.
There are some degrees of freedom for the implementation. But the basic approach would be:
- Define the polygon
- Create one clipping plane for each side of the polygon
- Combine them into a clipping plane collection (important:
- Assign that clipping plane collection to the tileset
Here is an example that shows the basic approach, with an example tileset:
But again: Note that this only visually clips away the parts outside the polygon region. It may not always affect the loading performance. (It might, but I’m not 100% sure about that…)
Thank you, it’s useful for me.
Hello I would like to ask you a question: can I load 3DTiles of a specified level? Let’s say I want to load the whole city level 3Dtiles building vector data, is it all at once, not by mouse dragging like geojson, I use geojson to render the building will cause memory overflow :<
@huguohui Sorry, I didn’t fully understand the goal here (and I don’t know some details about vector data and GeoJSON).
It may be better to ask this question in a new thread. Then, more people might see the question, and maybe someone will be able to provide a helpful answer. The thread should have a title that contains the most important keywords and summarizes the goal, and it should contain a more detailed description of 1. which kind of data you have and 2. which behavior you want to achieve.
(I might also have another look at that question, but am not sure whether I could provide help for this specific task…)
I understand, thank you for answering this question out of your busy schedule. have a good day!