laptop and a wrench

Bogue

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

Dernière publication: March 15, 2019 ArcGIS Runtime SDK
Numéro d’ID de bogue BUG-000120017
EnvoiFebruary 12, 2019
Dernière modificationJune 5, 2024
S’applique àArcGIS Runtime SDK
Version trouvée100.4
Système d’exploitationN/A
Version du système d’exploitationN/A
StatutWill Not Be Addressed

Informations supplémentaires

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); });

Étapes pour reproduire

ID de bogue: BUG-000120017

Logiciel:

  • ArcGIS Runtime SDK

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement