On Mon, Jul 11, 2005 at 09:03:48PM +1200, Hamish wrote:
Hi Jachym,
You might be able to simplify your script by having it use v.mkgrid +
'v.label type=centroid' + ps.map's 'labels' instruction (use CVS).
Perhaps combine the row and coln columns that v.mkgrid makes to have
"1A, 4D, ..." style labels.
regards,
Hamish
eeee... you may be right.. v.mkgrid could be another solution. if you
don't might, I would let the script like it is. I implemented the "1A..
" style of lables and added some (hopefully) useful columns to database.
if there are no bigger reservations to the concept, I would let is be
as it is.
Here are some more comments, this is meant as FYI- if the script works
as you like it then no need to go further!
another little simplification, if you use 'v.in.ascii -n' (6.1-cvs
only) you can skip the header stuff:
ORGANIZATION:
DIGIT DATE:
etc.
awk is more likely to be installed vs. bc for floating point math.
e.g. ANSWER=`echo "1.23 2.34" | awk '{print $1 + $2}'`
not as easy to read as bc input though so maybe better to leave it.
I'm not sure if it's a good idea to overwrite an existing vector file
without asking if it already exists (when the module is no longer in the
development stage). Exit with an error instead.
ps.map out=$out.eps
(1st time)
you didn't use the ps.map -e flag so output is .ps not .eps
scale= is a mapping instruction so best put in the ps.map command file
not on the command line. It is my intention to remove this from the
command line options in future. (will leave for GRASS 6 though)
I fixed most of notes from Hamish (thank you) and I added some more
options. The script can be turned to be less verbosed (redirecting
messages to /dev/null or /dev/stdout), but I'm not shure, if this works
e.g. on Mac Os or Cygwin.
Any other bugs/wishes?
Jáchym
On Tue, Jul 12, 2005 at 11:41:23AM +1200, Hamish wrote:
another little simplification, if you use 'v.in.ascii -n' (6.1-cvs
only) you can skip the header stuff:
> ORGANIZATION:
> DIGIT DATE:
etc.
awk is more likely to be installed vs. bc for floating point math.
e.g. ANSWER=`echo "1.23 2.34" | awk '{print $1 + $2}'`
not as easy to read as bc input though so maybe better to leave it.
I'm not sure if it's a good idea to overwrite an existing vector file
without asking if it already exists (when the module is no longer in the
development stage). Exit with an error instead.
> ps.map out=$out.eps
(1st time)
you didn't use the ps.map -e flag so output is .ps not .eps
scale= is a mapping instruction so best put in the ps.map command file
not on the command line. It is my intention to remove this from the
command line options in future. (will leave for GRASS 6 though)