MapInfo 파일 (* .tab + 친구)을 읽으려면 mitab.dll을 사용하고 있습니다. 이 파일에는 단순 폴리 라인과 곡선이 포함될 수 있습니다. 지금까지이 둘을 구별하지 못했고 모든 것을 폴리 라인으로 읽었습니다. 내가 읽는 두 라인 유형을 결정할 수있는 mitab-API 호출이 있습니까?mitab에서 읽은 MapInfo 파일에서 폴리선과 곡선을 어떻게 구별 할 수 있습니까?
(간체) 코드 :
procedure HandlePolyline(_Feature: mitab_Feature);
var
i, j: LongInt;
pointCount: LongInt;
partCount: LongInt;
X, Y: array of Double;
begin
partCount := FMitabDll.get_parts(_Feature);
for i := 0 to partCount - 1 do begin
pointCount := FMitabDll.get_vertex_count(_Feature, i);
SetLength(X, pointCount);
SetLength(Y, pointCount);
for j := 0 to pointCount - 1 do begin
X[j] := FMitabDll.get_vertex_x(_Feature, i, j);
Y[j] := FMitabDll.get_vertex_y(_Feature, i, j);
end;
// -> Here I have got a polyline, but it might be a curved line, how do I know?
end;
end;
i := 1;
repeat
feature := FMitabDll.read_feature(FTabHandle, i);
FeatureType := FMitabDll.get_type(feature);
case FeatureType of
TABFC_Polyline: HandlePolyline(feature);
end;
i := FMitabDll.next_feature_id(FTabHandle, i);
FMitabDll.destroy_feature(feature);
until i = -1;
(이것은 델파이 2077과 함께,하지만 내가 mitab를 사용하는 다른 솔루션을.)
'case TABFC_Arc의 FeatureType : HandleArc (feature); ... '또는 그런 무엇인가? – TLama
불행히도 그렇게 쉽지는 않습니다. 두 유형 모두 FeatureType TABFC_Polyline입니다. 그래서 나는 최근에야 문제가 있다는 것을 알게되었습니다. – dummzeuch