*. asc files

Oct 14, 2011 at 8:58 PM

Is there a way to load an ascii file ( http://en.wikipedia.org/wiki/Esri_grid)  in map control in latest dotspatial?

I get a file type not supported exception. Did exactly as described on tutorial 9.

I am using dotspatial compiled from source  (DotSpatial_30553bf90d17)

Any help is welcome as I do not know what to do...

Developer
Oct 14, 2011 at 9:40 PM

If you just drop the file into DemoMap, does it open?

Oct 14, 2011 at 9:44 PM

No a message box pops up saying that it is not a file with valid data type for the map

Developer
Oct 14, 2011 at 10:44 PM

"When you download the framework or the project, before unzipping the archive, right click on the .zip file and hit Properties. You should see a button near the bottom that says "Unblock" - click this and close.

Proceed unzipping the file, adding the libraries and such, and all should be well.

Oct 14, 2011 at 11:59 PM
Edited Oct 15, 2011 at 12:03 AM

Thank you for your feedback,

did as you said but I get the following exception:

GetBlockRef failed at X block offset 0, Y block offset 53

This is for DotSpatial 0.11.9.6 release. For daily builds I do not have the option to open an *.asc file

 

map1.AddRasterLayer();

 

is the syntax I am using. Am I wrong?

As for the demoMap app it is saying  that "one or more files was not a valid data type for the map" for 0.11.9.6 release

Oct 16, 2011 at 11:51 AM

Still the same with latest release.

Developer
Oct 17, 2011 at 5:29 PM

"one or more files was not a valid data type for the map" means that the GDAL plugin isn't loaded. It sounds like once it is loaded you get "GetBlockRef failed at X block offset 0, Y block offset 53"

There might be something about that file that isn't as expected. Does it load in MapWindow 4.8?

Oct 18, 2011 at 11:41 PM

Yes it does. And there is no problem at all. Any alternatives on loading the GDAL in my project? Apart from copying Data Extensions Folder in Debug Folder?

The fact is that the extension they have is .txt  (I do not know why) and I rename them to .asc  But still there have the structure that is described here ( http://en.wikipedia.org/wiki/Esri_grid). According to this procedure they are loaded normally in MapWindow version 4.8 R3 (4.8.4). Please help.

Developer
Oct 20, 2011 at 5:30 AM

I tried to open an .asc file in DemoMap (using demoMap in the latest release) and it opens correctly. Could you send us the file so that we can examine the issue?

(You can go to the "Issue Tracker" page, create a new item and attach the .asc file)

Jiri

Oct 20, 2011 at 6:14 PM

I would love to do so, but as my work is part of a larger project, I must have authorization to upload the file.