[GRASSLIST:8397] Re: ps.map resolution

Ian MacMillan ian_macmillan at umail.ucsb.edu
Fri Sep 23 11:11:25 EDT 2005


Hamish, I think I have to disagree with you.  I have attached two .eps 
files of a USGS topo sheet (total of ~400kb, I hope that isn't too big 
for you non-broadband folks) that I made with ps.map.  The commands I 
used were:

g.region rast=map -p

ps.map input=- output=test1.eps
rast map
scale 1:50000
end

ps.map input=- output=test3.eps
rast map
scale 1:500
paper
width 36
height 36
end
end

When I open both of these files in a program like illustrator, there is 
a large difference in resolution (the original resolution is ~1.5 m).  
I can scale down test3.eps to the same dimensions as test1.eps in 
illustrator, and the resolution stays high in test3.  In addition the 
file sizes are different.  They should be the same I think if they are 
equal resolution (granted I know very little about postscript).

Thoughts?

-Ian

PS Is there a way that we can start a space on the Wiki page for 
figures of interest from the mailing list.  That way they will always 
be available, people's mailboxes will remain smaller, and people 
without web space can post images that are relevant to their 
discussion.  Is there an easy way that anyone can post small images 
there?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.eps
Type: application/postscript
Size: 40968 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050923/bf6584be/test1.eps
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test3.eps
Type: application/postscript
Size: 334266 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20050923/bf6584be/test3.eps
-------------- next part --------------

On Sep 22, 2005, at 11:46 PM, Hamish wrote:

> Hi Ian,
>
>> Hi all, I don't think this has been discussed on the mailing list
>> before, sorry if it has.  Is there any way to increase the resolution
>> of a raster using ps.map?
>>
>> As near as I can tell, all rasters come out at 72 dpi.  My
>> work-around so far has been to use ps.map, then double, triple, or
>> quadruple my scale on a huge page, then use some other software to
>> scale that back down to increase the resolution of the raster within
>> the postscript file.  This gets cumbersome for large maps.
>
> ps.map uses the current region settings to determine the raster
> resolution. They will only get resampled to 72 dpi if you convert
> to PDF etc. Now PostScript positioning works in units of 72dpi*, but
> you can have higher resolution rasters embedded within them.
>
> [*] thus a font size of 10 is actually 10/72 inch tall when sent to the
> printer; a font size of 72 is an inch tall; etc.
>
> Just use `g.region rast=map` before ps.map to set the resolution and
> bounds to the full resolution of the raster map. Mind the file size as
> the .ps file doesn't do any compression.
>
>
>> Using d.out.whatever can yield the same resolution as the screen
>> however the scale can't be set.
>>
>> Any ideas?
>
> One way via the display monitors is to use the PNG driver after setting
> GRASS_WIDTH and GRASS_HEIGHT shell variables to the same as the region
> columns and rows values.
>
> e.g.
>
> g.region -g rast=mapname
> export GRASS_WIDTH=...
> export GRASS_HEIGHT=...
> d.mon start=PNG
> d.rast ...
> d.barscale at=...
> d.mon stop=PNG
>
>
>
>
> Hamish
>
 >
 >
What happens if a big asteroid hits Earth? Judging from realistic 
simulations involving a sledge hammer and a common laboratory frog, we 
can assume it will be pretty bad.
  - Dave Barry


-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.


More information about the grass-user mailing list