﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8610	[Patch] getAreaText corrupts some area values	Cobra	Don-vip	"Working with the Measurement plugin I noticed that some areas are displayed as 0.00km². This affects any area >1000m² and <10000m². Areas between 10000m² and 99999m² are displayed with very little precision.

This is caused by some bogous comparison using the same logic for both distance and area, switching units at 1000: source:josm/trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java#L1280
I've created a simple patch fixing this issue by using a proper area comparison.

{{{
area    | current  | new
1       | 1.00 m²  | 1.00 m²
10      | 10.0 m²  | 10.0 m²
100     | 100.0 m² | 100.0 m²
1000    | 0.00 km² | 1000.0 m²
10000   | 0.01 km² | 10000.0 m²
100000  | 0.10 km² | 100000.0 m²
1000000 | 1.00 km² | 1.00 km²
}}}

I'm not completely sure about the behaviour for larger values. Maybe we could drop the decimals for values >= 10000m² or use km² for values >=100000m² (->0.10 km²), limiting the length of the resulting string."	defect	closed	normal		Core		fixed		
