<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Loaded Raster Layer has a null WKID in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330775#M5046</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Non-common transformations are supported using projection engine data. All details are explained here&amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/spatial-and-data-analysis/spatial-references/" target="_blank"&gt;https://developers.arcgis.com/qt/spatial-and-data-analysis/spatial-references/&lt;/A&gt;&amp;nbsp;and you can download data here&amp;nbsp;&lt;A href="https://developers.arcgis.com/downloads/#pedata" target="_blank"&gt;https://developers.arcgis.com/downloads/#pedata&lt;/A&gt;.&lt;BR /&gt;You can use `TransformationCatalog::setProjectionEngineDirectory`&amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-transformationcatalog.html#setProjectionEngineDirectory" target="_blank"&gt;https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-transformationcatalog.html#setProjectionEngineDirectory&lt;/A&gt;&amp;nbsp;to set the path to transformation data.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;const QString dataPath {"path/to/Projection_Engine_Data_200_2_0/pedata"};
TransformationCatalog::setProjectionEngineDirectory(dataPath);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 18:54:31 GMT</pubDate>
    <dc:creator>GuillaumeBelz</dc:creator>
    <dc:date>2023-09-20T18:54:31Z</dc:date>
    <item>
      <title>Loaded Raster Layer has a null WKID</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1329653#M5038</link>
      <description>&lt;P&gt;I'm using following geotiff raster layer sample dataset:&amp;nbsp;&lt;A href="https://www.swisstopo.admin.ch/en/geodata/height/alti3d.html#musterdaten" target="_blank" rel="noopener"&gt;swissALTI3D sample data - swisstopo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Direct download link:&amp;nbsp;&lt;A href="https://cms.geo.admin.ch/Topo/swissalti3d/swissalti3dgeotifflv95.zip" target="_blank" rel="noopener"&gt;https://cms.geo.admin.ch/Topo/swissalti3d/swissalti3dgeotifflv95.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would like to show this raster layer on top of a basemap. I initialize both like this, with 2056 being the spatial reference system the raster layer is based upon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;m_map = new Map(SpatialReference(2056), this);

