[GRASS-dev] i.points, i.vpoints now use G_parser()

Michael Barton michael.barton at asu.edu
Sun Jun 25 12:27:31 EDT 2006


Glynn,

Thanks much. See below.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Glynn Clements <glynn at gclements.plus.com>
> Date: Sun, 25 Jun 2006 11:19:47 +0100
> To: Michael Barton <michael.barton at asu.edu>
> Cc: Hamish <hamish_nospam at yahoo.com>, grass5 <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-dev] i.points, i.vpoints now use G_parser()
> 
> 
> Michael Barton wrote:
> 
>> Thanks much. A couple of questions.
>> 
>> What information does it return and in what format?
> 
> Number of active points: %d
> Forward:
> x[%d] = %.2f
> y[%d] = %.2f
> g[%d] = %.2f
> RMS = %.2f
> Reverse:
> x[%d] = %.2f
> y[%d] = %.2f
> g[%d] = %.2f
> RMS = %.2f
> 
> The "x[%d] = %.2f" etc indicates the index of the point with the
> greatest x/y/diagonal error and the corresponding error value.
> 
> I can change the format or add certain additional information (e.g.
> the error for every point) easily enough.

Is g[%d] the diagonal distance?

I'd prefer to see the values for each point.

Sorry for being dense, but does it return a string that includes newlines
like the following...

"Number of active points: 5\nForward:\nx = 999999.999\ny = 9999999.999\n..."

...or just the values like the following...

"5 999999.999 9999999.999..."

> 
>> Also, will it work with any POINTS file in a $GISBASE/group/[mapname]/
>> directory? 
> 
> I think so.
> 
>> Finally, does it require the presence of a REF file too--or just needs a
>> POINTS file? I'm asking this so that I can have it working with vectors too.
> 
> I don't think so.
> 
> Actually, modifying it read a specific file is straightforward; I just
> need to either take the code from v.transform and modify it to read
> into a Control_Points structure, or modify I_read_control_points() to
> allow 4-column data (if the data will always have 5 columns, I can
> just use I_read_control_points() directly).

Since 5 columns isn't a problem for v.transform, I'll just make all points
files the same. The only difference for the vector one is that it will only
contain valid points (i.e., the last column will always be 1); raster points
files can have 1 or 0 in the last column (with RMS calculations only being
on the lines with a 1 in the last column)

Michael





More information about the grass-dev mailing list