开发者

In ESRI engine application (C#), how to add a raster layer with tiles and pyramids

开发者 https://www.devze.com 2023-03-11 03:32 出处:网络
I\'m using ESRI, working on a windows form applicaion using C# I have a raster layer with 4 tiles, and I\'ve created pyramids for this layer.

I'm using ESRI, working on a windows form applicaion using C# I have a raster layer with 4 tiles, and I've created pyramids for this layer. The raster layer is in the folder "C:/Map", this folder contains 8 other sub-folders, called "pyramid0_1", "pyramid2_1", "pyramid4_1", "pyramid8_1"...."pyramid128_1" I'm trying to add the layer to a map control, but when trying to add the layer, I only succeed in adding it from one pyramid level.

This is my code:

IWorkspaceFactory wf = new RasterWorkspaceFacoryClass();
IRasterWorkspace workspace = wf.OpenFromFile("C:/Map/pyramid0_1", 0)
IEnumDataset enumDS = workspace.get_Datasets(esriDatasetType.esriDTAny)

I then iterate over the enumDS (which contain 4 layers) and add each layer to the map control.

I've tried changing the folder I开发者_开发百科 send to wf.OpenFromFile() to "C:/Map", but when I tried it, the enumDS I got was empty.

Is there a way to add the entire raster layer to the map control, and let ESRI do their calculation and use the correct pyramid level for each draw according to the requested scale?

Thanks a lot for your help!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号