Select to view content in your preferred language

Load offline ECW raster in local server

1263
3
Jump to solution
08-10-2021 10:13 AM
TasawarAhmad
Occasional Contributor

Hi, 
I am using arcgis local server to load map from map service.  
Now I have some substantially large offline ecw files which I need to add as layer on that loaded map. I have tried the below code with online raster file. How can I achieve this same functionality with offline ecw files placed in my computer using local server preferably?

Additionally I have edited my ARCGIS deployment file to accept ProECWRasters. 

 

 

 ImageServiceRaster imageServiceRaster = new ImageServiceRaster(new Uri("https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer"));
await imageServiceRaster .LoadAsync();             
RasterLayer rasterLayer = new RasterLayer(imageServiceRaster);
await rasterLayer.LoadAsync();
Map.OperationalLayers.Add(rasterLayer);
MainMapView.Map = Map;

 

 

 

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

Hi,

For raster datasets in ECW format, it is still necessary to use the Local Server component because it's not one of the formats supported for direct read by the API.

Local Server does not provide an equivalent ImageServer endpoint, therefore to access raster dataset via Local Server you can use the dynamic workspace approach shown in this sample: https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/v100.7.0/src/WPF/ArcGISRuntime.WPF.Viewer....

View solution in original post

3 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

For raster datasets in ECW format, it is still necessary to use the Local Server component because it's not one of the formats supported for direct read by the API.

Local Server does not provide an equivalent ImageServer endpoint, therefore to access raster dataset via Local Server you can use the dynamic workspace approach shown in this sample: https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/v100.7.0/src/WPF/ArcGISRuntime.WPF.Viewer....

TasawarAhmad
Occasional Contributor

Thanks a lot! 
Now I have been able to load ecw in my application. 😀

For anyone else, make sure you are using blank map in local map service.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

That's great news.

It shouldn't need to be an empty map package, but that's a cleaner way to do it. Ideally the spatial references of your data, map package (local map service), and mapview are the same to avoid the overhead of any dynamic reprojection. But the local server will reproject on-the-fly if needed.