Sat, Oct 1 2005
01:22:21
|
|
Request created by guest
|
|
Subject: ps.map resolution
Platform: Mac OSX
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 6.1cvs 20050917
Hi all, there is a limit to the resolution with which a postscript can be rendered.
It is limited to 75
dpi. However many rasters are much finer resolution than this. It would be
nice to be able to set the
postscript to any scale we'd like, and have it print at the resolution of the
region. Below is from the
mailing list archive GRASSLIST 8404
Cheers,
Ian
Sorry, you're right; ps.map has a hardcoded limit of 75dpi. The
"scale" command changes the size of the image, and thus of the
computed resolution.
set_paper.c has a hardcoded setting:
PS.res = 75;
This is used in map_setup.c to limit the size of a raster:
if (PS.grey || PS.level == 1) limit = 300000000L;
else limit = 100000000L;
while (num_cells > limit || cells_per_inch > PS.res)
{
if (PS.cells_high >= PS.cells_wide)
{
PS.cells_high /= 2;
PS.ns_res *= 2.0;
PS.row_delta++;
cells_per_inch /= 2;
}
else
{
PS.cells_wide /= 2;
PS.ew_res *= 2.0;
PS.col_delta++;
cells_per_inch /= 2;
}
num_cells = (long)PS.cells_high * (long)PS.cells_wide;
}
Thus it effectively rescales the raster by powers of two until it is
less than 75dpi and contains less than 3E8 pixels for greyscale or 1E8
pixels for colour.
You may be able to get around the 75dpi limit by selecting a larger
paper size then rescaling it with psresize (from the psutils package).
Personally, I think that code should simply be removed. I suspect that
it was put there to prevent users from accidentally creating huge
print jobs on a system which couldn't handle them.
Note that the image is "streamed" (rendered as it is read from the
PostScript file, not stored), so the amount of memory in the printer
isn't an issue.
>
>
So it seems to me that the resolution is based on the region, and the
output device that the postscript is written to. The effective
resolution of the raster in the postscript file does not necessarily
equal that of the region. My question is this, how does one get an
effective resolution equal to that of my region in my final postscript
file using ps.map? Can I set up a fake output device with a really
high resolution in Grass 6?
>
>
Use a larger paper size, or simply remove all references to PS.res
from ps.map.
Glynn Clements <glynn@gclements.plus.com> |
|
Wed, Feb 22 2006
09:44:32
|
|
Mail sent by msieczka
|
|
Ian,
Few days ago Glynn has removed the 75 DPI code from ps.map for good. Can you
retest and post an update? I wold appreciate a direct email to werchowyna at
epf dot pl so I'll know whether to close this one.
Best,
Maciek
|
|
Wed, Feb 22 2006
10:50:34
|
|
User changed to Ian.MacMillan@pomona.edu by msieczka
|
|
Wed, Feb 22 2006
10:52:19
|
|
Mail sent by msieczka
|
|
Ian,
Resending this and changing requestor adress to your current address as your
original email doesn't work anymore.
---
Few days ago Glynn has removed the 75 DPI code from ps.map for good. Can you
retest and post an update? I wold appreciate a direct email to werchowyna at
epf dot pl so I'll know whether to close this one.
Best,
Maciek
|
|
Wed, Feb 22 2006
18:25:53
|
|
Mail sent by Ian.MacMillan@pomona.edu
|
|
Return-Path |
<Ian.MacMillan@pomona.edu>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Mime-Version |
1.0 (Apple Message framework v623)
|
In-Reply-To |
<20060222095219.CC9431006A0@lists.intevation.de>
|
References |
<20060222095219.CC9431006A0@lists.intevation.de>
|
Content-Type |
text/plain; charset=US-ASCII; format=flowed
|
Message-Id |
<0b527660ba50a759faee98074b2b15e2@pomona.edu>
|
Content-Transfer-Encoding |
7bit
|
From |
Ian MacMillan <Ian.MacMillan@pomona.edu>
|
Subject |
Re: [bug #3705] (grass) ps.map resolution
|
Date |
Wed, 22 Feb 2006 09:21:55 -0800
|
To |
Maciek Sieczka via RT <grass-bugs@intevation.de>
|
X-Mailer |
Apple Mail (2.623)
|
X-OriginalArrivalTime |
22 Feb 2006 17:21:14.0357 (UTC) FILETIME=[62029A50:01C637D4]
|
X-Spam-Status |
No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
|
X-Spam-Level |
|
Maciek,
I'm a bit confused, what would you like me to do? Do you need me to
test the ps.map and see if it works? Do I need to respond to the
bugtracker? I have changed email addresses because I have changed
institutions, so I can't reply with the original email address.
Thanks,
Ian
On Feb 22, 2006, at 1:52 AM, Maciek Sieczka via RT wrote:
> Ian,
>
> Resending this and changing requestor adress to your current address
> as your
> original email doesn't work anymore.
>
> ---
>
> Few days ago Glynn has removed the 75 DPI code from ps.map for good.
> Can you
> retest and post an update? I wold appreciate a direct email to
> werchowyna at
> epf dot pl so I'll know whether to close this one.
>
> Best,
> Maciek
>
>
> -------------------------------------------- Managed by Request Tracker
>
>
>
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.
|
|
Mon, Apr 17 2006
13:37:37
|
|
Mail sent by msieczka
|
|
Ian wrote:
> I'm a bit confused, what would you like me to do? Do you need me to
> test the ps.map and see if it works? Do I need to respond to the
> bugtracker?
Yes, if you can. Also, please CC me <werchowyna at epf dot pl> - otherwise I
will not be informed you replied to the tracker (yes it's a pain but Grass
bugtracker is like it is), so it might again take a month until I recheck this
ticket :).
> I have changed email addresses because I have changed
> institutions, so I can't reply with the original email address.
That is not a problem. Use whatever address you like :). I was only letting
you know that I have updated your (bug requestor) email accordingly for this
ticket.
Best,
Maciek
|
|
Fri, Feb 9 2007
05:28:50
|
|
Status changed to resolved by hbowman
|
|
Fri, Feb 9 2007
05:28:50
|
|
Comments added by hbowman
|
|
this was fixed by Glynn a long time ago. Closing it.
Hamish
|
|