필터 지우기
필터 지우기

why has one of the attribute names been changed by MATLAB when using the shaperead function to read a point shp file?

조회 수: 1 (최근 30일)
I have a point shp file 'ULS170527All.shp' with eleven attributes. The attributes are shown as follows in ArcGIS:
Then, I used the following expression to read it:
Tree = shaperead('ULS170527All.shp');
The following image shows the field names and data of the 'Tree' variable:
Is this a bug of MATLAB?
Did anyone have the similar problem?
  댓글 수: 6

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 18일

The code for shaperead contains,

        reservedNames = {'Geometry', 'X', 'Y', 'Lat', 'Lon', ...
                 'BoundingBox', 'Height', 'INDEX'};

I have not yet been able to figure out why Height and INDEX are reserved, but we can see from the code that it is deliberate.

  댓글 수: 1
Songqiu
Songqiu 2018년 4월 18일
편집: Songqiu 2018년 4월 18일
Thank you very much for your answer. So we cannot use any of names listed in the code, right? I just found that the shapeinfo function can read all of attribute names correctly, so I can fix it using the result of shapeinfo.

댓글을 달려면 로그인하십시오.

추가 답변 (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