converting ascii to raster - Failed to rename the specified file

397 views
Skip to first unread message

tmar...@gmail.com

unread,
Aug 9, 2009, 12:37:10 PM8/9/09
to Maxent
I am trying to convert maxent ouput ASCII files to rasters and keep
getting the following error. I have tried doing it one by one using
the conversion>to raster>ascii to raster and also by using the toolkit
that I found here.

ERROR 999999: Error executing function.
Failed to rename the specified file

the file names are shorter than 13 characters, I renamed the ascii
files after I got them from maxent.

Anyone have any ideas??

Many thanks!
Tamar

Alvar Carranza

unread,
Aug 9, 2009, 12:41:48 PM8/9/09
to Max...@googlegroups.com
Are you using the ASCII to RASTER option in ArcView? Take care of
FLOAT/INTEGER issues; if you are trying to convert a logistic ASCII
file you MUST use the FLOAT option...

best

Alvar
--
Msc. Alvar Carranza
UNDECIMAR
Facultad de Ciencias, Universidad de la República
Iguá 4225
CP 11440
Montevideo, Uruguay
http://alvar.carranza.googlepages.com

tmar...@gmail.com

unread,
Aug 9, 2009, 12:59:25 PM8/9/09
to Maxent
I have been using the float option. I wish that was the answer...

Tamar
> Montevideo, Uruguayhttp://alvar.carranza.googlepages.com- Hide quoted text -
>
> - Show quoted text -

Marnin Wolfe

unread,
Aug 9, 2009, 4:57:33 PM8/9/09
to Max...@googlegroups.com
Tamar,

I have had this problem. I cannot explain why this fixes it, but I found that this happens when I try to save the raster in a different location from the ASCII. Or it could happen if there is already a file with the same name in the folder you are trying to save to. One solution would be to save it to the same folder and then later manually copy the new raster to your favorite folder and add it to your map again.

Hope that is helpful,

Marnin
--
Marnin Wolfe
University of Pittsburgh
Department of Biological Sciences
Ecology & Evolution Program
wol...@gmail.com (or)
md...@pitt.edu
239-595-5081

Mithoefer, Klaus

unread,
Aug 10, 2009, 2:05:51 AM8/10/09
to Max...@googlegroups.com
Hi Tamar,

Have a look at the header of your file. There was recently someone where
the header was somehow wrong. It should look similar to this:

ncols 539
nrows 439
xllcorner -25.833325292915
yllcorner -35.333332046866
cellsize 0.16666667535901
NODATA_value -9999
....[values]

If the header is somehow different either correct it or try use gdal for
data conversion.

Best regards,

Klaus

tmar...@gmail.com

unread,
Aug 10, 2009, 3:04:51 AM8/10/09
to Maxent
Hi everyone -

Many thanks for the ideas!
For some reason (which maybe I will inderstand when I am old and wise)
it just started working even though I was doing exactly the same
thing.

I have no clue why, but at least I have my rasters and I have saved
this chain for the next round...

Thanks again!
Tamar
> Tamar- Hide quoted text -

Andrew Davies

unread,
Aug 11, 2009, 5:03:02 AM8/11/09
to Maxent
Hi all,

I too have this problem, only when working with large grids. It
appears to come from a file lock in ArcGIS or that you have a number
as the first character of your output file name. If changing location
or filename don't work for you then I have used a workaround to make
it happen by following this protocol:

1) Use FWTools, gdal_translate to convert your original ASC to a new
ASC.. (Don't ask why, but it works).
gdaltranslate.exe -of AAIGrid input.asc output.asc

2) Use ASCIITORaster in ArcGIS to convert to grid, it is good practice
to change the file location to anything other than the source.

ASCIITORaster input.asc raster FLOAT

Best,
Andy

Reply all
Reply to author
Forward
0 new messages