Opened 9 months ago

Closed 10 days ago

#13415 closed enhancement (fixed)

[Patch draft] Introduce ILatLon and make Node implement it.

Reported by: michael2402 Owned by: michael2402
Priority: normal Milestone: 17.05
Component: Core Version:
Keywords: gsoc-core Cc: Don-vip, bastiK, stoecker


I tested if it makes the code more readable if we use a common interface for all objects that have a lat/lon.

Those are the results:

  • The drawing code already uses Node#getEastNorth(). It does not really change much
  • Most Node.getCoor() calls use some method of the LatLon object later (e.g. to compute distances).

So all in all, it will help clean up the code a bit but it won't help much. If you have suggestions on how to unify this, feel free to propose them.

Attachments (1)

patch-latlon-generic.patch (45.4 KB) - added by michael2402 9 months ago.

Download all attachments as: .zip

Change History (13)

Changed 9 months ago by michael2402

Attachment: patch-latlon-generic.patch added

comment:1 Changed 5 months ago by Don-vip

Milestone: 17.01

comment:2 Changed 5 months ago by Don-vip

Can you please update the patch?

comment:3 Changed 4 months ago by Don-vip

Milestone: 17.0117.02

comment:4 Changed 3 months ago by Don-vip

Milestone: 17.0217.03

comment:5 Changed 3 months ago by Don-vip

Owner: changed from team to michael2402
Status: newneedinfo

comment:6 Changed 3 months ago by michael2402

Should be OK for 17.3. I'll be doing some more drawing code cleanup the next weeks (using utility classes, text/icon placement code, unifying opacity handling, testing, ...)

comment:7 Changed 2 months ago by michael2402

Milestone: 17.0317.04

Moving this to 17.4. Primary goal is to make 17.3 stable.

comment:8 Changed 4 weeks ago by michael2402

Milestone: 17.0417.05

comment:9 Changed 13 days ago by michael2402

In 12161/josm:

See #13415: Add the ILatLon interface, unify handling of Nodes and CachedLatLon

comment:10 Changed 13 days ago by michael2402

In 12162/josm:

See #13415: Fix @since tags.

comment:11 Changed 10 days ago by michael2402

In 12213/josm:

See #13415: Make code shorter by using LatLon.getEastNorth()

comment:12 Changed 10 days ago by michael2402

Resolution: fixed
Status: needinfoclosed

The interface is implemented and used in several places, to unify Node, CachedLatLon and WayPoint code

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain michael2402.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.