SceneView with raster basemap loads really slowly

982
2
11-09-2017 03:41 AM
AnatBen_Israel
New Contributor II

Hi,

I'm working with C++ logic and qml UI.

I used to have a MapView object with a raster basemap (from a local tif file), and everything was OK...

Then  I realized that I needed 3D so I changed the object to SceneView, but almost didn't change anything else (just initial viewpoint). Now the map takes about 1 minute until it's fully loaded and displayed.

I've even tried it with one of the arcgis samples. I took the surface_placement sample, replaced the basemap with my tif file, and it behaves the same. Takes forever...

This is my code:

void Surface_Placement::componentComplete()
{
      QQuickItem::componentComplete();
      m_sceneView = findChild<SceneQuickView*>("sceneView");
      Raster* raster = new Raster("C:/Projects/NewMaps/myMap.tif", this);
      RasterLayer* rasterLayer = new RasterLayer(raster, this);
      Basemap* baseMap = new Basemap(rasterLayer, this);
      Scene* scene = new Scene(baseMap, this);
      Camera camera(32.1283, 34.9078, 1300, 0, 0, 0);
      Viewpoint viewpoint(32.1283, 34.9078, 20000);
      scene->setInitialViewpoint(viewpoint);
      m_sceneView->setArcGISScene(scene);

}

0 Kudos
2 Replies
NorbertThoden
Occasional Contributor III

What is the wkid of the data (C:/Projects/NewMaps/myMap.tif) you are using?

I can imagine that your tif has to be reprojected ...

I would like to suggest using the Topographic.tpk

(found arcgis-runtime-demo-java/Topographic.tpk at master · Esri/arcgis-runtime-demo-java · GitHub)

take care

0 Kudos
AnatBen_Israel
New Contributor II

I'll post my solution in case anyone faces the same problem...

Apparently, a simple raster indeed takes very long to load. In order to speed things up, the raster needs to have statistics and pyramids calculated and located in the same folder (.xm and .ovr files).

These files can be (actually must be, as much as I understand) created using ArcGIS Pro.