update to las 1.4
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
AABB getAABB();
|
||||
|
||||
long numPoints();
|
||||
long long numPoints();
|
||||
|
||||
void close();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include "laszip_dll.h"
|
||||
#include "laszip_api.h"
|
||||
|
||||
#include "Point.h"
|
||||
#include "PointReader.h"
|
||||
@@ -83,13 +83,21 @@ public:
|
||||
laszip_seek_point(laszip_reader, 0);
|
||||
}
|
||||
|
||||
long long numPoints() {
|
||||
if (header->version_major >= 1 && header->version_minor >= 4) {
|
||||
return header->extended_number_of_point_records;
|
||||
} else {
|
||||
return header->number_of_point_records;
|
||||
}
|
||||
}
|
||||
|
||||
~LIBLASReader(){
|
||||
laszip_close_reader(laszip_reader);
|
||||
laszip_destroy(laszip_reader);
|
||||
}
|
||||
|
||||
bool readPoint(){
|
||||
if(pointsRead < header->number_of_point_records){
|
||||
if(pointsRead < numPoints()){
|
||||
laszip_read_point(laszip_reader);
|
||||
pointsRead++;
|
||||
|
||||
@@ -144,7 +152,7 @@ public:
|
||||
|
||||
AABB getAABB();
|
||||
|
||||
long numPoints();
|
||||
long long numPoints();
|
||||
|
||||
void close();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "laszip_dll.h"
|
||||
#include "laszip_api.h"
|
||||
|
||||
#include "AABB.h"
|
||||
#include "PointWriter.hpp"
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
return PTXPointReader::aabbs[path];
|
||||
}
|
||||
|
||||
inline long numPoints() {
|
||||
inline long long numPoints() {
|
||||
if (PTXPointReader::counts.find(path) == counts.end()) {
|
||||
scanForAABB();
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
return *aabb;
|
||||
}
|
||||
|
||||
long numPoints(){
|
||||
long long numPoints(){
|
||||
return pointCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
|
||||
virtual AABB getAABB() = 0;
|
||||
|
||||
virtual long numPoints() = 0;
|
||||
virtual long long numPoints() = 0;
|
||||
|
||||
virtual void close() = 0;
|
||||
};
|
||||
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
AABB getAABB(){
|
||||
return aabb;
|
||||
}
|
||||
long numPoints(){
|
||||
long long numPoints(){
|
||||
return pointCount;
|
||||
}
|
||||
void close(){
|
||||
|
||||
@@ -246,16 +246,6 @@ public:
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
//if (!arg->shortname().empty() && map.find(arg->shortname()) != map.end()) {
|
||||
// return true;
|
||||
//}
|
||||
//
|
||||
//if (!arg->fullname().empty() && map.find(arg->fullname()) != map.end()) {
|
||||
// return true;
|
||||
//}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
AValue get(string name) {
|
||||
@@ -267,30 +257,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//if (arg == nullptr) {
|
||||
// return AValue({});
|
||||
//} else if (arg->id == "") {
|
||||
// if (map.find("") != map.end()) {
|
||||
// return AValue(map[""]);
|
||||
// } else {
|
||||
// return AValue({});
|
||||
// }
|
||||
//} else {
|
||||
// vector<string> result;
|
||||
//
|
||||
// if (!arg->shortname().empty() && map.find(arg->shortname()) != map.end()) {
|
||||
// auto tokens = map[arg->shortname()];
|
||||
// result.insert(result.end(), tokens.begin(), tokens.end());
|
||||
// }
|
||||
//
|
||||
// if (!arg->fullname().empty() && map.find(arg->fullname()) != map.end()) {
|
||||
// auto tokens = map[arg->fullname()];
|
||||
// result.insert(result.end(), tokens.begin(), tokens.end());
|
||||
// }
|
||||
//
|
||||
// return AValue(result);
|
||||
//}
|
||||
|
||||
return AValue({});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ void BINPointReader::close(){
|
||||
}
|
||||
}
|
||||
|
||||
long BINPointReader::numPoints(){
|
||||
long long BINPointReader::numPoints(){
|
||||
//TODO
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <experimental/filesystem>
|
||||
#include "laszip_dll.h"
|
||||
#include "laszip_api.h"
|
||||
|
||||
#include "LASPointReader.h"
|
||||
#include "stuff.h"
|
||||
@@ -81,8 +81,12 @@ void LASPointReader::close(){
|
||||
}
|
||||
}
|
||||
|
||||
long LASPointReader::numPoints(){
|
||||
return reader->header->number_of_point_records;
|
||||
long long LASPointReader::numPoints(){
|
||||
if (reader->header->version_major >= 1 && reader->header->version_minor >= 4) {
|
||||
return reader->header->extended_number_of_point_records;
|
||||
} else {
|
||||
return reader->header->number_of_point_records;
|
||||
}
|
||||
}
|
||||
|
||||
bool LASPointReader::readNextPoint(){
|
||||
|
||||
@@ -8,7 +8,6 @@ Builds a potree octree from las, laz, binary ply, xyz or ptx files.
|
||||
## Downloads
|
||||
|
||||
* [Source Code and windows 64bit releases](https://github.com/potree/PotreeConverter/releases)
|
||||
* [64bit VS2015 redistributable - necessary to exexute PotreeConverter!](https://www.microsoft.com/en-US/download/details.aspx?id=48145)
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -82,7 +81,6 @@ PotreeConverter
|
||||
set LASZIP_INCLUDE_DIRS=D:\dev\workspaces\lastools\master\LASzip\dll
|
||||
set LASZIP_LIBRARY=D:\dev\workspaces\lastools\master\LASzip\build\src\Release\laszip.lib
|
||||
|
||||
|
||||
# checkout PotreeConverter
|
||||
cd D:/dev/workspaces/PotreeConverter
|
||||
git clone https://github.com/potree/PotreeConverter.git master
|
||||
@@ -139,12 +137,9 @@ Examples:
|
||||
# points in new_data MUST fit into bounding box!
|
||||
./PotreeConverter.exe C:/data -o C:/potree_converted -aabb "-0.748 -2.780 2.547 3.899 1.867 7.195"
|
||||
./PotreeConverter.exe C:/new_data.las -o C:/potree_converted --incremental
|
||||
|
||||
|
||||
# tell the converter that coordinates are in a UTM zone 10N projection. Also, create output in LAZ format
|
||||
./PotreeConverter.exe C:/data -o C:/potree_converted -p pageName --projection "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs" --overwrite --output-format LAZ
|
||||
|
||||
|
||||
# using a swiss projection. Use http://spatialreference.org/ to find projections in proj4 format
|
||||
./PotreeConverter.exe C:/data -o C:/potree_converted -p pageName --projection "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs" --overwrite
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user