How to add building from OSM file into UAV scenario designer
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everybody,
I am trying to use the building data from OSM file into UAV scenario design like in this example Create Trajectory and Simulate Scenario. I downloaded the data from openstreermap.org and do like in the exmaple showed but It seem that the building is not imported. Could anyone help me?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1530017/image.png)
I am also try to check if the file is OK or not using this code and it seem that the buildings are not imported.
osmInfo = addMesh(scene,"buildings",{"PMK2.osm",xlimits,ylimits,"auto"},color,Verbose=true)
and these are the result
osmInfo =
struct with fields:
OSMFileName: "C:\Users\user\OneDrive - catc.or.th\siit\seniorProject\exchange\map\PMK2.osm"
LatitudeRange: [13.7654 13.7723]
LongitudeRange: [100.5309 100.5436]
TotalNumBuildings: 469
NumImportedBuildings: 0
Also, I am trying to do like this. It can be shown in the figure.
buildingsLayer = readgeotable("PMK2.osm",Layer="buildings");
figure
geoplot(buildingsLayer,ColorVariable="MaxHeight")
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1530022/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1530027/image.png)
SO I don't know if anything wrong with my file.
Thank you in advance for your help.
0 Kommentare
Antworten (1)
Jianxin Sun
am 10 Nov. 2023
Hi, can you check what is the reference location of your scenario? It should be set to within the latitude longitude ranges shown in the verbose output. Otherwise the buildings might be too far away to your scenario origin when you import
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!