adding 45k objects, which are scattered around the world?

Hi,

I'm working on displaying worldwide aviation related data using Cesium,
and one step of this is to show where airports are. There is an open
collection of airport data available at ourairports.com, see their
google map visualization here:
http://www.ourairports.com/big-map.html#lat=51.17934297928927,lon=26.279296875,zoom=4,type=Hibrid

this is aboug 45.000 airports.

I'm trying to show these in cesium, with adding a 'ring' for each
airport (via a PolygonHierarchy). now this works reasonable fast up
until about 20.000 airports, after which the process slows down
considerably.

now, what would be the intended way of doing this?

should I take the zoom level / displayed area into consideration, in a
level-of-detail (LOD) style approach, and add / remove airports
accordingly? say, for large displayed areas show only large airports and
pre-filter airports for the displayed area? can this be done fast enough
when someone is moving the camera around? should I remove 'out of view'
primitives manually myself?

or is there an other intended approach to solve this issue?

Akos

Akos,

If you want to show an icon instead of a ring like the Google Maps example, the BillboardCollection should handle 45,000 on most hardware.

If you want to draw rings, be careful to set the granularity option so each ring doesn’t have two many vertices. I would expect 45,000 rings of perhaps 20 vertices each to render well on most hardware. As the viewer approaches an airport, you could set it’s show to false, and swap in a high-resolution (lower granularity one). You could also combine this with the BillboardCollection.

If these still don’t work for you, then, yes, a more involved LOD approach would work well. However, we don’t have anything built-in Cesium yet.

Regards,

Patrick

thanks for the tips.
for a more advanced LOD-based approach, I’d need to be able to
determine the visible area in terms of ground coordinates. but I
failed to identify API calls that would enable me to do this. this
also doesn’t seem to be that simple - but still, is it possible to
have at least a vague understanding on what geographical area is
visible at any given moment?
best regards,
Akos

Akos,

I believe there is a camera function that will give the approximate visible extent. Perhaps you could use this plus the viewer’s height to do some cheap LOD, but we usually take a much different approach. We work in cartesian space using the view frustum and horizon distance to determine what’s visible and project bounding spheres to screen-space to get a sense of how many pixels they cover to select LOD. The terrain code should provide a reasonable start.

Patrick