Load xyz format file inside cesium viewer

I have a survey data in the form of a text file with 200 lines which have xyz format location coordinates like for example.
278.493790, -87.397445, 450.756
274.493434, -87.39743, 450.756
274.4340, -87.397445, 450.756
272.493790, -87.397445, 450.756
and i want to load that file inside the cesium viewer . can anyone suggest me how to do it?

Cesium ion doesn’t currently support uploading point clouds as text files. What software did you use to export this? And what coordinate system are these values in?

If you can convert it to a LAS file you can upload it to Cesium ion (https://cesium.com/ion) and visualize it that way.

thanks omar for your interest . actually i have a file with raw point cloud data ,as i listed above. i have investigated and even i thought that if i could covert this values in a format which cesium can directly load into the viewer.
the raw data looks something like this-
32.843399085, -90.130223936, 428.683, 2PER
32.843399354, -90.130153817, 428.608, 2PER
32.843401851, -90.130071635, 428.404, 2PER
32.843403591, -90.12997864, 428.166, 2PER
32.843403145, -90.12987477, 427.866, 2PER
32.843401893, -90.12976252, 427.482, 2PER
32.843400441, -90.129646768, 427.062, 2PER
32.843399263, -90.129532099, 426.622, 2PER
32.843398745, -90.129420138, 426.313, 2PER and so on.

you mean to say that is i convert this data into .lad format i would be able to load it to the cesium directly?

thanks omar for your interest . actually i have a file with raw point cloud data ,as i listed above. i have investigated and even i thought that if i could covert this values in a format which cesium can directly load into the viewer.
the raw data looks something like this-
32.843399085, -90.130223936, 428.683, 2PER
32.843399354, -90.130153817, 428.608, 2PER
32.843401851, -90.130071635, 428.404, 2PER
32.843403591, -90.12997864, 428.166, 2PER
32.843403145, -90.12987477, 427.866, 2PER
32.843401893, -90.12976252, 427.482, 2PER
32.843400441, -90.129646768, 427.062, 2PER
32.843399263, -90.129532099, 426.622, 2PER
32.843398745, -90.129420138, 426.313, 2PER and so on.

you mean to say that is i convert this data into .lad format i would be able to load it to the cesium directly?

If you can convert this to LAS, you can upload it to Cesium ion (https://cesium.com/ion) to create 3D Tiles. This is how this Montreal point cloud was visualized: https://sandcastle.cesium.com/index.html?src=Montreal%20Point%20Cloud.html

thank you so much omar . i was able to convert xyz data into LAS using LAStools toolset.
which is the fastest and most memory efficient solution.
LAStools that can turn files containing billions of lidar points into useful file formats like LAS.
It also comes with a bunch of Arc style Toolbox tools. It has an inbuilt tool *txt2las which takes a .txt file and converts it into binary LAS . and after i used cesium ion to convert it into 3d tileset. i was able to visualize the pointcloud data in cesium that way.

1 Like

Awesome, that’s great to hear! And I appreciate you sharing your solution for others in the community to benefit from here.

1 Like

I was actually having trouble with this omar. My best idea off the top of my head is to generate a texture with elevation colors or contour lines using gdal_contour — GDAL documentation. But maybe if you or the community have a better solution for it because i want to change the contour lines at runtime as suggested in sandcastle example???.