Details Ticket 3389


Comment | Reply | Take | Open


Serial Number 3389
Subject ps.map: make bounding frame optional
Area wish6
Queue grass
Requestors jidanni@jidanni.org
Owner none
Status resolved
Last User Contact Fri Jul 1 09:16:27 2005 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Feb 7 08:31:26 2007 (2 yr ago)
Created Fri Jul 1 07:13:15 2005 (3 yr ago)

Transaction History Ticket 3389


Fri, Jul 1 2005 07:13:15    Request created by jidanni@jidanni.org  
Return-Path <jidanni@jidanni.org>
Delivered-To grass-bugs@lists.intevation.de
To grass-bugs@intevation.de
Subject ps.map: no way to make monochrome
From Dan Jacobson <jidanni@jidanni.org>
Date Fri, 01 Jul 2005 11:41:41 +0800
Message-ID <87psu342h6.fsf@jidanni.org>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
I notice try as I may,
$ echo 'vlines ribcage; color black; end; vpoints ribcage;\
color black; fcolor black; end;'|tr \; \\n|\
ps.map scale=1:40000 output=ribcage.ps

$ identify -verbose ribcage.ps
still shows so many colors. No way just to make black and white.

One has to do
$ convert -monochrome ribcage.png ribcage.png
for better or worse.

What's really bad is ps.map insists on drawing an undocumented black
border around the image, with no way to get rid of it!!


Fri, Jul 1 2005 09:16:27    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Fri, 1 Jul 2005 19:16:11 +1200
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #3389] (grass) ps.map: no way to make monochrome
Message-Id <20050701191611.51f0c517.hamish_nospam@yahoo.com>
In-Reply-To <20050701051315.9EB4E101F15@lists.intevation.de>
References <20050701051315.9EB4E101F15@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3389
> -------------------------------------------------------------------
> 
> I notice try as I may,
> $ echo 'vlines ribcage; color black; end; vpoints ribcage;\
> color black; fcolor black; end;'|tr \; \\n|\
> ps.map scale=1:40000 output=ribcage.ps
> 
> $ identify -verbose ribcage.ps
> still shows so many colors. No way just to make black and white.

Is this real? e.g. do you see a color image in gv?

how many unique colors does this show:

cat map.ps | grep ' C$' | sort | uniq | wc -l


> One has to do
> $ convert -monochrome ribcage.png ribcage.png
> for better or worse.


? why. Smaller file size? Actually comes out colored?

Presumably you are using netpbm tools to make PNG from PS. Just use a
pnmquant or similar step in the middle?



> What's really bad is ps.map insists on drawing an undocumented black
> border around the image, with no way to get rid of it!!


see previous email on how to disable it.

I like the border. ps.map is for plotting maps, and it's a good thing to 
delineate where the extent of the available data is IMO. Feel free to try
and sell me on making it optional/sizeable, but don't get your hopes up.




Hamish

ps-
I find stdin -> ps.map in a script is easier to read this way,

ps.map out=map.ps << EOF
scale 1:40000
vlines ribcage
  color black
  end
vpoints ribcage
  color black
  fcolor black
  end
end
EOF


scale is used as a mapping command as it is a mapping command.
You were missing a final "end" ?


Sat, Jul 2 2005 22:13:50    Comments added by pkelly  
Cc: grass5@grass.itc.it

Hamish wrote:
> I like the border. ps.map is for plotting maps, and it's a good thing to 
> delineate where the extent of the available data is IMO. Feel free to try
> and sell me on making it optional/sizeable, but don't get your hopes up.

One example (pushing it I know) is when using GRASS in place of a vector 
graphics image-processing package when you don't want to have to 
buy/install/learn how to use such a thing.
Something I found GRASS very useful for about a year ago was taking a poor 
quality low-res JPEG mockup of a logo (for a student radio station), 
thresholding, converting to vector, colourising and ending up with a nice 
high-quality vector-based Encapsulated PostScript logo. The ps.map black 
border really got in the way then.
Wed, Jul 6 2005 12:36:52    Area changed to wish6 by hbowman  
Wed, Jul 6 2005 12:37:48    Subject changed to ps.map: make bounding frame optional by hbowman  
Wed, Jul 13 2005 23:32:09    Request created by jidanni@jidanni.org (as #3417)  
Return-Path <jidanni@jidanni.org>
Delivered-To grass-bugs@lists.intevation.de
To grass-bugs@intevation.de
Subject ps.map border should be optional!
References <87fyuz2jyb.fsf@jidanni.org> <20050701184751.05d1030c.hamish_nospam@yahoo.com>
From Dan Jacobson <jidanni@jidanni.org>
Date Thu, 14 Jul 2005 04:59:27 +0800
Message-ID <878y0aqv68.fsf_-_@jidanni.org>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Gentlemen, the below is a clear example of something that should be an
option for the user to decide: if he wants a border around his map or not!

>> How does one get ps.map to stop drawing a black border around
>> everything?

H> To get rid of the box around the map region you would need to edit the
H> source code or PostScript output as follows.

H> Comment out the following lines in ps/ps.map/ps_map.c and recompile.

H>     /* put border around map */
H>     fprintf(PS.fp, "BW\n");
H>     box_draw(PS.map_top  - 0.5, PS.map_bot   + 0.5,
H>              PS.map_left + 0.5, PS.map_right - 0.5);

H> or go towards the end of the PostScript file and find two lines
H> that look like this & delete them.

H> BW
H> 72.5 108.0 614.8 522.8 B D


Tue, Jul 19 2005 08:01:18    Status changed to resolved by hbowman (as #3417)  
Tue, Jul 19 2005 08:01:18    Comments added by hbowman (as #3417)  
dupe of wish 3389. closing this one.


Hamish
Wed, Aug 23 2006 12:39:32    Comments added by hbowman  
I plan on doing this at some time in the future.

(by adding a frame width param, with default being current width)


Hamish
Wed, Feb 7 2007 06:58:07    Request 3417 merged into 3389 by hbowman (as #3417)  
Wed, Feb 7 2007 08:31:26    Status changed to resolved by hbowman  
Wed, Feb 7 2007 08:31:26    Comments added by hbowman  
border control added to ps.map in 6.3-CVS.

closing wish.


Hamish
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request