envi和arcgis结合提取图像上点的坐标信息

更新时间:2023-10-19 14:20:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

envi和arcgis结合提取图像上点的坐标信息

2010-06-24 15:36:00| 分类: 默认分类 | 标签: |字号大中小 订阅 有时候我们需要知道一些点的坐标信息,凡是有坐标信息的图像在用专业的软件显示的时候,都能看到每个点的坐标信息,但是我们如果

将我们感兴趣的点的坐标提取出来呢?

第一个你想到的可能是编程,的确,这样可以提取每个点的信息,但是对于哪些不懂得编程的人员来说,这太难了。因此我们必须寻找其

他的办法来解决这个问题。

第二个方法就是充分利用当前的软件,应该说目前的软件已经能够满足大部分的需求,当然,如果进行批处理的话,用软件进行操作就有点太繁琐了,工作量超大。如果数据量比较少的话,就很方便了。毕

竟,操作的东西还是比较容易学的。

这里我们介绍一种采用envi和arcgis结合的方式来给从遥感图像上提取的点增加坐标信息。当然这个图像要有投影坐标信息才可以 注:当将文件利用envi输出为ascii时,输出的信息是有坐标的,但

是必须在输出格式时选择x y z format 1.从envi中确定感兴趣的点或者区域

打开图像-roi tool-option-band throshold to roi

在选择阈值的时候,首先要确定感兴趣的点的范围,即使这样,采用阈值的方法选取点,仍然存在部分误差。所以还需要后处理才行。

确定roi以后,roi tool-file-export rois to shapefile,

这样感兴趣的点就会被输出到一个shp文件中去,下一步我们将要利

用arcgis软件对这些点加坐标信息 2.矢量图中特征的坐标信息添加

在arcmap中把前面输出的shp文件打开,我们发现,这个文件就是一个点特征文件,从图像显示窗口,我们可以查看每个点的坐标,但是在文件的属性表中并没有每个点的坐标信息,那么如果我们想将每

个点的坐标信息加到属性表中,该如何实现呢?

其实目前的arcgis软件集成了相当多的模块,应该说,只要我们能

想到的,arcgis基本都能实现(限于gis)

对于Point的数据层,ArcMAP--ArcTool Box--Data Management Tool--Features工具集--Add XY Coordinates工具,则可在点状数据的属性表里添加了XY两列坐标;然后把该属

性表导出即可;

如果是Line或者Polygon的数据层,展开ArcTool Box--Data Management Tool--Features工具集--Feature Vertics to Points工具把线装或面状的节点转成Points后,然后再使用Add

XY Coordinates工具,按照点状数据的过程处理

第二部分内容来自CSDN博客

http://blog.csdn.net/swfcsunboy/archive/2008/02/25/2118348.aspx

3.ArcGIS中获取多边形中心点坐标

(http://blog.sina.com.cn/s/blog_4a96696f0100fe1k.html) 方法一:获取polygon的中心点坐标,可使用field calculation。

其ArcGIS Help中的英文解释为:

Adding the x,y coordinates of the centroid of a polygon layer to a

new field

1). Optionally, start an edit session in ArcMap. Calculating a field is faster outside of an edit session, but you won't be able to undo the

calculation.

2). Open the attribute table of the layer of the layer you want to edit. 3). Right-click the field heading for the X field (if there is no X field you can add a new field by clicking the options button and selecting

the new field option). 4). Click Calculate Values. 5). Check Advanced.

6). Type the following VBA statement in the first text box.

Dim Output As Double Dim pArea As IArea Set pArea = [Shape] Output = pArea.Centroid.X

7). Type the variable Output in the text box directly under the X

field name.

8). Click OK.

You can repeat the same process for updating a field with the Y coordinates for the centroid point of each polygon in the layer.

Tip

? The property X returns a field type of double. For best results,

your X field should also be a double field type.

首先打开要提取中心点坐标的多边形图层属性表,在要提取坐标的X Field(如果没有先创建,最好是double型)中的右键单击,选择Field Calculator,再选中Advanced,在Pre-Logic VBA Script Code中输

入代码: 获取X坐标: Dim Output As Double Dim pArea As IArea Set pArea = [Shape] Output = pArea.Centroid.X 在输出框中输入:Output 单击OK,获取多边形X坐标

同理获取Y坐标:

代码为: Dim Output As Double Dim pArea As IArea

Set pArea = [Shape] Output = pArea.Centroid.Y

方法二:分别建立两Field用于计算X,Y左边,右键单击选择Calculate Geometry,在property中分别选择X Coordinate of Centroid或者Y Coordinate of Centroid用于计算各多边形质心的坐标点,在Coordinate System 中选择Use Coordinate system of the data source,在下面的Units中根据需要选择各种表示形式,点击

OK,完成操作。

此方法还可以计算多边形的面积和周长。

Set pArea = [Shape] Output = pArea.Centroid.Y

方法二:分别建立两Field用于计算X,Y左边,右键单击选择Calculate Geometry,在property中分别选择X Coordinate of Centroid或者Y Coordinate of Centroid用于计算各多边形质心的坐标点,在Coordinate System 中选择Use Coordinate system of the data source,在下面的Units中根据需要选择各种表示形式,点击

OK,完成操作。

此方法还可以计算多边形的面积和周长。

本文来源:https://www.bwwdw.com/article/azwf.html

Top