I'm using the mitab.dll to read MapInfo files (*.tab + friends). These files may contain simple polylines and also curved lines. So far, I have been unable to distinguish between these two and read everything as polylines. Is there any mitab-API call that allows me to determine which of these two line types I am reading?
(simplified) code:
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;
(This is with Delphi 2077, but I take any other solution that uses mitab.)