Page 1 of 1

Exporting results with real coordinates / importing

Posted: Fri Mar 13, 2015 1:48 pm
by Monica
Hi,

I am very new to CloudCompare so i am sure i didn't discovered all the potential of this software. The very first feature that atracted me to it was the M3C2 plugin. My data is in UTM coordinates to i have to use some constants at least for x and y coordinates to be able to import the data. I have saved those. I did my M3C2 distance and i exported the data as a txt file. When exporting this results i didn't see any way how to add those constants back to the x and y coordinates so i have the 'real" coordinates in the file, and not the local ones. Is there anyway i can do that? I would really appreciate any pointers.

On a different subject, if i import the newly created txt file (the M3C2 distance) all the fields came back as Scalar# 1 to whatever number. Is there any way to add or make the software to read the real column names (the real header)? If not there is any way i can make the color bar name to display something else than Scalar#? I realize that i can simply export the image and edit it to have the labels i want, but ..... i was wondering.

Thanks for any help, Monica

Re: Exporting results with real coordinates / importing

Posted: Fri Mar 13, 2015 6:52 pm
by daniel
Hi,

First, you shouldn't shift the coordinates yourself. If you keep the original file and import it into CC, CloudCompare will suggest you to shift them (you'll be able to change the default shift vector if the one suggested by CC doesn't suit you). This way CC will store internally the applied shift and will restore it when you export the file (this mechanism is called 'Global shift and scale' - see http://www.cloudcompare.org/doc/wiki/in ... _and_Scale).

You can also set the 'Shift' yourself anytime (on your local data) with the 'Edit > Edit global shift & scale' method.

For the second question:
  • you can import the scalar field(s) name(s) from the header line (if it has the right format and you check the corresponding chebox in the ASCII import dialog.
  • you can rename the active scalar field with the 'Edit > Scalar fields > Rename' option.

Re: Exporting results with real coordinates / importing

Posted: Fri Mar 13, 2015 7:05 pm
by Monica
Hi,

Thanks so much for your answers. I did the first shift when i imported the "original" data in CC with the CC, but i didn't know how to add that shift back to my exported results. I will look at the wiki page and try again.

Thanks,
Monica

Re: Exporting results with real coordinates / importing

Posted: Fri Sep 04, 2015 9:11 pm
by LunaAzlyn
Hi,

I'm having a similar issue as Monica. Below were my steps & questions.

When I imported my two .las datasets, as expected, CC shifted the original xyz coordinates (the xyz shift was same for both datasets).

After I registered the 2 clouds, I used the M3C2 plugin to get a difference map.

Then, I exported the M3C2 results by highlighting the M3C2 layer, then going to File | save | then saved as M3C2diff.txt.

However, this M3C2diff.txt shows x, y, and z coordinates that are the CC shifted values- not the original xyz coordinates. Because CC saves the shift internally, I expected that the exported the M3C2 results into a .txt file would keep the original XYZ coordinates. How can I export the M3C2 results and get a file that has the original, non-shifted xyz coordinates?

Ultimately, I'm trying to make a DEM of the M3C2 difference results so that I can bring the DEM into ArcGIS to show the topographic changes with other landmarks of interest (streets, etc). I have not figured out how to map M3C2 results onto a ArcGIS map. Any advice is much appreciated.

Thanks!
Lindsay

Re: Exporting results with real coordinates / importing

Posted: Sat Sep 05, 2015 8:35 am
by daniel
The fact that the global coordinates are lost is clearly an error. I fixed this in the latest beta version (you can download it from the website).

Otherwise I'm not an expert (at all) in GIS, but maybe you could convert your (M3C2) cloud to a raster? (see http://www.cloudcompare.org/doc/wiki/in ... =Rasterize).

Re: Exporting results with real coordinates / importing

Posted: Mon Sep 07, 2015 2:03 pm
by Monica
Hi Lindsay,

If you still have problems with exporting the point cloud with real coordinates after the shift, before you export you can do this:
1. select the point cloud you want to export
2. click Edit from menu, select Edit global shift and scale click on the scroll of "Original" on top of the x, y and z little windows and you should have an option like "last use" or whatever that will have saved the shift params you used when importing the original las files. This will add the shift back to your local coordinates and after
3. proceed with exporting the data - now it should be in the original coordinates.

Second question about ArcGIS. Either you do as Daniel suggested and transform the file into a raster and go from there, or you export your result from CloudCompare in las format and use the las tools ArcGIS has to visualize the point cloud (this depends on what version of ArcGIS you have but i think 10.1 and up has capabilities to import las files). Then it will be trickier to import a road shapefile for example because your point cloud is in 3d and usually a road file is in 2D unless you represent the point cloud in xy plan only. Of course you can have a 3d road shapefile as well and in this case it may be easier. Also i am sure you can transform the las file into a grid using either ArcGIS (i suppose it can do it - i don't necessarily like the las tools in ArcGIS), or use CloudCompare to do the raster or use LasTools (also kind of free and open source), one of these is bound to work.

Hope this helps,

Monica

Re: Exporting results with real coordinates / importing

Posted: Fri Sep 11, 2015 3:04 pm
by LunaAzlyn
Thank you Monica and Daniel. I was able to shift the coordinates exported for the M3C2 per Monica's advice (haven't downloaded the newest CC beta version yet). Then, I did the raster task for the M3C2 difference per Daniel's recommendation. I was able to bring in the geoTIFF into GIS. Should anyone else be interested in the GIS portion, I then defined the projection for the raster and ran "calculate statistics" on the raster so that I could display the raster by classified values.

Thank you both for the help and quick responses!
Best,
Lindsay

Re: Exporting results with real coordinates / importing

Posted: Thu Sep 17, 2015 5:24 pm
by LunaAzlyn
To follow up with anyone interested in making a raster of the m3c2 distance results, I forgot to include in my last post the following:

After I confirmed that the coordinates were correct for exporting (or corrected as I am using an older version- see Monica's post here), I had to assign the m3c2 distance values to the elevation (z) coordinates so that the subsequent raster .tif would represent the m3c2 distance, not of the original elevation. To reassign the z coordinates to the m3c2 results, I made the active scalar field the m3c2 distance, and then selected Edit | Scalar field | set SF to coordinates| selected Z and gave some obvious number for my project to assign empty cells. After this step, I was able to use the raster tool per Daniel's link provided previously in this discussion string.

Best,
Lindsay