[GRASS-dev] r.out.arc -c ?

Markus Neteler neteler at osgeo.org
Sun Oct 17 15:20:47 EDT 2010


On Sun, Oct 17, 2010 at 8:43 AM, Hamish <hamish_b at yahoo.com> wrote:
> re. r43579,
>  r.out.arc: flag added to refer to cell center in header
>
> why is it necessary or a good thing to let the user export data in the
> incorrect format?

Why incorrect?

> I presume that Arc's import tool is very specific in
> it's definition of the header, and that we are already shipping the
> correct way.

There are two notations.

> ie what's the justification for violating the read-sloppy, write-exact
> rule-of-thumb?

Please explain what you mean... I don't see any violation yet nor I
would support it. If you look at the change:

 	153	        if (G_projection() != PROJECTION_LL) {  /* Is Projection
!= LL (3) */
 	154	            if (!flag.ccenter->answer) {
 	155	                G_format_easting(region.west, buf, region.proj);
X 	156	                fprintf(fp, "xllcorner %s\n", buf);
 	157	                G_format_northing(region.south, buf, region.proj);
X 	158	                fprintf(fp, "yllcorner %s\n", buf);
 	159	            }
 	160	            else {
 	161	                G_format_easting(region.west + cellsize / 2.,
buf, region.proj);
X 	162	                fprintf(fp, "xllcenter %s\n", buf);
 	163	                G_format_northing(region.south + cellsize / 2.,
buf, region.proj);
X 	164	                fprintf(fp, "yllcenter %s\n", buf);
 	165	            }

X--> See that the reference changes, too.

Some software packages do not understand the xllcorner/yllcorner notation
but only the xllcenter/yllcenter notation.

Markus


More information about the grass-dev mailing list