[GRASS-user] geogrid not smooth in ps.map output

Moritz Lennert mlennert at club.worldonline.be
Thu Feb 11 01:45:12 PST 2016


On 08/02/16 16:48, Tyler Smith wrote:
> 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?
>>
>
> Thanks Markus,
>
> 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.
>

Try attached diff as a starting point. Certainly needs some more 
clean-up and inclusion in the documentation in ps.map.html.

Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ps_map_geogrid_segments.diff
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160211/2e5b74a4/attachment.bin>


More information about the grass-user mailing list