Hi Team,
Programmatically can i load las file directly into MicroStation V8i (SELECTseries 4) Version 08.11.09.829 without converting into pod format ?
Thank you,
B Daniel.
Reason for not using pod is , Geometry Units assign functionality is not available in pointcloud API
If the microstation working units are in meters there will be no issue for creating pod from las using below 2 methods.
Method 1:
Las File Reading Code:
ifs.open(filename, std::ios::in | std::ios::binary); liblas::ReaderFactory f; liblas::Reader reader = f.CreateWithStream(ifs);
while (reader.ReadNextPoint()) { liblas::Point const& p = reader.GetPoint();
}
Pod Writing Code:
Bentley::Ustn::PointCloud::PointCloudPodWriter* podW = new Bentley::Ustn::PointCloud::PointCloudPodWriter; stat = podW->Initialize(); Bentley::WString PodFileName((filename)); stat = podW->StartStream(PodFileName); stat = podW->AddGroup(flags,L"Group"); stat = podW->AddCloud(flags,L"Cloud",NULL,0,0);
.
podW->AddPoint(ppt,&rgb,intensity,NULL,ClsChr);
stat= podW->EndStream(); stat= podW->BuildPod();
Method 2:
Another way of conversion using Pod Import
char* filename = replaceWord(dlogBoxInfo.fileName,".las", ".pod");Bentley::WString PodFileName(_T(filename));Bentley::WString nameApp(_T("Ustation.exe"));Bentley::Ustn::PointCloud::PointCloudImporterPtr pFI = Bentley::Ustn::PointCloud::IPointCloudImporter::CreateImporter(nameApp);pFI->AddImportFile(LasFileName);pFI->SetOutputFileName(PodFileName);pFI->SetIncludeRGB(true);pFI->SetIncludeIntensity(true);pFI->SetIncludeNormals(true);pFI->SetIncludeClassification(true);pFI->SetNormalizeIntensities(true);pFI->ConvertToPOD();
Hi Daniel,
as far as I know POD is the only format supported by MicroStation and any other format has to be converted into this one.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
Thanks for the information.
Any idea on how TerraScan able to load las file directly into Microstation ?
Daniel Christopher said:Any idea on how TerraScan able to load las file directly into Microstation ?
I do not know TerraScan (just that it exists), so I have no idea. Do they use "point cloud" element type or they implement own "point cloud display engine"?
My assumption is that they implement own support for point cloud formats and they convert it to MicroStation point cloud using own code (and in such case it's POD internally) or they do everything by their own including how point clouds are displayed (and internall the format is something proprietary to TerraSolid).
TerraScan and TopoDOT both utilize their own custom point cloud engine and do not rely on MicroStation's built in POD engine.
Hi Maury,any more information to load point using liblas? i just try to realize that, but i get some error to load mdl application while compilering with liblas and include it's head file like:
#include <liblas/liblas.hpp> #include <liblas/reader.hpp> #include <liblas/writer.hpp> #include <liblas/export.hpp>
So, any help here? thanks
liu li said:any more information to load point using liblas?
Please: follow the Forum best practise!
liu li said:liblas
The libLAS web site tells us that libLAS is obsolete and you should prefer to use PDAL.
Post a new question on this Forum, and tell us why you want to use PDAL or libLAS rather than the MicroStation SDK point cloud API.
liu li said: i get some error
Well, I often get some error. But I don't expect you to be able to tell me the solution unless I provide you with more information.
Regards, Jon Summers LA Solutions
well
thank you for repling this,i will post a new post~