[GRASS-user] geogrid not smooth in ps.map output
tyler at plantarum.ca
Mon Feb 8 07:48:42 PST 2016
On Sun, Feb 7, 2016, at 05:17 PM, Markus Neteler wrote:
> On Fri, Feb 5, 2016 at 8:08 PM, Tyler Smith <tyler at plantarum.ca> wrote:
> > How can I plot geographic grids as smooth curves with ps.map?
> What about using v.mkgrid and then reprojection it using vertex
> densification as provided by v.proj?
That sounds reasonable. However, based on your and Alex's comments, I
did some digging into ps.map. It appears the resolution of grid lines is
hardcoded to use 10 vertices across the length of each grid line, via:
#define SEGS 10
in do_geogrid.c. I changed this to 100 and recompiled, and now I have
nice smooth grids. This suggests that perhaps a permanent fix would be
to replace the SEGS macro with an additional argument to the geogrid
command in the ps.map instruction set. That way users could tune the
value to suit the map they are preparing. Alternatively, some more
sophisticated calculation could be used to determine the number of
segments. Or it could just be set to a sufficiently high number.
I can look into one or more of these options if it sounds generally
useful; I don't yet understand how the ps.map arguments are parsed, but
it looks to be within my capabilities to make the change.
More information about the grass-user