logo separator

[mkgmap-dev] question regarding length

From GerdP gpetermann_muenchen at hotmail.com on Thu Oct 3 13:11:12 BST 2013

Hi Steve,

ok, got it: 1 / 0.3048 ~ 3,2808, which is also mentioned here:
http://www.metric-conversions.org/length/feet-to-meters.htm

So, I think it is plausible that the factor is a constant.
I'd prefer to use something like
// length should be in units of 16 feet
return (int) (l * 0.3048) / 16;

And maybe this also gives the precise default value 
for short-arc-removal:
16 * 0.3048 = 4,8768

Gerd


GerdP wrote
> Hi Steve,
> 
> in mkgmap.jar (RouteArc) we use 
> private static int convertMeters(double l) {
> 		// XXX: really a constant factor?
> 		// this factor derived by looking at a variety
> 		// of arcs in an IMG of Berlin; 1/4 of
> 		// what used to be here
> 		double factor = 3.28 / 16;
> 		return (int) (l * factor);
> 	}
> 
> In the display tool we use 
> 			// length should be in units of 16 feet
> 			item.addText("length %d (%dm)", len, (int)(len * 16 / 3.25)); 
> 
> I guess it should always be either 3.28 or 3.25?
> On the other hand, if the length is 
> somehow related to  the unit foot, why
> do I not see something like 0.3048?
> 
> Gerd





--
View this message in context: http://gis.19327.n5.nabble.com/question-regarding-length-tp5779909p5779920.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list