I hope you will excuse a newbie dumb question, but I am struggling to get meaningful exports from CloudCompare. I was able to import 4 Lidar point clouds, merge them together, crop to an area of interest, classify to ground and generate contours, very easy and straightforward. But what I need to do from there is (1) export the cropped point cloud as a new LAS file, (2) export a DEM (tif) and (3) export the contours as a SHP file or KML with elevation labels visible in Google Earth.
Is anyone able to help me understand how to achieve those three things? I am using v2.9.1 64-bit on Windows.
How to save outputs like contours and point clouds?
Re: How to save outputs like contours and point clouds?
- Exporting the cloud as a LAS file should be easy (select the cloud, 'File > Save', select the 'LAS' filter)
- To generate a DEM and export it to a geotiff file, there's only one solution: use the Rasterize tool and then click on the 'Raster' button in the 'export' section
- Last, to export the contours, generate them (in the Rasterize tool), then export them to the main data-base, and last select the group of contours (all contours should be under a unique group) and once again go to 'File > Save', and select the 'SHP' filter
- To generate a DEM and export it to a geotiff file, there's only one solution: use the Rasterize tool and then click on the 'Raster' button in the 'export' section
- Last, to export the contours, generate them (in the Rasterize tool), then export them to the main data-base, and last select the group of contours (all contours should be under a unique group) and once again go to 'File > Save', and select the 'SHP' filter
Daniel, CloudCompare admin
Re: How to save outputs like contours and point clouds?
I did as you suggest for the contours Daniel, but the SHP file set is missing the PRJ file so cannot be used. Do you have any idea what I'm missing that would cause this? The original point cloud is georeferenced but I think this gets removed when you open it in CC? How do you restore the georeferencing so it can produce a PRJ file?
Re: How to save outputs like contours and point clouds?
Hum, CC doesn't create the PRJ file indeed (I don't even know what that is :D). But if a cloud has large coordinates, they should be loaded (well, at least stored as a "Global Shift" information) and then restored on export.
Daniel, CloudCompare admin
Re: How to save outputs like contours and point clouds?
PRJ contains the projection data to allow the exported file to be overlaid on other projected data, e.g. in Google Earth or an ESRI platform. Without it, shape files are pretty useless.
Re: How to save outputs like contours and point clouds?
This is what the data should look like inside a PRJ file:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
Re: How to save outputs like contours and point clouds?
CC might not create a prj file, but it stores the correct coordinates, and you should be able to generate the prj file very easily in the GIS software you use - e.g. in ArcGIS you can use the Cataloge and simply set the projection etc.
Re: How to save outputs like contours and point clouds?
Hi, I also met a similar problem to yours. I had thought about creating a PRJ file for the CC generated .shp file. But later, I found it was not necessary.
If your goal is to maintain the relative position of the .shp file to point clouds, all you need to do is to make sure the global shift is set to correct values. Actually, CC would save the global coordinates of every point in a polygon when you save it as a .shp file. But when you reload it on another day, it may not automatically remind you to apply a global shift as what you see when you load a point cloud. That's the problem (or probably a small bug)! You need to manually apply a transformation to the .shp file using exactly the global shift when you load the point cloud. This can be done by going to Edit -> Apply Transformation -> Set the translation parameters. Then you will see the same relative position as you want you have seen before. You can always double-check the global shift by selecting the polygon and then going to the properties panel -> polyline -> global shift.
I also tried to generate a shapefile using QGIS v3.16.3, which did give me a .prj file along with the .shp file. One strange thing was that when I opened the QGIS-generated .shp file with CC, it reminded me to set the global shift, which would not happen if I open the CC-generated .shp file with CC. Anyway, the key point is the global shift!
I was using CloudCompare v2.11.3(Anoia) Stereo [64-bit].
If your goal is to maintain the relative position of the .shp file to point clouds, all you need to do is to make sure the global shift is set to correct values. Actually, CC would save the global coordinates of every point in a polygon when you save it as a .shp file. But when you reload it on another day, it may not automatically remind you to apply a global shift as what you see when you load a point cloud. That's the problem (or probably a small bug)! You need to manually apply a transformation to the .shp file using exactly the global shift when you load the point cloud. This can be done by going to Edit -> Apply Transformation -> Set the translation parameters. Then you will see the same relative position as you want you have seen before. You can always double-check the global shift by selecting the polygon and then going to the properties panel -> polyline -> global shift.
I also tried to generate a shapefile using QGIS v3.16.3, which did give me a .prj file along with the .shp file. One strange thing was that when I opened the QGIS-generated .shp file with CC, it reminded me to set the global shift, which would not happen if I open the CC-generated .shp file with CC. Anyway, the key point is the global shift!
I was using CloudCompare v2.11.3(Anoia) Stereo [64-bit].
Re: How to save outputs like contours and point clouds?
Hum, weird, normally, CC should handle / suggest a Global Shift as with any other file type.
Can you maybe share your SHP file with me? (admin [at] cloudcompare.org)
Can you maybe share your SHP file with me? (admin [at] cloudcompare.org)
Daniel, CloudCompare admin