[GRASSLIST:6628] Re: Grass GIS and Fragstats on Linux!

Sander Oom slist at oomvanlieshout.net
Tue Apr 26 11:53:22 EDT 2005

Hi Paolo,

Fair point about CrossOver Office. I tried Wine for quite some time, but 
found it to fiddly. I find CrossOver worth the money as it makes running 
Windows software a lot simpler. Moreover, not all things have to be 
free. Paying for CrossOver Office directly contributes to the 
development of Wine.

I will send Moritz a test grid and see how Fragstats works on Wine!

I agree that in the long run something closer to Grass is preferable! 
Fragstats and r.le are options, but it might also be worthwhile to 
contact the people behind IAN and its predecessor Apack 
(http://landscape.forest.wisc.edu/projects/, bdezonia at wisc.edu). Not 
sure where the bets 'fit' is between Grass and R, but heavy duty 
landscape indices work should probably be done in Grass. However there 
is a great push for spatial classes in R!

Nice to see common goals and much progress!



Paolo Cavallini wrote:
> Good new - thanks Sander.
> However, AFAIK Crossover Office is not free software. It would therefore be 
> important to check if Fragstats works under wine.
> In the long term, we should see if it's possible to either port Fragstats 
> under linux, integrate it more closely with grass, and/or rewrite r.le.
> All the best.
> pc
> At 10:55, martedì 26 aprile 2005, Sander Oom has probably written:
>>Dear Fragstats and Grass GIS users,
>>To my pleasant surprise I have successfully run Fragstats on a Linux
>>machine in conjunction with my Grass GIS database.
>>I tried the landscape index tools r.le within Grass, but ran into
>>several problems (see earlier posts on the Grass mailing list). Than I
>>started looking for an alternative. Fragstats is a powerful and well
>>tested program, but it is only available for Windows.
>>However, when running the Fragstats setup program using CrossOver Office
>>on my Linux machine, the installer finished without any errors! I have
>>tried several options and methods and have not seen the program crash
>>yet! I guess the success is a result of the combination of the little
>>dependency of Fragstats on odd windows dll's and the progress made in
>>the Wine project, the basis for CrossOver Office. I have not tested
>>Fragstats on Wine.
>>Below you find the Grass code to prepare your data for Fragstats. I used
>>the Albers Equal Area projection to prepare my rasters. Using sed (Linux
>>utility) I removed the header from the exported ascii file. Fragstats
>>only wants the points. I put the header content in a file called
>>'asc_header_aea.txt' so I could paste it back in later, as Fragstats
>>returns exactly the same grid of points. Fragstats creates a new folder
>>with an ascii grid (no header nor an extension!) for each index
>>calculated, so I wrote a loop to go through the files, add the header
>>and read the result into Grass. Then I queried the raster with a points
>>vector and exported the results to a text file.
>>Hope this is helpful for other Grass/Linux users!

Dr. Sander P. Oom
Animal, Plant and Environmental Sciences,
University of the Witwatersrand
Private Bag 3, Wits 2050, South Africa
Tel (work)      +27 (0)11 717 64 04
Tel (home)      +27 (0)18 297 44 51
Fax             +27 (0)18 299 24 64
Email   sander at oomvanlieshout.net
Web     www.oomvanlieshout.net/sander

More information about the grass-user mailing list