Modify

Opened 8 years ago

Closed 7 years ago

Last modified 7 years 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

Description

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 8 years ago.

Download all attachments as: .zip

Change History (17)

by michael2402, 8 years ago

Attachment: patch-latlon-generic.patch added

comment:1 by Don-vip, 7 years ago

Milestone: 17.01

comment:2 by Don-vip, 7 years ago

Can you please update the patch?

comment:3 by Don-vip, 7 years ago

Milestone: 17.0117.02

comment:4 by Don-vip, 7 years ago

Milestone: 17.0217.03

comment:5 by Don-vip, 7 years ago

Owner: changed from team to michael2402
Status: newneedinfo

comment:6 by michael2402, 7 years ago

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 by michael2402, 7 years ago

Milestone: 17.0317.04

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

comment:8 by michael2402, 7 years ago

Milestone: 17.0417.05

comment:9 by michael2402, 7 years ago

In 12161/josm:

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

comment:10 by michael2402, 7 years ago

In 12162/josm:

See #13415: Fix @since tags.

comment:11 by michael2402, 7 years ago

In 12213/josm:

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

comment:12 by michael2402, 7 years ago

Resolution: fixed
Status: needinfoclosed

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

comment:13 by Binnette, 7 years ago

Hi those changes broke some plugins. Can you fix them. See my new bug : #15157

comment:14 by Binnette, 7 years ago

Resolution: fixed
Status: closedreopened

comment:15 by Don-vip, 7 years ago

Resolution: fixed
Status: reopenedclosed

Please don't reopen core tickets for plugin impacts!

comment:16 by Binnette, 7 years ago

Oops sorry.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain michael2402.
as The resolution will be set.
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.