Converting ASCII UK wind speed file to a raster image

4651
18
08-24-2011 07:49 AM
DanielBourne
New Contributor
Hi

Could any body help me convert the UK wind speed file provided by DECC found below to raster from ASCI. I have searched the forums and cant find any solution apart from phython which i dont know how to use, and evrytime i use the Tool in ARCmap it gives an error. Does any body have a solution or the UK wind speed data in raster format

http://www.decc.gov.uk/en/content/cms/meeting_energy/wind/windsp_databas/windsp_databas.aspx

hope someone can help
0 Kudos
18 Replies
EricRice
Esri Regular Contributor
Greetings,

After reading the Windspeed Database Information Sheet I found the section you need...

�??The ETSU NOABL wind speed data is stored in ASCII (text) format. The file format
is ASCII, a simple text format. It may be that there is no dedicated function in any
particular GIS to read this file type.
However, as the file type is simple and readable
by a number of different applications, (eg MS notepad, or Excel) that it should be
possible to import the data. The text file accompanying the ASCII files describes the
file format.�?�

Importing into ArcView
Open your ASCII file in Excel as semi-colon delimited data, delete header line and
first column and then save as a CSV comma delimited file.
Open this in a text editor such as Wordpad and Replace the 'semi-colon+space' with
a 'comma' and then delete carriage return at the end of the file and then add the
new header lines at the top of the file:

ncols 700
nrows 1300
xllcorner 0
yllcorner 0
cellsize 1000

Save it.

Next, in the file manager just delete the ".csv" suffix and replace with ".asc" and it is
ready for Import into ArcView if you turn on the "Spatial Analyst" extension.

My note would be, if you perform these steps, you don't need Spatial Analyst.  ArcGIS reads .asc files as raster datasets assuming they have the header information outlined above.  You will still have to define a spatial reference for the data, but I didn't see any information provided by the data provider as to what it is.    You can see from their instructions that they are basically trying to get you to create an Esri Ascii Raster
0 Kudos
DanielBourne
New Contributor
Hi

I have completed everything you have suggested, and now it accepts the data into ARC as raster but makes the computer freeze. I am unsure of one part of your  walk though;

'Open this in a text editor such as Wordpad and Replace the 'semi-colon+space' with
a 'comma' and then delete carriage return at the end of the file and then add the
new header lines at the top of the file'

the data was already comma separated and I don't know what a carriage return is, could you help me with this

Thanks
Daniel Bourne
0 Kudos
EricRice
Esri Regular Contributor
Hi Daniel,

A carriage return is basically when someone presses the Enter key on the keyboard.  As an example of what they are telling you to do.... Pretend you finished the last paragraph of a paper you were writing; then you hit Enter once,twice, 3 times to create empty lines at the end of the paragraph.  It's those empty lines they want you to delete.  Which can be hard because there isn't anything there for you to see to delete. 

In terms of the data, the file I opened was not comma delimited.  The data I downloaded looks like this.

9.4; 9.6; 8.2; 4.8; 3.5; 6.3; 7.1

So it is semi-colon + space delimited.  They want you to do a find/replace in notepad to make it comma delimited.  If your download was comma already you should be all set and just need to remove the carriage return and add the header.

Even though you shouldn't have to...I'm going to recommend that you run the ASCII to Raster tool once you have completed the steps.

Regards,
Eric
0 Kudos
DanielBourne
New Contributor
Hi

Im still having problems, would it be possible for me to email you my data and you have a look to see what im doing wrong. It makes arc freeze when added and wont convert from ASCII to raster
0 Kudos
EricRice
Esri Regular Contributor
I downloaded the entire database from the website so I have the data.  I have not gone through the steps to get it working; I simply read their instructions and passed on relevant points to you.  I can try to get it working with the data I have and let you know, but to be totally honest and up front with you, I may not get to this problem today.  If you have a deadline or urgent need to get it working I strongly encourage you to go through official channels. i.e. Esri Support or Esri UK Support if you're an international customer in the UK. If you're not in the UK, contact your local distributor.  They should have analyst standing by that can provide immediate support.

I'll do my best to try and get the data working asap.

Eric
0 Kudos
EricRice
Esri Regular Contributor
I am having the same issues as you with this data.  I'm still looking for a solution.  I also don't get why the instructions are telling us to do a find/replace to remove semi-colon + space and put in a comma, when after we save from Excel to CSV it becomes comma delimited.  So I guess we can skip that step.  🙂

I'll keep you posted on any progress I make.

Note: I'm working with the orginal file named Speed10.asc.

Eric
0 Kudos
EricRice
Esri Regular Contributor
Ok, got this one figured out.  We need to delete the comma's and replace with spaces.  I reviewed our own documentation for the Ascii to Raster tool and it basically says the cell values should be delimited by spaces.  When I do that the data comes in fine even without running the Ascii to Raster tool.  Like I said earlier, we support .asc files as raster datasets (when they are formatted properly).  Here is a screenshot of the data.
0 Kudos
AshleyDurston
New Contributor
Hello.

I'm trying to do the same however I am a novice user of ArcGIS. I have tried to follow the steps but I just get completely confused. Are you able to send me the converted raster file or is the file too large?

Many Thanks,
Ashley
0 Kudos
AshleyDurston
New Contributor
Also, I don't understand what you mean when you say use the file manager to delete the file suffix and replace with ASC ??
0 Kudos