You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Geoprocessing Scripting (Python, JavaScript, VB) forum

Extract Values to Points Error 010092: Inv...   james manzione Feb 11, 2010
Re: Extract Values to Points Error 010092:...   james manzione Feb 11, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Extract Values to Points Error 010092: Invalid Extent 
Author james manzione 
Date Feb 11, 2010 
Message Greetings all,

I have been stumped on this one all day and am hoping for your insight.

I have a VB Script that calls the iExtractionOp.ExtractValuesToPoints

When running, I experience an "Error 010092: Invalid Output Extent".

Research on this error indicates that there may be an issue with the input extents matching up (ie. that the Point Extent is outside of the Raster extent) or that there is a limit to the extents within the Environments.

To resolve the matter of inconsistent extents, the Points were previously created by a clip of the Raster (meaning no Points exceed the mask of the Raster).

In addition, the Environments -> General -> Extent was set to default (as recommended by ESRI).

I appreciate any response, and will be more than happy to answer any questions. I know this issue has been around the ESRI Forums, so with a little help we maybe able to resolve this matter once and for all.

- James 
Public Function BA_ExtractValuesToPoint(InputRasterPath As String, InputRasterName, ShapefilePath As String, _
             ShapefileName As String) As Integer
 'Open Raster
 Dim pRWS As IRasterWorkspace
 Dim pWSF As IWorkspaceFactory
 Set pWSF = New RasterWorkspaceFactory
 Set pRWS = pWSF.OpenFromFile(InputRasterPath, 0)
 Dim pDEMRaster As IRaster
 Dim pGDS As IGeoDataset
 Set pDEMRaster = New Raster
 Set pDEMRaster = pRWS.OpenRasterDataset(InputRasterName).CreateDefaultRaster
 'Open Shapefile
 Dim pFeatureClass As IFeatureClass
 Set pFeatureClass = BA_OpenFeatureClassFromFile(ShapefilePath, ShapefileName)
 'Determine if All Ready Has RasterValue
 Dim DoesFieldExists As Boolean
 DoesFieldExists = BA_IfHasField(pFeatureClass, "RASTERVALU")
 If DoesFieldExists = False Then
     ' Execute Extract Values to Point Function
     Dim pExtractionOp As IExtractionOp2
     Set pExtractionOp = New RasterExtractionOp
     Dim ExtractedGDS As IGeoDataset
     Set ExtractedGDS = pExtractionOp.ExtractValuesToPoints(pFeatureClass, pDEMRaster, True, False)
     'Remove and Delete Shapefile
     Dim response As Integer
     Set pFeatureClass = Nothing
     response = BA_RemoveLayersInFolder(ShapefilePath)
     response = BA_Remove_Shapefile(ShapefilePath, ShapefileName)
     'Add Raster Value to Existing Field
     Set pFeatureClass = ExtractedGDS
     Dim pDataset As IDataset
     Set pDataset = pFeatureClass
     Dim pWS As IFeatureWorkspace
     Set pWSF = New ShapefileWorkspaceFactory
     Set pWS = pWSF.OpenFromFile(AOIFolderBase, 0)
     Dim CreateFC As IFeatureClass
     Set CreateFC = pDataset.Copy(ShapefileName, pWS)
 End If
 BA_ExtractValuesToPoint = 1

End Function
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Extract Values to Points Error 010092: Invalid Extent 
Author james manzione 
Date Feb 11, 2010 
Message In addition, there are no spaces found in the paths directing to the Raster or the Shapefile.

Thanks again,

- James