ENH: count objects within another closed path

Bug #621627 reported by Wolf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

This one is for the wishlist:

I'd like to have a function which counts the number of objects which are surrounded by another closed path.

Background:
I'm using inkscape for public transport consulting, and normally I put in one red dot for 10 inhabitants in a city map. It would be great to have an automatism to count the number of inhabitants who live in walking distance of bus stops I put in before.

Usually I have circles around my bus stops, which usually represent 250m, and after having positioned the bus stops, I merge all the circles to make one outline. To find quickly, how many inhabitants are included, would be great.

The other thing is to find out quickly how many inhabitants do live within one urban district.

Yours, Wolf

Revision history for this message
Wolf (drechsel) wrote :
su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Wishlist
tags: added: extensions-plugins
Revision history for this message
Maximilian Albert (cilix) wrote :

This shouldn't be very hard to implement. I won't have time to do it myself in the next 1-2 months, but here are a few random comments/questions that come to mind just from reading this.

One way to implement it is as an extension that simply counts the items inside the outline as described in the original request. However, it might be much more useful to provide a way to *select* the items instead of counting them directly. The number of selected items would then be displayed in the status bar, which solves the original request. But in addition, they can easily be manipulated further, which might be quite useful for all kinds of other use cases not related to public transport consulting. Perhaps it would even be worthwhile to include this kind of functionality in the Edit menu (e.g., 'Select all within object' or something to that effect), although it might be too specific to warrant a menu entry on its own.

A couple of further thoughts:

- Apart from counting *all* item swithin the given outline, there should be a way to filter them - say, by type (path, ellipse, rectangle, etc.) or based on their id (e.g., if it contains a given regular expression).

- What should it mean for an item to lie 'inside' the outline? E.g., an item could be considered inside if it lies fully within the outline, or if its center lies within (but its boundary might cross the outline), etc. There should be an option to specify this.

Revision history for this message
Wolf (drechsel) wrote :

All fully ACK, Maximilian.

I dont have any comments to make - things are just like you wrote. Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.