The current format
The y value is height off ground for roads, and width for rivers.
fprintf(Fp,"%d\n",TrackList->TrackCnt);
for(TrackIndex= 0 ;TrackIndex < TrackList->TrackCnt;++TrackIndex)
{
Track = TrackList->Tracks[TrackIndex];
if(Track == NULL)
{
fclose(Fp);
return -1;
}
fprintf(Fp,"%d,Type\n",Track->Type);
fprintf(Fp,"%d,Flags\n",Track->Flags);
fprintf(Fp,"%d,ResourceType\n",Track->ResourceType);
fprintf(Fp,"%d,DestFieldIndex\n",Track->DestFieldIndex);
fprintf(Fp,"%d,SourceFieldOrObjectIndex\n",Track->SourceFieldOrObjectIndex);
fprintf(Fp,"%f,SrcRadius\n",Track->SrcRadius);
fprintf(Fp,"%f,DestRadius\n",Track->DestRadius);
fprintf(Fp,"%s\n",Track->TrackName);
fprintf(Fp,"%d,PntCnt\n",Track->SplinePath.NodeCnt);
PntCnt = Track->SplinePath.NodeCnt;
for(PntIndex= 0 ;PntIndex < PntCnt;++PntIndex)
{
fprintf(Fp,"%lf,%lf,%lf\n",Track->SplinePath.Pnts[PntIndex].x,
Track->SplinePath.Pnts[PntIndex].y,
Track->SplinePath.Pnts[PntIndex].z);
}
}