我使用mitab.dll读取MapInfo文件(* .tab + friends)。这些文件可能包含简单的折线和曲线。到目前为止,我无法区分这两者并将所有内容都读为折线。是否有任何mitab-API调用允许我确定我正在阅读这两种线型中的哪一种?
(简化)代码:
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;
(这是使用Delphi 2077,但我采用任何其他使用mitab的解决方案。)
答案 0 :(得分:0)
两种线型都存在吗?
由于您在几个网站上发布了您的问题并且显然没有回复,因为Mitab的在线文档没有提及弯曲多边形,甚至没有样条线,我想知道折线是否存在曲线特征。