Convert a map in shapefile into occupancy map
이전 댓글 표시
Hallo
I have a 2Dmaps of a buildings that are saved in shapefiles and I need to convert it into an occupancygrid map so I can plan a Path using RRT toolbox(navigation toolbox)
I already searched online in Matlab documentation but I found only an exemple of how to convert a picture into an occupancy map.
Glad to have an answer Or ay Tipp that can help
thanx
댓글 수: 2
KSSV
2020년 9월 15일
What is occupancy map? You have any reference? Is shape file a line/curve or polygon? Give more details.
Fedi Chaarana
2020년 9월 27일
채택된 답변
추가 답변 (2개)
Cris LaPierre
2020년 9월 27일
0 개 추천
I'll take the "offer a tip" route. That means I may not know what I'm talking about.
I have some familiarity with shapefiles, but not occupancy maps (MATLAB seems to use the term 'Occupancy Grid'). A quick read suggests that any area representing a building, etc should have a value of true in a binary grid.
Therefore, my suggestion is to load your shapefile, and then for each polygon in the returned structure, use the inpolygon function to set the corresponding grid values within that polygon to true.
댓글 수: 5
Fedi Chaarana
2020년 9월 28일
Cris LaPierre
2020년 9월 28일
Fedi Chaarana
2020년 9월 28일
Fedi Chaarana
2020년 9월 28일
Cris LaPierre
2020년 9월 29일
Can you share your shapefile? Or a mat file containg your structure? Also, what is the size/dimensions of your binary grid?
Fedi Chaarana
2020년 9월 29일
0 개 추천
댓글 수: 2
Cris LaPierre
2020년 9월 29일
That is the code you use to load your shape file. However, I would need the actual shapefile 'C2018_wege_garten.shp' to do anything more.
Fedi Chaarana
2020년 9월 29일
카테고리
도움말 센터 및 File Exchange에서 Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





