clearsky1973
路人甲
路人甲
  • 注册日期2004-03-03
  • 发帖数16
  • QQ
  • 铜币150枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1760回复:2

如何判断一个图层是shape图层

楼主#
更多 发布于:2006-07-06 09:04
利用AB+arcENgine 开发时,如何判断一个图层是shape图层?谢谢!
喜欢0 评分0
semon1981
路人甲
路人甲
  • 注册日期2006-06-04
  • 发帖数28
  • QQ
  • 铜币198枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2006-07-06 10:25
<P>把这个图层强制转换成IFeatuerLayer,如果转换失败就不是shape几何类型图层。如IFeatureLayer iFeatureLyr = iLyr as IFeatureLayer;</P>
<P>if(iFeatureLyr == null)...</P>
举报 回复(0) 喜欢(0)     评分
cl991036
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5917
  • QQ14265545
  • 铜币29669枚
  • 威望217点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
2楼#
发布于:2006-07-06 09:59
<DIV>
<H1>IFeatureLayer.<FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> Property  [C#]</H1></DIV>
<DIV>
<H4>See Also</H4><a href="ms-help://ESRI.ArcGIS/esriCarto/html/IFeatureLayer.htm" target="_blank" >IFeatureLayer Interface</A></DIV>
<DIV><B>Language</B>
<UL>
<LI><a href="" target="_blank" >C#</A><BR>
<LI><a href="" target="_blank" >Visual Basic .NET</A><BR>
<LI><a href="" target="_blank" >Show All</A></LI></UL></DIV>
<DIV>
<P>Data source type. </P><PRE none">[Visual Basic .NET]
<B>Public Property <FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> As </B><a>String</A></B></PRE><PRE block">[C#]
<B>public </B><a>string</A> <B><FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> {get; set;}</B></PRE>
<H4>Product Availability</H4>
<DIV>Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.</DIV>
<H4>Description</H4>
<P>Describes the type of data referenced by the feature layer. In ArcMap and ArcCatalog this description appears on the layer's properties dialog on the Source tab after "Data Type:"</P>
<H4>Remarks</H4>
<DIV class=tableDiv>By default, the <STRONG><FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> </STRONG>for a layer matches the value returned by <STRONG>IDataset::Category </STRONG>when you access the layer's feature class through <STRONG>IDataset</STRONG>. You can set a layer's <STRONG><FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> </STRONG>to any string.</DIV>
<P>Here is a list of default values for <STRONG><FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff>DataSourceType</FONT> </STRONG>for common feature layer types:</P>
<DIV class=tableDiv>
<DIV class=tableDiv>
<TABLE>

<TR>
<TH>Layer Type</TH>
<TH>Value</TH>
<TR>
<TD>Personal Geodatabase</TD>
<TD>"Personal Geodatabase Feature Class"</TD></TR>
<TR>
<TD>SDE</TD>
<TD>"SDE Feature Class"</TD></TR>
<TR>
<TD>Shapefile</TD>
<TD>"Shapefile Feature Class"</TD></TR>
<TR>
<TD>ArcInfo or PC ArcInfo Coverage (annotation)</TD>
<TD>"Annotation Feature Class"</TD></TR>
<TR>
<TD>ArcInfo or PC ArcInfo Coverage (point)</TD>
<TD>"Point Feature Class"</TD></TR>
<TR>
<TD>ArcInfo or PC ArcInfo Coverage (line)</TD>
<TD>"Arc Feature Class"</TD></TR>
<TR>
<TD>ArcInfo or PC ArcInfo Coverage (polygon)</TD>
<TD>"Polygon Feature Class"</TD></TR>
<TR>
<TD>Edge</TD>
<TD>"StreetMap Feature Class"</TD></TR>
<TR>
<TD>CAD (annotation)</TD>
<TD>"CAD Annotation Feature Class"</TD></TR>
<TR>
<TD>CAD (point)</TD>
<TD>"CAD Point Feature Class"</TD></TR>
<TR>
<TD>CAD (line)</TD>
<TD>"CAD Polyline Feature Class"</TD></TR>
<TR>
<TD>CAD (polygon)</TD>
<TD>"CAD Polygon Feature Class"</TD></TR></TABLE></DIV></DIV></DIV>
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
举报 回复(0) 喜欢(0)     评分
游客

返回顶部