Select to view content in your preferred language

Extract Values to Points

764
0
04-12-2010 09:08 AM
ShaneDolph
Deactivated User
I'm trying to write some code to automate some geoprocessing.  I'm familiar with VB but mostly in a database environment or in AutoCAD.  I've used ArcMap quite a bit but am not real familiar with writing code using the ArcObjects object model.

So far I've been able select features from a point shapefile, Interpolate the points (IDW) to create a raster and save the raster to file (grid).

Now I'd like to write the grid values to point features in another point shape file, using the Extract Values to Points geoprocessing operation.  I've tried using this example code from the ArcMap help, but it doesn't recognize the "readRasterFromDisk" function.

Any help on how to accomplish this operation would be appreciated.

Dim pExtractionOp As IExtractionOp2
Set pExtractionOp = New RasterExtractionOp

' Get raster dataset
Dim pRas01 As IRaster
Set pRas01 = readRasterFromDisk("c:\data\myRaster1")

Dim pFC01 As IFeatureClass
Set pFC01 = readPointFeatureFromDisk("c:\data\myPts.shp")

' Call extraction method
Dim pOutGeoDS As IGeoDataset
Set pOutGeoDS = pExtractionOp.ExtractValuesToPoints(pFC01, pRas01, True)
0 Kudos
0 Replies