laptop and a wrench

漏洞

Fail to get the fullExtent property for a rasterLayer with MosaicDatasetRaster.

上次发布: March 15, 2019 ArcGIS Runtime SDK
漏洞 ID 编号 BUG-000120017
已提交February 12, 2019
上次修改时间June 5, 2024
适用范围ArcGIS Runtime SDK
找到的版本100.4
操作系统N/A
操作系统版本N/A
状态Will Not Be Addressed

附加信息

The code is be written slightly differently. There is an issue in the API if a MosaicDatasetRaster is created from scratch and the same instance cannot be used to create a RasterLayer. A new object must be created. Refer to the following code: 1. Create the MDR: // The Important Part m_inputDirectoryUrl = QDir::toNativeSeparators(QDir::homePath() + "/ArcGIS/Runtime/Data/raster/PPI"); m_mosaicDatasetRaster = MosaicDatasetRaster::create( m_inputDirectoryUrl + "/rasterCollection.sqlite", "rasterCollection", SpatialReference::wgs84()); // create addraster params AddRastersParameters addRastersParameters; addRastersParameters.setInputDirectory(m_inputDirectoryUrl); addRastersParameters.setFilter("tif$"); // Regex filter // add the raster, which is an async call m_mosaicDatasetRaster->addRasters(addRastersParameters); // once the raster is created, create a new mosaic dataset raster (this is a workaround for now until we fix an issue) // create a new rasterlayer and add the newly created mosaic dataset raster and add it to the Scene's o/l // once the raster layer is loaded, zoom to the extent connect(m_mosaicDatasetRaster, &MosaicDatasetRaster::addRastersCompleted, this, [this](QUuid taskId, Error error) { Q_UNUSED(taskId) qDebug() << "addRastersCompleted"; // create a new mosaic dataset raster using the database create earlier MosaicDatasetRaster* newMdr = new MosaicDatasetRaster(m_inputDirectoryUrl + "/rasterCollection.sqlite", "rasterCollection", this); // instantiate the raster layer m_rasterLayer = new RasterLayer(newMdr, this); // once the raster layer is loaded, zoom to the extent connect(m_rasterLayer, &RasterLayer::doneLoading, this, [this]() { m_rasterLayer->setMaxScale(40070.8); m_rasterLayer->setMinScale(2.74574e+07); qDebug() << m_rasterLayer->spatialReference().wkid(); Envelope extent = m_rasterLayer->fullExtent(); qDebug() << "Done loading. Raster layer full extent: " << extent.toJson(); Viewpoint viewPoint(m_rasterLayer->fullExtent()); m_SceneView->setViewpoint(viewPoint); }); connect(m_rasterLayer, &RasterLayer::errorOccurred, this, [this](Error error) { qDebug() << error.message() << error.additionalMessage(); }); // add the raster layer to the Scene m_Scene->operationalLayers()->append(m_rasterLayer); });

重现步骤

漏洞 ID: BUG-000120017

软件:

  • ArcGIS Runtime SDK

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项