[GRASS-dev] [bug #5454] (grass) ps.map scaling not correct when
projection units are feet
Hamish Bowman via RT
grass-bugs at intevation.de
Mon Jan 29 23:58:35 EST 2007
this bug's URL: http://intevation.de/rt/webrt?serial_num=5454
Request number 5454 was commented on by 'hbowman' (Hamish Bowman).
Responding to this message will send mail to the requestor.
Request Tracker
rt at intevation.de
--------------------------------------------------------------
Cc: grass-dev at grass.itc.it
here it is:
ps.map/map_setup.c
/* set the scale */
if (!PS.scaletext[0]) sprintf(PS.scaletext, "1 : %.0f",
39.37 * 72.0 * (PS.w.east - PS.w.west) / PS.map_pix_wide);
that assumes east-west is in meters. It should be using the distance()
fn to return distance in meters like ps.map/scale.c does.
39.37 is meters->inches; 72.0 is inches to PostScript units (points, as
in font size of 10 is 10/72" tall when printed)
do_scalebar.c was assuming input segment length was in meters too.
should be:
/* convert scale size to map inches */
length = (sb.length / scale_size) *
G_database_units_to_meters_factor() * METERS_TO_INCHES;
This could very well be what is breaking the scale for lat/lon:
http://intevation.de/rt/webrt?serial_num=3096
(although due to curvature that will never be correct for both dims)
Hamish
-------------------------------------------- Managed by Request Tracker
More information about the grass-dev
mailing list