[winGRASS] Problem displaying raster data on Wingrass

Mike Thomas miketh at brisbane.paradigmgeo.com
Thu Aug 1 21:32:02 EDT 2002


Hi Ross.


THE PROBLEM

My understanding is that you:

1. imported the data from "dtm.asc" into the site file "points.dtm" using "s.in.ascii", then 

2. with "s.surf.rst" produced an FCELL map called "elevation.dtm" from that new site file, and

3. were unable to display either "elevation.dtm" or another image file "cape.img", because of error messages about compression.


PROBABLE CAUSE

I believe that this is caused by one or both of the following problems:

1. your Grass data drive being mounted in text mode rather than binary mode and/or,

2. the points.dtm file you have uses Windows style line endings (possibly caused by WinZip, possibly caused by your default Cygwin text file setting from setup time), and in turn possibly causing problems for Grass which very Unixy.


THE GOOD NEWS

Here is what I did to make and display a new elevation raster from the raw data you sent.  

First note that I was running the native Windows Grass5 Pre-Release 5 under the latest web install Cygwin using Unix text files by default (set this when running the Cygwin setup program) and that I ensured that my data drives were mounted as binary.


1. I started bash and executed:
   
  cd /cygdrive/g/grass5.0.0pre5/
 
This is significant because by using a full Unix style path name I am automatically ensuring that the drive will be mounted in binary mode.  If I had used "g:/grass/..." instead this might have been different depending on the mount table.


2. Started Grass.

Likewise I fed a complete Cygwin path name into the Grass startup screen.


3.  I processed your raw data file "dtm.asc" as follows (apologies for wrapped line endings, interspersed comments etc):

-----------------------------------------------------------
GRASS:/cygdrive/g/grass5.0.0pre5 > s.in.ascii sites=p.dtm input=/cygdrive/g/data/grass5/Cape/dtm.asc d=2 fs=space


-----------------------------------------------------------
GRASS:/cygdrive/g/grass5.0.0pre5 > d.mon start=x0; d.mon select=x0
Socket is already in use or not accepting connections.
Use d.mon to select a monitor
Problem selecting x0. Will try once more


-----------------------------------------------------------
GRASS:/cygdrive/g/grass5.0.0pre5 > d.sites type=+ sitefile=p.dtm color=yellow size=3

Your "points.dtm" won't display for me because it has the wrong kind of line endings, BUT, my new "p.dtm" displays fine.




-----------------------------------------------------------
GRASS:/cygdrive/g/grass5.0.0pre5 > s.surf.rst input=p.dtm elev=e.dtm field=1

Authors: original version L.Mitas, H.Mitasova
         GRASS implementation I.Kosinovsky, D.P.Gerdes
see references in manual page or at:
http://www2.gis.uiuc.edu:2280/modviz/papers/listsj.html

Warning: strip exists with insufficient data

The number of points in sites file is 864
The number of points outside of region 0
The number of points being used (after reduction) is 864

Processing all selected output files
will require 240640 bytes of disk space for temp files

 100%
Percent complete: history initiated


-----------------------------------------------------------

GRASS:/cygdrive/g/grass5.0.0pre5 > d.rast e.dtm
 100%

This new "e.dtm" displays perfectly, whereas your "elevation.dtm does not, with the same errors you were getting.


-----------------------------------------------------------

I will separately forward the new project files to you with the new file "e.dtm" I generated.  Please let us know how you go.

Cheers

Mike Thomas.

-----------------------------------------------------------

  ----- Original Message ----- 
  From: Ross Rozendaal 
  To: miketh at brisbane.paradigmgeo.com 
  Sent: Thursday, August 01, 2002 7:04 PM
  Subject: Re: [winGRASS] Problem displaying raster data on Wingrass 


  Hi Mike,
  Thanks for your response. I hope you can help me find a solution. Below is a description of what I did:

  I have imported a list of points as sites and they seem to work fine. I can dsiplay them using the command:
    d.sites type=+ sitefile=points.dtm color=yellow size=3
  From this I can see that I have my geographical extents correct.
  Now I want to convert these sites to a raster.
  I use the following command:
    s.surf.rst input=points.dtm elev=elevation.dtm field=1
  I then run:
    d.rast elevation.dtm
  and I get the error:
    WARNING: Fail of initial read of compressed file [cape.img in user1]
    WARNING: unable to open raster map [cape.img in user1]
    ERROR: Not able to open cellfile for [cape.img]
  I thought that I might have made a mistake with the command. I tried to import a raster map.
  I had a tiff file with a tfw file:
    r.in.tiff input=/smine.tif output=cape.img
  and then:
    d.rast cape.img
  and I get the same error message.
  I have attached the project without the image file as it is quite big.

  Cheers,
  Ross

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20020802/54f13fde/attachment.html


More information about the grass-windows mailing list