I'm fairly new to web development and started with Cesium API for my internship. In my application I'm serving various images from my organization. It also involves serving large vector datasets like contours which already prepared and stored in the backend with geoserver serving the images. So I made a program that would clip prepared vectors in tiles (using ogr2ogr), then I make a meta table for the vector file with position information of each tile and its information as published in geoserver. In the application side, I compute the bounding box of the screen(using computeViewRectangle), query the database to fetch the names of the tiles to fetch from geoserver and then store the datasources created.
I did this because Cesium also is slow when clamping the data to ground for large files.
I wanted to know how many datasources Cesium can handle at a time. Also once a tile has been rendered (clamped to ground and everything), does it take processing power to keep rendered images in the globe, that is should I delete the datasources that are not on the screen currently that have been rendered or is it better to leave them be?
The question of how many datasources ultimately depends on a lot of things, including the client device, what those datasources are doing, whether they’re static or dynamic, and what you consider an acceptable framerate in your application (is anything below 60 fps slow? Is 30 fps the target? etc.)
I would encourage you to run some benchmarks of the data you’re displaying on the kind of hardware you’re using to get a more concrete answer. There are some technical blogs about the Entity API’s performance that might be useful here, like this one: https://cesium.com/blog/2018/06/21/entity-api-performance/
I think for some entities clamping to ground is a one time cost, whereas for others like polylines, it’s a shader-based clamping so it would be a runtime cost I think. One other thing you might be interested in looking at is the 3D Tiles vector format, which is currently experimental but is the long term solution to displaying large amounts of vector data in Cesium: https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Tiles%20Terrain%20Classification.html
This sounds like a cool setup, what kind of project is this for?
The question of how many datasources ultimately depends on a lot of things, including the client device, what those datasources are doing, whether they're static or dynamic, and what you consider an acceptable framerate in your application (is anything below 60 fps slow? Is 30 fps the target? etc.)
I am actually really new to this field and the development and was therefore aiming for the highest speed I could get as I dont really have any experience with GIS work.
I think for some entities clamping to ground is a one time cost, whereas for others like polylines, it's a shader-based clamping so it would be a runtime cost I think.
I'm assuming for the case of contours it wont be one time since it seems to be polylines data and the tiles that are not in the current view of the camera would take processing power right?
Actually right now I have to submit it by 10th this month and we didnt really want to add another format for representing data. Since the application had both frontend and backend design I had full liberty on preparing my data and therefore did it this way to avoid using ol integration for mapbox or 3D tiles.
This sounds like a cool setup, what kind of project is this for?
It is basically just rendering images and overlaying corresponding shapefiles on Cesium to help visualize in 3D and in GIS work.
The organization was very free with memory requirements and therefore they wanted all the data to be prepared in the backend before the application is used. They do some geoprocessing using QGIS and wanted to just make a setup to visualize their data in 3D. I did add some dynamic rendering but since QGIS takes a lot of time to process the data it is restricted to operations which do not take any time. This was all straight forward in Cesium side before but since the vector data was massive (like a contour layer with interval 10) I just tiled the vector file. Right now I just want to figure out if there is any need to delete the tiles out of the camera view and would it make rendering smoother as the project is more about terrain analysis.