Modify

Opened 13 months ago

Closed 6 weeks ago

Last modified 6 weeks 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 13 months ago.

Download all attachments as: .zip

Change History (17)

Changed 13 months ago by michael2402

Attachment: patch-latlon-generic.patch added

comment:1 Changed 9 months ago by Don-vip

Milestone: 17.01

comment:2 Changed 9 months ago by Don-vip

Can you please update the patch?

comment:3 Changed 8 months ago by Don-vip

Milestone: 17.0117.02

comment:4 Changed 7 months ago by Don-vip

Milestone: 17.0217.03

comment:5 Changed 7 months ago by Don-vip

Owner: changed from team to michael2402
Status: newneedinfo

comment:6 Changed 7 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 6 months ago by michael2402

Milestone: 17.0317.04

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

comment:8 Changed 5 months ago by michael2402

Milestone: 17.0417.05

comment:9 Changed 4 months ago by michael2402

In 12161/josm:

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

comment:10 Changed 4 months ago by michael2402

In 12162/josm:

See #13415: Fix @since tags.

comment:11 Changed 4 months ago by michael2402

In 12213/josm:

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

comment:12 Changed 4 months ago by michael2402

Resolution: fixed
Status: needinfoclosed

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

comment:13 Changed 6 weeks ago by Binnette

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

comment:14 Changed 6 weeks ago by Binnette

Resolution: fixed
Status: closedreopened

comment:15 Changed 6 weeks ago by Don-vip

Resolution: fixed
Status: reopenedclosed

Please don't reopen core tickets for plugin impacts!

comment:16 Changed 6 weeks ago by Binnette

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.