Steven Bao and Bo Zhao.
Here is the GitHub page of PotreeConverter, which contains the full usage for PotreeConverter.
https://github.com/OpenDroneMap/ODMdata
-
Open the .html file in the root directory of the potree folder with a text editor.
-
Scroll down to the bottom and locate the code:
viewer.fitToScreen();
-
Replace the code with
viewer.scene.view.position.set(x, y, z); viewer.scene.view.lookAt(x, y, z);
The first line changes the view angle.
The second line changes the center of the viewer.
Tips for finding the appropriate coordinates:
-
Open your potree page with a web browser
-
Play with your point cloud and find your favorite view
-
Scroll down to the bottom part of the control bar (on the left)
-
Under "Scene" - "Objects" - "Other", you can find "Camera"
-
Click on "Camera", then "Properties" will show up.
-
The coordinate under "position" is the one for
viewer.scene.view.position.set(x, y, z)
The coordinate under "target" is for
viewer.scene.view.lookAt(x, y, z)
If your point cloud data contain map projection information, you can also add it to your Potree page!
PotreeConverter has an option for us to keep the projection of our data so that the location could be shown in the generated Potree page
-
An example of the basic codes that convert data.las and generate a Potree page is:
./PotreeConverter.exe C:/data.las -o C:/potree_converted -p pageName
-
In order to add the projection information to the conversion process, we can use the option
--projection
. However, if we want to use this option, we have to provide projection in proj4 format. -
We can use this website to find the projection in proj4 format. For example, if the projection of our point cloud data is WGS 84, we can find the proj4 format for WGS 84.
So we know that the the proj4 format for WGS84 is
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
-
Therefore, we add the
--projection
option at the end of the original codes.Original:
./PotreeConverter.exe C:/data.las -o C:/potree_converted -p pageName
New:
./PotreeConverter.exe C:/data.las -o C:/potree_converted -p pageName --projection "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
-
After you run the new codes, you will find that the projection has been added and you can see the location in the generated Potree page!
The data used for our example is from senseFly.