ThinkGeo.com    |     Documentation    |     Premium Support

Arc\Info ASCII grid

Anyone has any ideas how to load an Arc\Info ASCII grid?
I am using the following code:
GdalRasterLayer grl = new GdalRasterLayer(@“C:!Daniel\MNR\ZDT\Simulations\Raster Files\bp10k.txt”);
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add(“Grid View”, grl);
winformsMap1.Overlays.Add(staticOverlay);
// Draw the map.
winformsMap1.Refresh();

I am attaching the example file to this post.
bp10k.txt (65.8 KB)

Hi Daniel,

The format can be supported by GdalRasterLayer, you can invoke GdalRasterLayer as following statements:

            winformsMap1.MapUnit = GeographyUnit.Meter;

        GdalRasterLayer rasterLayer = new GdalRasterLayer(@"C:\Temp\bp10k.txt");
        rasterLayer.Open();
        RectangleShape rect = rasterLayer.GetBoundingBox();
        winformsMap1.CurrentExtent = rect;
        LayerOverlay overlay = new LayerOverlay();
        overlay.Layers.Add(rasterLayer);

        winformsMap1.Overlays.Add(overlay);
        winformsMap1.Refresh();

Thanks,

Don,
Thanks for your sample code. I realized I did not have the MapSuiteFdoExtensionX64 files copied to the System32. After I did this all was good. I have a couple more questions.

  1. Is there a way to colorized class breaks. At the moment is showing an ugly black and white grid. [image][1]
    [1]: http://screencast.com/t/cr0uPa39LYp I would like to see something more like this [image][2] [2]: http://screencast.com/t/m2e6W1g5Rj with a legend.

  2. could you let me know what tools I could use to select a region on the map and then reclassify the selected area?

  3. In the NativeTabFileSupport example, there is a save option. Do you think something similar can be implemented for the ASCII Grid format?

Please let me know if this is something that I need to discuss with the dev team.

Regards,
Daniel

Hi Daniel_Kaminski,

Thanks for your questions.

The colorized class breaks feature is a new feature for us, so it’s not supported by “MapSuiteFdoExtension”.

But I think it can be supported if we research a period of time. Support it and edit an arc/info file mentioned in your other two questions, they should be professional services, so you can contact sales@thinkgeo.com for detail, so that we can make some formal new features development.

Thank,

Thanks Don. I will get in touch with Dev team and see what they say about my requests.

Regards,

Hi Daniel_Kaminski,

Any update please feel free to let us know.

Regards,

Don