Page 1 of 1

Shapefile import : trick

Posted: Tue Apr 01, 2014 2:49 pm
by Remi-C
Hey,
I saw that the importing of shapefile .shp is in feature request.

So here is a trick to emulate it :
in QGis, or using OGR : export the shapefile as dxf (autocad).

Then simply import into cloud compare !

Cheers,
RĂ©mi-C

Re: Shapefile import : trick

Posted: Sun May 28, 2017 6:50 pm
by bat21
Hi Remi-C,
would you please give a short guide how to import DXF to CC? I searched through the guides and software options and found that I am only able to create a shape in CC and cannot import anything "external" into DB.
Regards,
Marcin

Re: Shapefile import : trick

Posted: Thu Jun 01, 2017 6:44 pm
by daniel
Well, to import DXF to CC you just have to load the file (with 'File > Open' or drop the file on the 3D view). But it may not work on all versions (at least I'm sure it works on the Windows version ;).

Re: Shapefile import : trick

Posted: Wed Oct 12, 2022 10:44 am
by GabrielMulero
Hi Daniel, I followed the suggestion you gave to import a shape file to cloudcompare.
I exported my shape file polygon as Dxf AutoCAD and then I tried to import it to cloud compare after that but I keep getting an error message: (An error occurred while loading "myFile": nothing to load).

How can I get through this? Thanks and hoping to get a response.

Re: Shapefile import : trick

Posted: Wed Oct 12, 2022 8:32 pm
by daniel
This may happen if your polyline is not 'straight' (I mean composed of straight segments). CloudCompare doesn't handle curved polylines ...

Re: Shapefile import : trick

Posted: Thu Jun 01, 2023 1:25 pm
by GabrielMulero
Hi @daniel, it took me a while to get back to this. Thanks for your response.

I have just read your response and I want to clarify that I understand what you mean. So if I have say a square-shaped polygon it won't work?

If that is the case what would you advise if I want to use the same polygon cut for my .las dataset taken from different dates? The aim is to maintain consistency of shape and area.

Re: Shapefile import : trick

Posted: Thu Jun 01, 2023 1:42 pm
by GabrielMulero
Hi Daniel, I just realized that the shapefile I import actually shows on the cloud compare but it is not in the same location as my .las file. Even though they are generated from the same location. When I use the 1:1 button it shows they are not sitting one on the other. I tried to change the CRS of the shapefile but same issue.

What could be the problem?

Re: Shapefile import : trick

Posted: Sat Jun 03, 2023 2:03 pm
by daniel
Sadly CC doesn't take the CRS information into account (not for clouds nor for polylines or other entities). CC just reads the point coordinates 'as is'.

Re: Shapefile import : trick

Posted: Mon Jun 12, 2023 4:04 pm
by GabrielMulero
So what's possible? I don't want to have to create new clip every time I am working on same location. I just want it to be similar area every time for such a time series point cloud data.
How would you do this if you had this problem?

Thank you.

Re: Shapefile import : trick

Posted: Thu Jun 15, 2023 12:34 pm
by daniel
Hum, it's hard to say without the data, but can't you force the global shift to be the same for all your LAS files (and your SHP files, but maybe a different one)? There's a bookmark mechanism if you want CC to use default Global Shift values (see https://www.cloudcompare.org/doc/wiki/i ... #Bookmarks)