필터 지우기
필터 지우기

Read a shapefile with name that was provided from sprintf

조회 수: 6 (최근 30일)
Kelly Kyriakou
Kelly Kyriakou 2015년 9월 7일
댓글: Kelly Kyriakou 2015년 9월 7일
Hello everybody,
I want to read one shapefile, with shaperead command, that his name will change. I have written this code:
phase2open = cellstr(get(hObject,'String'))
nameofphase2open = phase2open{get(hObject,'Value')}
shp2open= sprintf('phase%s_RP%d_%s.shp',nameofphase2open,RPname2open,nameofsource2open)
getshp=shaperead('%s',shp2open,'UseGeoCoords',true)
It understands the name and print it but shaperead failed giving this error: "Error using shaperead>parseInputs (line 546) Expected input number 2, PARAM1, to match one of these strings: 'RecordNumbers', 'BoundingBox', 'Selector', 'Attributes', 'UseGeoCoords"____

채택된 답변

Walter Roberson
Walter Roberson 2015년 9월 7일
getshp = shaperead(shp2open,'UseGeoCoords',true)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by