Thursday, July 21, 2011

GRASS: Day 4

Quick summary of yesterday, similar to day 3, lots of reading, less codes and a lot of headaches...

I've completed Neteler and Mitasova ch.4 about uploading files. I am hoping at this early stage to stick to more common files types e.g. GeoTIFF and Esri Shapefile, but I tried to get a least a grasp of what else could be achieved. A lot of the work seem to be done with external tools Gdal for raster layers and OGR for vector (which is visible in the command r.in.gdal). I've touched these tools before as they are also part of Quantum. They enable among other things to only upload a portion of a large raster to match the selected region etc.

I am now starting on Raster layers...
After a bit of playing around, I started to face difficulties - if you want to crash the software like me, follow the instructions below -
As I have mentionned on Day 3, I'm currently sticking to the python GUI as it is the only one which display information correctly and it has good support when writing code... But. the GUI does not respond to all the codes given in the book (which is based on using command line in a UNIX system).
For example Problem n.1, let's try this (with the North Carolina sample data).
g.region rast=elevation -p # that line is remembered from the top of my #head, it might be not perfect but it works for this example
d.rast elevation # this line is optional, the problem occurs with and #without
d.rast geology_30m
d.rast -o elevation val=100-160

now in theory this should overlay the elevation values between 100-160 on top of the geology layer... but it doesn't. Here is an quick image of what the code of the problem looks like.
and for some reason, it seems to jam after this...






















If I remove the overlay command (-o) it works, but I then need to do the overlay manually (by going in layer/properties in the Map layers window).

For some curious reason the same type of problem code come when I try:
d.rast help
which I would have thought is a pretty standard request.

I do not know where I have gone wrong yet, despite a lot of figgeting about. I will have to try again later.

Another difficulty (Problem n.2) came when I was trying to apply a legend, north arrow etc. It seems that the GUI does not accept to use command console to add text to a map for example.

Still I have succeeding in having fun with a few simple raster commands, for e.g.
r.info
r.colors

I have learned how to manipulate and modify the metadata information with
r.info
r.category
r.support (to do modifications)

and most importantly, I must admit I am absolutely amazed at the quality of the help files (in comparison of Quantum, at least for the code section) Here is a sample of how clear their help is (which for the poor Neophyte that I am is quite vital).
Isn't this absolutely wonderful?

No comments:

Post a Comment