laptop and a wrench

漏洞

IExtractionOp::Rectangle or Polygon returns the incorrect extent on the resulting geodataset.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM011634
已提交September 12, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
编程语言All
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

Using IRasterProps::Extent and then saving out the resulting raster with modified extentSub ImageClip()Dim pDoc As IMxDocumentDim pEnv As IEnvelopeSet pDoc = Application.DocumentDim pMap As IMapSet pMap = pDoc.FocusMapDim pGCS As IGraphicsContainerSelectSet pGCS = pMapDim pElement As IElementSet pElement = pGCS.SelectedElement(0)Set pEnv = pElement.Geometry.EnvelopeDim pRaster As IRasterDim pLayer As ILayerSet pLayer = pDoc.FocusMap.Layer(1) ' Image is second layer in the map' If pLayer in not a raster layer then exitIf Not TypeOf pLayer Is IRasterLayer Then Exit SubDim pRasterLayer As IRasterLayerSet pRasterLayer = pLayerSet pRaster = pRasterLayer.Raster' Get Raster from RasterLayerSet pRaster = pRasterLayer.RasterDim pProp As IRasterPropsSet pProp = pRasterDim pDataSet2 As IDatasetDim pGeoDataset As IGeoDataset2' Clip the raster to the extent of the graphicpProp.Extent = pEnv' Save the clip to a new raster datasetDim pDataset As IDatasetSet pDataset = pLayerDim pWS As IWorkspaceSet pWS = pDataset.WorkspaceDim pSaveAS As ISaveAsSet pSaveAS = pProp 'pRaster'Dim pDataSet2 As IDatasetSet pDataSet2 = pSaveAS.SaveAs("test.jpg", pWS, "JPG")Set pGeoDataset = pDataSet2Debug.Print pGeoDataset.Extent.XMin & " - " & pGeoDataset.Extent.XMaxEnd Sub

重现步骤

漏洞 ID: NIM011634

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项