Shapefile import : trick

To post any request/idea for new functionalities
Post Reply
Remi-C
Posts: 21
Joined: Sun Mar 23, 2014 4:18 pm

Shapefile import : trick

Post 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
bat21
Posts: 3
Joined: Fri Apr 28, 2017 9:13 pm
Contact:

Re: Shapefile import : trick

Post 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
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Shapefile import : trick

Post 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 ;).
Daniel, CloudCompare admin
GabrielMulero
Posts: 17
Joined: Mon Apr 25, 2022 8:36 am
Location: Israel
Contact:

Re: Shapefile import : trick

Post 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.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Shapefile import : trick

Post by daniel »

This may happen if your polyline is not 'straight' (I mean composed of straight segments). CloudCompare doesn't handle curved polylines ...
Daniel, CloudCompare admin
GabrielMulero
Posts: 17
Joined: Mon Apr 25, 2022 8:36 am
Location: Israel
Contact:

Re: Shapefile import : trick

Post 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.
GabrielMulero
Posts: 17
Joined: Mon Apr 25, 2022 8:36 am
Location: Israel
Contact:

Re: Shapefile import : trick

Post 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?
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Shapefile import : trick

Post 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'.
Daniel, CloudCompare admin
GabrielMulero
Posts: 17
Joined: Mon Apr 25, 2022 8:36 am
Location: Israel
Contact:

Re: Shapefile import : trick

Post 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.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Shapefile import : trick

Post 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)
Daniel, CloudCompare admin
Post Reply