MapXtreme创建本地TAB文件

MapInfo.Data.TableInfo ti = MapInfo.Data.TableInfoFactory.CreateTemp("MyPointTable");
ti.Columns.Add(MapInfo.Data.ColumnFactory.CreateIntColumn("Index"));
MapInfo.Data.Table table = MapInfo.Engine.Session.Current.Catalog.CreateTable(ti);
table.close();
创建本地TAB文件
try
            {
                MapInfo.Data.TableInfoNative tf = new TableInfoNative(TableAlias);
                tf.Temporary = false;
                tf.TablePath = path;
                tf.Columns.Add(MapInfo.Data.ColumnFactory.CreateIntColumn("NE_ID"));
                tf.Columns.Add(MapInfo.Data.ColumnFactory.CreateIntColumn("BSIC"));
                tf.Columns.Add(MapInfo.Data.ColumnFactory.CreateStyleColumn());
                tf.Columns.Add(MapInfo.Data.ColumnFactory.CreateFeatureGeometryColumn(map.GetDisplayCoordSys()));
                tf.WriteTabFile();
                MapInfo.Data.Table t = MapInfo.Engine.Session.Current.Catalog.CreateTable(tf);
                MapInfo.Engine.Session.Current.Catalog.CloseTable(TableAlias);
                return true;
            }
            catch { return false; } 

你可能感兴趣的:(map)