mapxtreme 更改图元的位置

//用来改变某一个图元的位置 ,使用offestxy函数           
Catalog cat = MapInfo.Engine.Session.Current.Catalog;
            Table tbl = cat.GetTable("地铁站");
            if (tbl != null)
            {
                //更新点的位置
                tbl.BeginAccess(MapInfo.Data.TableAccessMode.Write);
                foreach (Feature fcar in tbl)
                {
                    fcar.Geometry.GetGeometryEditor().OffsetByXY(0.5, 0, MapInfo.Geometry.DistanceUnit.Degree, MapInfo.Geometry.DistanceType.Spherical);
                    fcar.Geometry.EditingComplete();
                    fcar.Update();
                }
                tbl.EndAccess();
            }
posted @ 2011-07-13 11:52  naariah  阅读(323)  评论(0)    收藏  举报