QUrl imageLayerUrl("https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
auto baseLayer = new ArcGISMapImageLayer(imageLayerUrl, this);
auto basemap = new Basemap(baseLayer, this);
m_map-&amp;gt;setBasemap(basemap);

const QString filepath =
	defaultDataPath() + "/ArcGIS/Runtime/Data/raster/SWISSALTI3D_TIFF_CHLV95_LN02/0.5m/SWISSALTI3D_0.5_TIFF_CHLV95_LN02_2600_1196.tif";
Raster* raster = new Raster(filepath, this);
m_rasterLayer = new RasterLayer(raster, this);

m_map-&amp;gt;operationalLayers()-&amp;gt;append(m_rasterLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resulting map only shows the basemap and not the added raster layer. The raster layer does not report any errors.&lt;/P&gt;&lt;P&gt;When I do not load the basemap then the raster layer is visible.&lt;/P&gt;&lt;P&gt;When I log the raster layer's fullExtent its json representation looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// auto envelope = m_rasterLayer-&amp;gt;fullExtent();
// qDebug() &amp;lt;&amp;lt; envelope.toJson();
{
    "xmin": -0.5,
    "ymin": -6999.5,
    "xmax": 6999.5,
    "ymax": 0.5,
    "spatialReference": {
        "wkid": null
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;implying that there's an issue with the raster layer's spatial reference.&lt;/P&gt;&lt;P&gt;I can load this raster layer perfectly into ArcGIS Pro where it automatically gets the correct spatial reference.&lt;BR /&gt;Does anyone have a clue on what I might be doing wrong here?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 15:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1329653#M5038</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2023-09-18T15:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loaded Raster Layer has a null WKID</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330009#M5040</link>
      <description>&lt;P&gt;The raster layer's `aux.xml` looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;PAMDataset&amp;gt;
  &amp;lt;PAMRasterBand band="1"&amp;gt;
    &amp;lt;Histograms&amp;gt;
      &amp;lt;HistItem&amp;gt;
        &amp;lt;HistMin&amp;gt;621.4437255859375&amp;lt;/HistMin&amp;gt;
        &amp;lt;HistMax&amp;gt;858.3682250976563&amp;lt;/HistMax&amp;gt;
        &amp;lt;BucketCount&amp;gt;256&amp;lt;/BucketCount&amp;gt;
        &amp;lt;IncludeOutOfRange&amp;gt;1&amp;lt;/IncludeOutOfRange&amp;gt;
        &amp;lt;Approximate&amp;gt;0&amp;lt;/Approximate&amp;gt;
        &amp;lt;HistCounts&amp;gt;301|396|404|416|436|452|472|476|490[...]&amp;lt;/HistCounts&amp;gt;
      &amp;lt;/HistItem&amp;gt;
    &amp;lt;/Histograms&amp;gt;
  &amp;lt;/PAMRasterBand&amp;gt;
&amp;lt;/PAMDataset&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could it be that unlike ArcGIS Pro the ArcGIS Maps SDK requires a `SRS` node in the auxiliary file as seen here &lt;A href="https://gist.github.com/nixta/9cf3b53e3340dc3314c6db40af06c709" target="_blank" rel="noopener"&gt;Showing a georeferenced local raster · GitHub&lt;/A&gt;?` When I add a `SRS`, the raster layer is displayed on the map...&lt;/P&gt;&lt;P&gt;If so, how do I get the correct value for this `SRS` node into the auxiliary file? Can ArcGIS Pro generate it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 07:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330009#M5040</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2023-09-19T07:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loaded Raster Layer has a null WKID</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330103#M5041</link>
      <description>&lt;P&gt;I found the corresponding .prj file here&amp;nbsp;&lt;A href="https://spatialreference.org/ref/epsg/ch1903-lv95/" target="_blank" rel="noopener"&gt;spatialreference.org | EPSG:2056&lt;/A&gt;&amp;nbsp;which I can use to add the SRS node to the auxiliary file. This seems to work.&lt;/P&gt;&lt;P&gt;However, when I use ArcGIS Pro to create a mappackage from this raster layer and try to load and display the mappackage, the raster layer again is not shown, again with its fullExtend having a null WKID. Other layers such as a graphics layer from the mappack are shown no problem...&lt;/P&gt;&lt;P&gt;Following is a log of the map's and the raster layer's properties:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;MapView WKID: 2056
Map WKID: 2056
Operational "SWISSALTI3D_TIFF_CHLV95_ZURICH_2m" WKID: 0 LayerType: LayerType::RasterLayer Extent: {"xmin":-0.5,"ymin":-6999.5,"xmax":6999.5,"ymax":0.5,"spatialReference":{"wkid":null}}
Operational "Graphics Layer" WKID: 2056 LayerType: LayerType::FeatureCollectionLayer Extent: {"xmin":2684671,"ymin":1250214,"xmax":2690057,"ymax":1255309,"spatialReference":{"wkid":2056}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 13:28:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330103#M5041</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2023-09-19T13:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loaded Raster Layer has a null WKID</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330718#M5044</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I can reproduce the problem with raster layer. I'm investigating and I'll come back.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 16:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330718#M5044</guid>
      <dc:creator>GuillaumeBelz</dc:creator>
      <dc:date>2023-09-20T16:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loaded Raster Layer has a null WKID</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330775#M5046</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Non-common transformations are supported using projection engine data. All details are explained here&amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/spatial-and-data-analysis/spatial-references/" target="_blank"&gt;https://developers.arcgis.com/qt/spatial-and-data-analysis/spatial-references/&lt;/A&gt;&amp;nbsp;and you can download data here&amp;nbsp;&lt;A href="https://developers.arcgis.com/downloads/#pedata" target="_blank"&gt;https://developers.arcgis.com/downloads/#pedata&lt;/A&gt;.&lt;BR /&gt;You can use `TransformationCatalog::setProjectionEngineDirectory`&amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-transformationcatalog.html#setProjectionEngineDirectory" target="_blank"&gt;https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-transformationcatalog.html#setProjectionEngineDirectory&lt;/A&gt;&amp;nbsp;to set the path to transformation data.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;const QString dataPath {"path/to/Projection_Engine_Data_200_2_0/pedata"};
TransformationCatalog::setProjectionEngineDirectory(dataPath);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 18:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/loaded-raster-layer-has-a-null-wkid/m-p/1330775#M5046</guid>
      <dc:creator>GuillaumeBelz</dc:creator>
      <dc:date>2023-09-20T18:54:31Z</dc:date>
    </item>
  </channel>
</rss>

