10楼#
发布于:2005-03-28 16:42
<P>已成功,谢谢</P><P>'--------------------生成等值线--------------------------
Public Sub Contour()</P><P> Dim pInterpolationOp As IInterpolationOp Set pInterpolationOp = New RasterInterpolationOp ' Create the input point object Dim pInputDataset As IGeoDataset Dim pFeatLayer As IFeatureLayer ' Calls function to open the point dataset from disk Set pFeatLayer = basSub.FindLayerName(frmMain.MapControl1, "水准测量点") Set pInputDataset = pFeatLayer ' Define the search radius Dim pRadius As IRasterRadius Set pRadius = New RasterRadius pRadius.SetVariable 12 'Create FeatureClassDescriptor using a value field Dim pFCDescriptor As IFeatureClassDescriptor Set pFCDescriptor = New FeatureClassDescriptor pFCDescriptor.Create pFeatLayer.FeatureClass, Nothing, "沉降量" 'Set cellsize for output raster in the environment Dim dCellSize As Double dCellSize = 200 Dim pEnv As IRasterAnalysisEnvironment Set pEnv = pInterpolationOp pEnv.SetCellSize esriRasterEnvValue, dCellSize 'Perform the interpolation Dim pOutRaster As IRaster Set pOutRaster = pInterpolationOp.IDW(pFCDescriptor, 2, pRadius) 'Add output into ArcMap as a raster layer Dim pOutRasLayer As IRasterLayer Set pOutRasLayer = New RasterLayer pOutRasLayer.CreateFromRaster pOutRaster frmMain.MapControl1.AddLayer pOutRasLayer End Sub</P> |
|
|
上一页
下一页