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

Alex Mandel tech_dev at wildintellect.com
Sun Feb 7 10:36:25 PST 2016


Tyler,

The general issue (also exists in QGIS) is that grid/graticule creators
commonly only create nodes where 2 lines intersect. The solution
generically is that you need to increase the node density of each line
so that there are more points to bend the line along when projected.

As an example (or perhaps a solution) you can see my script that creates
such dense lines. It's a python script to create WGS 84 dense lines that
re-project well at world scales. I've written it to be standalone, or
it's available in QGIS Processing, you could also adapt it to GRASS
since it's pure python and writes a geojson file (ogr can read that).
https://github.com/wildintellect/pyGraticule

Enjoy,
Alex

On 02/05/2016 11:08 AM, Tyler Smith wrote:
> Hi,
> 
> I'm making a map for inclusion in a manuscript. I have the basic layout
> set, using the wx display system: https://flic.kr/p/CThHdE
> 
> Not perfect, but I can tweak the placement of labels in Inkscape.
> However, when I try to transfer the code from d.mon to ps.map, the
> gridlines become 'jointed', rather than smooth curves:
> https://flic.kr/p/DEp7zL
> 
> I've tried setting the region resolution, but it doesn't seem to change
> anything. How can I plot geographic grids as smooth curves with ps.map?
> Or is there a better workflow to accomplish this?
> 
> Best,
> 
> Tyler
> 
> GRASS GIS 7.0.3
> 
> d.mon code:
> ---------------
> 
> d.vect map=provinces_ca at PERMANENT type=boundary
> d.vect map=usa_country at PERMANENT type=boundary 
> d.vect map=boxes at PERMANENT type=point icon=basic/box fcolor=180:180:180
> size=8
> d.vect map=triangles at PERMANENT type=point icon=basic/triangle
> fcolor=250:250:250 size=9
> 
> ps.map input:
> -----------------
> 
> # g.region n=2000000 s=-1000000 e=3100000 w=-2550000 res=200
> 
> vlines provinces_ca
> type boundary
> color black
> width 0.5
> end
> 
> vlines usa_country
> type boundary
> color black
> width 0.5
> end
> 
> geogrid 15 d
> color grey
> numbers 1 grey
> end
> 
> vpoints triangles
> type point
> color black
> fcolor 200:200:200
> size 4
> symbol basic/triangle
> width 0.5
> end
> 
> vpoints boxes
> type point
> color black
> fcolor 100:100:100
> size 3
> symbol basic/box
> width 0.5
> end
> 
> paper
> width 6
> height 4
> left 0.1
> right 0.1
> top 0.1
> bottom 0.1
> end
> 
> 
> 



More information about the grass-user mailing list