Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#10434 closed enhancement (fixed)

[patch] Initial classes to hold Notes data

Reported by: ToeBee Owned by: team
Priority: normal Milestone: 14.08
Component: Core Version:
Keywords: Cc: ToeBee

Description

As discussed on the mailing list, here is the first patch in support of adding OSM notes to core. The patch contains three new classes. Two of them are just the object representation of notes and note comments. The third is the XML parser which handles both the API style XML and the planet dump style XML. I was able to test the dump parser by hardcoding some things in the notes plugin. It successfully loaded all 270+ thousand notes in the current dump. It took 5 minutes to do so but most of that was in the GUI code. Parsing took a few seconds.

One thing I just thought of: Is a List the best data structure to use for holding notes? So far, efficiency hasn't been a big concern since the notes plugin can only talk to the API and the API has a hard limit of 10,000 notes per request. But if we are going to support loading the dump files, things may need tweaking.

Attachments (1)

notes_parsing.patch (15.9 KB) - added by ToeBee 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by ToeBee

Attachment: notes_parsing.patch added

comment:1 Changed 5 years ago by Don-vip

Milestone: 14.08

comment:2 Changed 5 years ago by bastiK

Resolution: fixed
Status: newclosed

In 7451/josm:

applied #10434 - Initial classes to hold Notes data (patch by ToeBee)

comment:3 Changed 5 years ago by bastiK

I don't think efficiency is a primary concern with notes as you usually don't have that many. If you want to quickly find all the notes in a given bounding box, then QuadBuckets is the container that was written exactly for this purpose. It is currently restricted to <T extends OsmPrimitive>, but shouldn't be too hard to generalize to any object that has a LatLon coordinate.

Modify Ticket

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