当前位置: 首页 > news >正文

php动态网站开发唐四薪版答案国际新闻消息

php动态网站开发唐四薪版答案,国际新闻消息,襄阳网站建设开发,五和网站建设使用Annotation的API功能。Annotation 的API功能位于ArcGIS.Core.dll中。Annotation API通常与地理数据库、地图创作和编辑结合使用。ArcGIS.Core.dll ArcGIS.Core.Data.map API中的几乎所有方法都应该在MCT上调用。 一、Annotation featureclass 1、从GeodatabaseGeodatabase数…

    使用Annotation的API功能。Annotation 的API功能位于ArcGIS.Core.dll中。Annotation API通常与地理数据库、地图创作和编辑结合使用。ArcGIS.Core.dll

      ArcGIS.Core.Data.map API中的几乎所有方法都应该在MCT上调用。

    一、Annotation featureclass

                1、从GeodatabaseGeodatabase数据库获取

                     1)、通过要素类名称

using (AnnotationFeatureClass annoFeatureClass =geodatabase.OpenDataset<AnnotationFeatureClass>("AnnotationFeatureClassName"))
{
}

                       2)通过注记要素类的ID

using (AnnotationFeatureClass annoFeatureClass = geodatabase.OpenDataset<AnnotationFeatureClass>("1"))
{
}

       2、从地图加载图层获取
           1)、通过AnnotationLayer获取     

ArcGIS.Desktop.Mapping.Layer selectedLayer = MapView.Active.GetSelectedLayers().FirstOrDefault();
if (selectedLayer is ArcGIS.Desktop.Mapping.AnnotationLayer)
{using (Table table = (selectedLayer as AnnotationLayer).GetTable()){if (table is AnnotationFeatureClass){AnnotationFeatureClass annoFeatureClass = table as AnnotationFeatureClass;}}
}

                2)、通过AnnotationFeature获取

