<?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 How to Load Multidimensional Raster Layer via C# in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-load-multidimensional-raster-layer-via-c/m-p/1272744#M9578</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have created a raster layer programmatically by loading in a netCDF file into a RasterDataset and then creating a ClassifyColorizerDefinition. I use these to create the raster layer from a LayerFactory after targeting the file URI.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am noticing that when loading in this raster layer, the data is not handled the same way it is in the Add Data &amp;gt; "Multidimensional Raster Layer" tool. I need to programmatically load in each array from the NetCDF file as it's own layer. Would anyone know how to accomplish this or tell me if I am looking in the wrong direction?&amp;nbsp;&lt;/SPAN&gt;I am using the&amp;nbsp;&lt;STRONG&gt;ArcGIS Pro 3.0 SDK&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for&amp;nbsp;&lt;STRONG&gt;C#&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            await QueuedTask.Run(async () =&amp;gt;
            {
                // Create a FileSystemConnectionPath using the folder path.
                FileSystemConnectionPath connectionPath = new FileSystemConnectionPath(new Uri(run), FileSystemDatastoreType.Raster);
                // Create a new FileSystemDatastore using the FileSystemConnectionPath.
                FileSystemDatastore dataStore = new FileSystemDatastore(connectionPath);
                // Open the raster dataset.
                RasterDataset fileRasterDataset = dataStore.OpenDataset&amp;lt;RasterDataset&amp;gt;(scenario + ".nc");

                // Colormap
                ClassifyColorizerDefinition avocado = new ClassifyColorizerDefinition("Pressures", 4, ClassificationMethod.Manual, colorRamp);

                var rasterLayerCreationParams = new RasterLayerCreationParams(fileRasterDataset)
                {
                    ColorizerDefinition = avocado,
                    Name = scenario,
                    MapMemberIndex = 0
                };

                RasterLayer rasterLayerfromURL =
                    LayerFactory.Instance.CreateLayer&amp;lt;RasterLayer&amp;gt;(rasterLayerCreationParams, MapView.Active.Map);
                mapView.AddOverlay(rasterLayerfromURL, 0, SymbolFactory.Instance.ConstructPolygonSymbol(
                    ColorFactory.Instance.BlueRGB).MakeSymbolReference());
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2023 20:24:50 GMT</pubDate>
    <dc:creator>imcgon</dc:creator>
    <dc:date>2023-03-28T20:24:50Z</dc:date>
    <item>
      <title>How to Load Multidimensional Raster Layer via C#</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-load-multidimensional-raster-layer-via-c/m-p/1272744#M9578</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have created a raster layer programmatically by loading in a netCDF file into a RasterDataset and then creating a ClassifyColorizerDefinition. I use these to create the raster layer from a LayerFactory after targeting the file URI.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am noticing that when loading in this raster layer, the data is not handled the same way it is in the Add Data &amp;gt; "Multidimensional Raster Layer" tool. I need to programmatically load in each array from the NetCDF file as it's own layer. Would anyone know how to accomplish this or tell me if I am looking in the wrong direction?&amp;nbsp;&lt;/SPAN&gt;I am using the&amp;nbsp;&lt;STRONG&gt;ArcGIS Pro 3.0 SDK&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for&amp;nbsp;&lt;STRONG&gt;C#&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            await QueuedTask.Run(async () =&amp;gt;
            {
                // Create a FileSystemConnectionPath using the folder path.
                FileSystemConnectionPath connectionPath = new FileSystemConnectionPath(new Uri(run), FileSystemDatastoreType.Raster);
                // Create a new FileSystemDatastore using the FileSystemConnectionPath.
                FileSystemDatastore dataStore = new FileSystemDatastore(connectionPath);
                // Open the raster dataset.
                RasterDataset fileRasterDataset = dataStore.OpenDataset&amp;lt;RasterDataset&amp;gt;(scenario + ".nc");

                // Colormap
                ClassifyColorizerDefinition avocado = new ClassifyColorizerDefinition("Pressures", 4, ClassificationMethod.Manual, colorRamp);

                var rasterLayerCreationParams = new RasterLayerCreationParams(fileRasterDataset)
                {
                    ColorizerDefinition = avocado,
                    Name = scenario,
                    MapMemberIndex = 0
                };

                RasterLayer rasterLayerfromURL =
                    LayerFactory.Instance.CreateLayer&amp;lt;RasterLayer&amp;gt;(rasterLayerCreationParams, MapView.Active.Map);
                mapView.AddOverlay(rasterLayerfromURL, 0, SymbolFactory.Instance.ConstructPolygonSymbol(
                    ColorFactory.Instance.BlueRGB).MakeSymbolReference());
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 20:24:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-load-multidimensional-raster-layer-via-c/m-p/1272744#M9578</guid>
      <dc:creator>imcgon</dc:creator>
      <dc:date>2023-03-28T20:24:50Z</dc:date>
    </item>
  </channel>
</rss>

