potree / PotreeConverter

Create multi res point cloud to use with potree
http://potree.org
BSD 2-Clause "Simplified" License
679 stars 423 forks source link

Vertical Point Stack Issue in Potree Converter but not in QTReader #217

Closed EArgen closed 4 years ago

EArgen commented 8 years ago

So I have a .las file just under 200 MB. This is what happens when I try converting it:

image

However, if I take the same file and put it into QTReader, I get something actually meaningful: image

Has anyone had this issue before, or know why Potree Converter isn't able to properly understand where the points should be going? Thank you for your help.

potree commented 8 years ago

The coordinates are likely stored in latitude and longitude. PotreeConverter only supports euclideon coordinates.

EArgen commented 8 years ago

Is there any way to convert them into euclideon coordinates? Another program?

umbe1987 commented 8 years ago

I think you could give Proj4 a try (http://proj4.org/). I never used it but it reads it allows you to do just what you want to do. Of course you should know anything about reference systems and projections. Otherwise, you could project your data using a Geographic Information System (GIS).

EArgen commented 8 years ago

Well the goal is to put it online. I am not the most well versed in this sort of thing. What do you mean by 'project' my data using GIS?

Also I installed it just fine, but I'm not sure what settings I would use to convert it. I'm fairly certain I need it to stay as a .las file for PotreeConverter to work, but I'm not sure what option would convert between lat/long and euclideon coordinates.

umbe1987 commented 8 years ago

Well, this could be quite simple or super tuff depending on your knowledge of spatial data and reference systems. One example of conversion from lat/long coordinates to euclidean (not euclideon) ones is inside the potree repository itself (https://github.com/potree/potree/blob/master/examples/openLayers3.html). You can set a spatial reference for .las which are fine to be used in potree (but you can use other formats as well). With "project" I mean exactly converting from one spatial system to another (e.g. from a geographic coordinate (lat/long) system as WGS84 to a projected one (e.g. in metric units) such as UTM. This means going from a 3d (geodetic) system to a 2d (planimetric or EUCLIDEAN) system. To do this you could use a software (like a GIS) which could read your point cloud (in .las format or others), read its spatial system and converting to the new planimetric one. Finally, in the example I provided, they're using Proj4 to do this without using a GIS, but as I said I cannot tell you exactly how it works.

EArgen commented 8 years ago

It does seem that there is a way to use Potree to convert, after looking over the information in the openLayers3 file. The only thing is, I'm not sure how to call it. This is the command that I use normally:

PotreeConverter.exe C:/Aqueduct.las -o C:/xampp/htdocs/potree --generate-page pageName2 --overwrite

Do you know what command I need to add to work with openLayers3? I've tried messing with the projection, the type of input, the type of output, but nothing changes. What I find odd about the projection parameter is that I can seemingly put anything in there and it doesn't throw an error.

m-schuetz commented 8 years ago

Unfortunately, you can't convert a point cloud with lat/longcoordinates using PotreeConverter at all. You'll first have to convert your las with lat/long coordinates to a las with euclidean coordinates (ECEF or better, some kind of map projected coordinate system. ECEF will result in tilted point clouds). I'm not sure how to do that, though. Maybe with lastools las2las.exe? You could also try CloudCompare but I think it will also show the point cloud as a vertical line. The reason this happens is because x and y are stored as lat/long, which are very very small numbers, but height is stored in meters which is a lot larger. Since the height in meters is so much larger than lat/long, you'll get to see a vertical line.

EArgen commented 8 years ago

Well, I tried every conversion combination I could think of with las2las. All it really did was move the line away from the center, but nothing substantial other than that. It's highly likely I'm using the program incorrectly, though it does not appear to be the most user friendly (certain selections go off screen and you can't scroll to it for some reason?). Thank you for your help so far, I definitely understand this more than I did before. Unfortunately I'm not sure if I can figure this out.

List of things I've tried: transformation (translate, scale), projection(several combinations to and from lat/long). Maybe it's just me, but it's not terribly clear if the projection on the left is what the program is expecting, and that the projection on the right is what you're trying to change it into, or something else.

potree commented 8 years ago

Did you generate your point cloud with photoscan? As far as I remember you can choose whether to export it in lat/long or euclidean coordinates .