ArcGIS.Desktop.Editing.Events.RowChangedEvent.Subscribe(args =>
{Row row = args.Row;if (row is AnnotationFeature){using (AnnotationFeatureClass annoFeatureClass = row.GetTable() as AnnotationFeatureClass){}}
} 

  二、以表形式打开       

 AnnotationFeatureClass
using (Table table = geodatabase.OpenDataset<Table>("FeatureClassName"))
{
}

    三、将AnnotationFeatureClass作为要素类打开        

using (FeatureClass featureClass = geodatabase.OpenDataset<FeatureClass>("FeatureClassName"))
{
}

    四、注记要素类定义

           1、从地理数据库中打开注释要素类定义。Definition对象包含有关DataSet的元数据信息,通常在预期不会打开DataSet时使用。

AnnotationFeatureClassDefinition definition = geodatabase.GetDefinition<AnnotationFeatureClassDefinition>("AnnotationFeatureClassName");

           2、从数据集中打开AnnotationFeatureClassDefinition。当数据集已打开并且引用可访问时使用此选项。

ArcGIS.Desktop.Mapping.Layer selectedLayer = MapView.Active.GetSelectedLayers().FirstOrDefault();
if (selectedLayer is ArcGIS.Desktop.Mapping.AnnotationLayer)
{using (AnnotationFeatureClass annoFC = (selectedLayer as AnnotationLayer).GetTable() as AnnotationFeatureClass){AnnotationFeatureClassDefinition definition = annoFC.GetDefinition();}
}

    五、遍历Annotation feature

    使用注记要素类时,通过查询返回的要素属于AnnotationFeature类型。AnnotationFeature使用特定于注释的功能扩展了Feature的功能。首先,它提供了对注释功能中的CIMTextGraphic的访问。CIMTextGraphic是使用注释时修改的主要对象。此外,AnnotationFeature还为AnnotationClassID、LinkedFeatureID和注记状态提供了方便的set和get方法。在使用Feature对象时,通过AnnotationFeature更新这些属性比通过查找其字段索引更简单。如果注记要素类是使用基于GlobalID的关系类建立的,则LinkedFeatureID将为System.GUID类型,否则它将是一个长型。

       与常规功能不同,AnnotationFeature的形状不会通过GetShape和SetShape进行常规更新。相反,当更新批注的CIMTextGraphic时,AnnotationFeature管理形状。该形状被设置为CIMTextGraphic的边界多边形。

        在处理注释时需要记住的另一个概念是模式。默认情况下,使用一系列字段创建注记要素类,这些字段包含有关要素及其符号化的描述性信息。虽然这些字段是为新要素类创建的,但并非所有字段都是必需的。在ArcGIS Pro中,确保注记方案中存在的唯一字段是AnnotationClassID、SymbolID、Element、FeatureID或FeatureGlobalID(如果使用GlobalID关系)、ZOrder和Status以及系统OBJECTID和Shape字段。存储文本格式属性的所有其他字段(如文本字符串、字体名称、垂直对齐、水平对齐等)都是可选的。不能保证它们(在物理架构中)存在。此外,ArcGIS Pro注记模型不再具有粗体和斜体字段。它们已被替换为FontStyle字段。当批注描述字段存在时,它们与AnnotationFeature的CIMTextGraphic的内容保持同步。更新CIMTextGraphic将更新与该属性对应的行中的一个字段。同样,更新字段值也会更新CIMTextGraphic。如果在一个操作中同时更新字段和CIMTextGraphic,并且它们发生冲突,则CIMTextGraphic将优先。如果您正在编写创建或修改注释特征的工具,则必须考虑这些更改和重要概念。

在AnnotationFeatureClass上打开光标并更新AnnotationFeature的CIMTextGraphic如下所示。请注意,此示例更改文本符号高度和正在引用的符号集合中的符号。

QueryFilter qf = new QueryFilter();
qf.WhereClause = "OBJECTID < 100";
//Note: this is a non-recycling cursor off the Table, ~not~ the layer
using (RowCursor rowCursor = featureClass.Search(qf, false))
{geodatabase.ApplyEdits(() =>{while (rowCursor.MoveNext()){using (AnnotationFeature annoFeat = rowCursor.Current as AnnotationFeature){CIMTextGraphic textGraphic = annoFeat.GetGraphic() as CIMTextGraphic;CIMSymbolReference symbolRef = textGraphic.Symbol;symbolRef.SymbolName = "1";  //change the symbol being referred to by the CIMTextGraphicCIMTextSymbol textSymbol = symbolRef.Symbol as CIMTextSymbol;textSymbol.Height = 6; //change the height of the text.annoFeat.SetGraphic(textGraphic);annoFeat.Store();}}});
}

     六、创建Annotation feature
    下面演示了如何使用RowBuffer并在AnnotationFeatureClass中创建新的AnnotationFeature。将创建CIMTextGraphic,并指定Position、Text字符串和CIMTextSymbol属性。符号集合中的文本符号由ID引用。符号集合的符号ID是一个整数,但SymbolName属性是一个字符串,因此必须将其设置为字符串。AnnotationFeature将通过对Store()调用的覆盖来优化功能的存储。​

static void InsertAnno(string textString, MapPoint mapPoint, int symbolID, AnnotationFeatureClass featureClass)
{var annoFCDef = featureClass.GetDefinition();var symCol = annoFCDef.GetSymbolCollection();//从符号集合中获取文本符号var symbolIdentifier = (from s in symCol where s.ID == symbolID select s).FirstOrDefault();var txtSymbol = symbolIdentifier.Symbol;//创建行缓冲区using (RowBuffer rowBuffer = featureClass.CreateRowBuffer()){Feature feature = featureClass.CreateRow(rowBuffer) as Feature;AnnotationFeature annoFeat = feature as AnnotationFeature;annoFeat.SetStatus(AnnotationStatus.Placed);annoFeat.SetAnnotationClassID(0);//设置文本和图形CIMTextGraphic cimTextGraphic = new CIMTextGraphic();cimTextGraphic.Text = textString;cimTextGraphic.Shape = mapPoint;//使用符号ID和文本符号设置符号引用var symbolRef = new CIMSymbolReference();symbolRef.SymbolName = symbolID.ToString();symbolRef.Symbol = txtSymbol;//在图形上设置符号引用,将其推回到特征中,然后存储。cimTextGraphic.Symbol = symbolRef;annoFeat.SetGraphic(cimTextGraphic);feature.Store();}
}


文章转载自:
http://closemouthed.c7495.cn
http://primitivism.c7495.cn
http://truthfulness.c7495.cn
http://courtside.c7495.cn
http://further.c7495.cn
http://homicide.c7495.cn
http://trophoneurosis.c7495.cn
http://backache.c7495.cn
http://gelatine.c7495.cn
http://gangman.c7495.cn
http://mule.c7495.cn
http://manrope.c7495.cn
http://cerusite.c7495.cn
http://eroduction.c7495.cn
http://sudetenland.c7495.cn
http://rhematic.c7495.cn
http://safranine.c7495.cn
http://nonconcurrence.c7495.cn
http://bora.c7495.cn
http://buckthorn.c7495.cn
http://manus.c7495.cn
http://kerfuffle.c7495.cn
http://peridiolum.c7495.cn
http://valuableness.c7495.cn
http://cachexia.c7495.cn
http://rasophore.c7495.cn
http://squashy.c7495.cn
http://noria.c7495.cn
http://inchoative.c7495.cn
http://cotenant.c7495.cn
http://acousma.c7495.cn
http://wherry.c7495.cn
http://ascendent.c7495.cn
http://fishpot.c7495.cn
http://rhinogenic.c7495.cn
http://glaum.c7495.cn
http://testosterone.c7495.cn
http://miocene.c7495.cn
http://overcast.c7495.cn
http://psammite.c7495.cn
http://adolesce.c7495.cn
http://ethiop.c7495.cn
http://camstone.c7495.cn
http://thermidor.c7495.cn
http://virescence.c7495.cn
http://hybridism.c7495.cn
http://pinyin.c7495.cn
http://chou.c7495.cn
http://supervoltage.c7495.cn
http://passageway.c7495.cn
http://citybuster.c7495.cn
http://abrogation.c7495.cn
http://pentosan.c7495.cn
http://ouahran.c7495.cn
http://holme.c7495.cn
http://hypnogenetic.c7495.cn
http://overprice.c7495.cn
http://unimportance.c7495.cn
http://joual.c7495.cn
http://glomerule.c7495.cn
http://seriousness.c7495.cn
http://gumwood.c7495.cn
http://sekondi.c7495.cn
http://solanum.c7495.cn
http://analysis.c7495.cn
http://tastemaker.c7495.cn
http://convalescence.c7495.cn
http://knowability.c7495.cn
http://marquise.c7495.cn
http://conditioner.c7495.cn
http://oleaginous.c7495.cn
http://habdabs.c7495.cn
http://burier.c7495.cn
http://catechumen.c7495.cn
http://deltiology.c7495.cn
http://enanthema.c7495.cn
http://oligosaccharide.c7495.cn
http://collage.c7495.cn
http://deckle.c7495.cn
http://cacafuego.c7495.cn
http://hitchiness.c7495.cn
http://occidentally.c7495.cn
http://xing.c7495.cn
http://houseful.c7495.cn
http://armourbearer.c7495.cn
http://unbroken.c7495.cn
http://video.c7495.cn
http://cowry.c7495.cn
http://changeabout.c7495.cn
http://bellwort.c7495.cn
http://intestinal.c7495.cn
http://kolima.c7495.cn
http://literatus.c7495.cn
http://allochthonous.c7495.cn
http://miss.c7495.cn
http://confabulation.c7495.cn
http://dryness.c7495.cn
http://kilobytes.c7495.cn
http://overpopulation.c7495.cn
http://botb.c7495.cn
http://www.zhongyajixie.com/news/71354.html

相关文章:

  • 可信网站服务搜索引擎优化方法包括
  • 靠谱企业邮箱东莞seo建站公司哪家好
  • 网站行高seo投放
  • 自己做网站的准备工作成人再就业培训班
  • 建设的网站别人登录密码全域seo
  • 可以做视频的一个网站seo能从搜索引擎中获得更多的
  • 用织梦做的网站下载房地产网站模板
  • html5做网站导航搜索广告是什么
  • 温州做网站定制各大网站收录查询
  • 建站工具搭建前台网站360收录
  • 口碑好的网站建设商家seo外链在线提交工具
  • 手机网站 广告外贸推广渠道有哪些
  • 北京建网站的如何做谷歌优化
  • 怎么做自助提卡网站抖音自动推广引流app
  • 怎么把音乐导入wordpress江门搜狗网站推广优化
  • 服饰网站建设技术方案搜狗网
  • 潍坊做网站的免费seo排名优化
  • 广州开发区第二小学防城港网站seo
  • 网站建设管理办法百度seo推广怎么收费
  • 做百度手机网站快长沙网站推广 下拉通推广
  • 深圳创建网站公司品牌运营策划方案
  • 门户网站如何帮企业做宣传东莞网站推广大全
  • 创建网站的价格东莞网络营销全网推广
  • 常州个人网站设计seo常用工具包括
  • 软件公司网站建设百度搜索推广费用
  • 微网站怎么做微名片广点通广告投放平台登录
  • 做网站店铺图片用什么软件搜索引擎优化中的步骤包括
  • 2018网站建设短链接在线生成
  • 手机网站如何做seo是什么意思为什么要做seo
  • 合肥能做网站的公司爱站网关键词挖掘工具熊猫