sdgts
路人甲
路人甲
  • 注册日期2004-10-10
  • 发帖数114
  • QQ
  • 铜币550枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2022回复:6

怎样将各个点的坐标添加地点的属性表

楼主#
更多 发布于:2007-03-11 10:29
怎样将各个点的坐标添加地点的属性表,请指教。
喜欢0 评分0
sdgts
路人甲
路人甲
  • 注册日期2004-10-10
  • 发帖数114
  • QQ
  • 铜币550枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2007-03-13 07:59
<P>请看一下代码错到哪里,单击确定提示错误。</P>
<P><a href="http://sdgts.ik8.com/index.files/shiruzuobiao.jpg" target="_blank" >http://sdgts.ik8.com/index.files/shiruzuobiao.jpg</A></P>
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
2楼#
发布于:2007-03-12 14:15
<P>为什么不看帮助?已经讲得非常明白了!</P>
<P>++++++++++++++++++</P>
<P>How to use Visual Basic code to calculate fields based on area, length, perimeter, etc.</P>
<P>1. These code examples return a value of type 'double', so use them to calculate either an existing field of type 'double' or a new field of type 'double' you've added to the table. For example, you can use these to update the existing area, length or perimeter field you may find in a shapefile's attribute table. <BR>2. Check Advanced. You'll see two empty text entry boxes.<BR>3. Enter one of these four line code examples into the topmost box, the one labeled 'Pre-Logic VBA Script Code'. Tip: you can select the code in this help topic, right-click and choose Copy, and then paste it into the box.</P>
<P>To calculate area:</P>
<P>Dim Output as double<BR>Dim pArea as Iarea<BR>Set pArea = [shape]<BR>Output = pArea.area</P>
<P>To calculate length or perimeter (depending on whether the features are lines or polygons):</P>
<P>Dim Output as double<BR>Dim pCurve as ICurve<BR>Set pCurve = [shape]<BR>Output = pCurve.Length</P>
<P>To add the x coordinate of points:</P>
<P>Dim Output As Double<BR>Dim pPoint As IPoint<BR>Set pPoint = [Shape]<BR>Output = pPoint.X</P>
<P>To add the x coordinate of polygon centroids:</P>
<P>Dim Output As Double<BR>Dim pArea As IArea<BR>Set pArea = [Shape]</P>
<P>Output = pArea.Centroid.X</P>
<P>4. Type the variable Output into the second text box. Do not enclose it in quotes or brackets.</P>
<P>5.  Click OK</P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
sdgts
路人甲
路人甲
  • 注册日期2004-10-10
  • 发帖数114
  • QQ
  • 铜币550枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2007-03-12 13:42
以上相关帖子我看过,谢谢指教,能否按“使用Field Calculator把度 分 妙字符型字段转为十进制度的数值型字段”解释方法解释一下将点的坐标添加到属性表,谢谢。
<TABLE fixed; WORD-BREAK: break-all" height="85%" width="95%" align=center border=0>

<TR>
<TD 9pt; LINE-HEIGHT: 12pt" vAlign=top width=* height="100%"><FONT size=3></FONT></TD></TR></TABLE>
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
4楼#
发布于:2007-03-12 12:01
<P><STRONG>可以看看Field Calculator的帮助了,如果你有AO开发的经验,那么还比较简单</STRONG></P>
<P><STRONG>相关帖子和操作方法:</STRONG></P>
<P><STRONG>使用Field Calculator把度 分 妙字符型字段转为十进制度的数值型字段</STRONG></P>
<P><a href="http://www.gisempire.com/bbs/dispbbs.asp?BoardID=41;ID=43855;replyID=;skin=1" target="_blank" >http://www.gisempire.com/bbs/dispbbs.asp?BoardID=41;ID=43855;replyID=;skin=1</A></P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
sdgts
路人甲
路人甲
  • 注册日期2004-10-10
  • 发帖数114
  • QQ
  • 铜币550枚
  • 威望0点
  • 贡献值0点
  • 银元0个
5楼#
发布于:2007-03-12 07:55
想将点的坐标添加到属性表,使用Add XY coordinate工具找不到需要添加坐标的数据类,在ArcMap里面添加了xy两个字段,然后打开字段计算器但不知如何操作,请指教。
举报 回复(0) 喜欢(0)     评分
xiaotirong
路人甲
路人甲
  • 注册日期2004-12-21
  • 发帖数44
  • QQ345131571
  • 铜币278枚
  • 威望0点
  • 贡献值0点
  • 银元0个
6楼#
发布于:2007-03-11 18:47
toolbox
举报 回复(0) 喜欢(0)     评分
游客

返回顶部