gis实习报告 下载本文

地图标注:

简单标注:

1、点标注:

2、线标注:

3、面标注:

复杂标注:

1、线标注:

2、面标注:

文本标注:

实习三: 创建新图层:

Dim pfws As IFeatureWorkspace Dim pworkspacefactory As IWorkspaceFactory Dim str As String

str = InputBox(\存储地址:\请输入创建图层的地址\实习\\123\

Set pworkspacefactory = New ShapefileWorkspaceFactory Set pfws =

pworkspacefactory.OpenFromFile(str, 0)

Dim pfield As IField

Dim pfieldedit As IFieldEdit Set pfield = New Field Set pfieldedit = pfield

pfieldedit.Name = \pfieldedit.Type =

esriFieldTypeGeometry

Dim pspa As ISpatialReference Dim pgeomdef As IGeometryDef Dim pgeomdefedit As IGeometryDefEdit

Set pgeomdef = New GeometryDef Set pgeomdefedit = pgeomdef Set pspa = New

UnknownCoordinateSystem With pgeomdefedit

.GeometryType = esriGeometryPolygon Set .SpatialReference = pspa End With

Set pfieldedit.GeometryDef = pgeomdef

Dim pfields As IFields

Dim pfieldsedit As IFieldsEdit Set pfields = New Fields Set pfieldsedit = pfields pfieldsedit.AddField pfield

Set pfield = New Field Set pfieldedit = pfield With pfieldedit .length = 30 .Name = \名称\

.Type = esriFieldTypeString End With

pfieldsedit.AddField pfield

Dim pfeatclass As IFeatureClass Set pfeatclass =

pfws.CreateFeatureClass(\行政区划\pfields, Nothing, Nothing, esriFTSimple, \

绘制点线面要素:

选择删除对象: