一段旋转图元几何体的代码

来源:互联网 发布:软件开发公司资质 编辑:程序博客网 时间:2024/04/29 02:43
Catalog cata  = MapInfo.Engine.Session.Current.Catalog;
   Table t = cata.GetTable("World");
   Feature f = cata.SearchForFeature(t, MapInfo.Data.SearchInfoFactory.SearchWhere("Country='Japan'"));
   DPoint dp = new DPoint(f.Geometry.GeometricCentroid.x, f.Geometry.GeometricCentroid.y);
   f.Geometry.GeometryEditor.Rotate(dp, 90);
   f.Geometry.EditingComplete();
   t.UpdateFeature(f);
   mapControl1.Map.SetView(f);