[GRASS5] r.in.bin update for significant ewres/nsres differences in LatLong
Markus Neteler
neteler at itc.it
Mon Oct 18 08:53:41 EDT 2004
Roger,
following your suggestion I have added a warning in r.in.bin
to check if EW and NS differ significantly (indicating that
probably east= and west= are confused).
Not sure if I am doing that right, patch below.
Markus
On Mon, Oct 18, 2004 at 02:35:27PM +0200, grass at intevation.de wrote:
> Author: markus
>
> Update of /grassrepository/grass/src/raster/r.in.bin
> In directory doto:/tmp/cvs-serv22175
>
> Modified Files:
> main.c
> Log Message:
> added test for LatLong in case the resolution differs significantly (two ways to go around the globe in E/W direction...)
>
> Index: main.c
> ===================================================================
> RCS file: /grassrepository/grass/src/raster/r.in.bin/main.c,v
> retrieving revision 1.14
> retrieving revision 1.15
> diff -u -d -r1.14 -r1.15
> --- main.c 18 Oct 2004 12:23:14 -0000 1.14
> +++ main.c 18 Oct 2004 12:35:25 -0000 1.15
> @@ -455,6 +455,9 @@
> x_s = (short *) x_v;
> x_c = (char *) x_v;
>
> + if( cellhd.proj == PROJECTION_LL && cellhd.ew_res/cellhd.ns_res > 50. ) /* TODO: find a reasonable value */
> + G_warning("East-West (ewres: %f) and North-South (nwres: %f) resolution differ significantly. Did you assign east= and west= correctly?", cellhd.ew_res, cellhd.ns_res);
> +
> fprintf(stderr, "Percent Complete: ");
> for (row = 0; row < grass_nrows; row++)
> {
More information about the grass-dev
mailing list