[GRASSLIST:113] Re: coordinate numbers in ps.map

Hamish hamish_nospam at yahoo.com
Tue Mar 14 18:31:37 EST 2006


> something strange, I was making a small map with ps.map, but the
> coordinate numbers refuse to show complete. It is a UTM region, and
> grid numbers appear as "73" instead of "730" (for X coords) and as
> "729" instead of "7290".
> I found that if I set the grid spacing to 5000m or less, numbers show
> up fine, but if I use 10000m (as I want to), then this problem arises.
> 
> see it:
> 
> www.igc.usp.br/pessoais/guano/tempo/srtm_v2_numbers1.jpg
> www.igc.usp.br/pessoais/guano/tempo/srtm_v2_numbers2.jpg


It's a feature. I suggest using the the mapinfo instruction.

in ps/ps.map/do_grid.c

do_grid_numbers()

    /* round grid to multiple of 10 */
    rounded_grid = 1;
    if (PS.w.proj != PROJECTION_LL)
    {
        sprintf(num_text, "%d", PS.grid);
        len = strlen(num_text);
        while (len-- && num_text[len] == '0') rounded_grid *= 10;
        if (rounded_grid == 10) rounded_grid = 1;
    }
*

and a little later,
        sprintf(num_text, "%s", format_northing(g, rounded_grid));

and the format_northing() fn at the end of that file.

a cheap hack to disable the feature is to add a line:
  rounded_grid = 1;

at the "*" above.



Hamish




More information about the grass-user mailing list