Modify

Opened 4 years ago

Closed 4 years ago

#18731 closed enhancement (fixed)

[PATCH] There should be a method to search for all primitives inside a bbox

Reported by: taylor.smock Owned by: Don-vip
Priority: normal Milestone: 20.02
Component: Core Version:
Keywords: Cc:

Description (last modified by taylor.smock)

Currently, if I want to check all primitives in a bbox, I have to create a list and then make a call for searchNodes, searchWays, and searchRelations.

I'm marking this as an RFC since I think it would be better to put this in the OsmData class with a default method, but I don't know if it is worth the effort (I don't know how to cleanly check if N/W/R extend O).

I also haven't implemented any tests for it.

Attachments (3)

18731.patch (968 bytes) - added by taylor.smock 4 years ago.
Initial patch for searchPrimitives
18138.1.patch (17.9 KB) - added by taylor.smock 4 years ago.
Add tests and fix an issue with a possible NPE (if bbox is null, there is an error in searchNodes)
18731.1.patch (3.4 KB) - added by taylor.smock 4 years ago.
Add tests and fix an issue with a possible NPE (if bbox is null, there is an error in searchNodes) this time, with the correct file

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by taylor.smock

Attachment: 18731.patch added

Initial patch for searchPrimitives

comment:1 Changed 4 years ago by Don-vip

It's ok in DataSet. Can be moved to OsmData later if there's a need for.

Changed 4 years ago by taylor.smock

Attachment: 18138.1.patch added

Add tests and fix an issue with a possible NPE (if bbox is null, there is an error in searchNodes)

comment:2 Changed 4 years ago by taylor.smock

Description: modified (diff)
Summary: [PATCH RFC] There should be a method to search for all primitives inside a bbox[PATCH] There should be a method to search for all primitives inside a bbox

comment:3 Changed 4 years ago by Don-vip

Milestone: 20.02
Owner: changed from team to Don-vip
Status: newassigned

comment:4 Changed 4 years ago by Don-vip

Patch is wrong.

Changed 4 years ago by taylor.smock

Attachment: 18731.1.patch added

Add tests and fix an issue with a possible NPE (if bbox is null, there is an error in searchNodes) this time, with the correct file

comment:5 Changed 4 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15891/josm:

fix #18731 - add method to search for all primitives inside a bbox (patch by taylor.smock)

Modify Ticket

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