AW: Re: Fwd: [Qgis-user] QGIS "Near"
Ziegler Stefan
Stefan.Ziegler at bd.so.ch
Thu Oct 21 01:22:02 PDT 2010
Hi Zoran
> As I can see the main stuff is in "featurefindertool.py"? And it works through all the features in the selected layer every time?
Yes, the interesting stuff is in featurefindertool.py. Yes, it works through all the features in the selected layer.
> But, I really do not have that many features, and it takes 2-3 seconds to find the nearest feature on my, not so very new laptop,
> in a layer with cca 4200 point features.Ok, this is due to the spatial index that is build everytime you click on the map. I changed this behaviour; the index is build only for the first time (or when you change the current layer of course). It takes 3 secondes for 50'000 point features and 40 seconds for 600'000 point features for the first search (on our server). The second click/search is just "real-time". Please update the plugin and try it and let me know.
regards
Stefan
On Wed, Oct 20, 2010 at 8:54 PM, Ziegler Stefan <Stefan.Ziegler at bd.so.ch> wrote:
Hi
Zoran
I had
some time left, took all my code snippets and also the one from Carson. Please
try the plugin "Nearest" that should cover your example 1:
http://www.catais.org/qgis/plugins.xml
regards
Stefan
-----Ursprüngliche
Nachricht-----
Von: Zoran Jankovic
[mailto:zoran.jankovic at zisis.hr]
Gesendet am: Mittwoch, 20. Oktober
2010 19:21
An: qgis-user
Betreff: Re: Fwd: [Qgis-user]
QGIS "Near"
Hi Joe,
On Wed, Oct 20, 2010 at 5:06 PM, Joe Larson <joelarso at gmail.com> wrote:
Does
the function 'snapWithContext'
http://doc.qgis.org/head/classQgsVectorLayer.html#733b974dce13d587e05cf3d4fc24f208
which
"Snaps to segment or vertex within given tolerance." seem like
what
you're looking for? I came across it while trying to get
Quantum
Navigator working recently...seemed relative, but I'm no
expert!
This is similar to the mentioned solution with selecting by radius, or
changing the tolerance of ID tool. Close, but no cigar. Since this is not very
urgent, I've decided to continue pursuing that outlined solution Carson gave,
and write a plugin i Python based on that. Since I actually never used Python
before, it may take a while, but hey, I get to learn sth. new :-).
I never got the word back from Carson, has he developed anything along
these lines, but I have to presume he didn't...
Anyone interested in joning me, or even earning some money, is still
invited to jump on board. My GIS implementation project is well on the way,
and it seems there'll even be some money involved :-).
Zoran
~joe
On
Tue, Oct 19, 2010 at 9:55 AM, Andreas Neumann <a.neumann at carto.net>wrote:
> Hi Zoran,
>
> I believe the
infrastructure of what you want is already wihtin the
> selection and
identify tools in QGIS. Isn't this almost implemented in the
> current
identify tool?
>
>
It sort of is, but not completely.
Identify will ID all the features within
certain radios (percentage of
extent), but it will ID _all_ of the features
within this radius. I only
need the nearest, no matter how far away... Let
us say it is, for
simplicity, within current extent.
> The current identify tool
selects "near" or "close by" features within a
> certain tolerance.
This tolerance can be set in "Options" --> "Map tools"
> "search
radius". I believe it currently only effects the identify tool. Do
>
you want the same tolerance also be used for the click-selection
tool?
>
>
Look above. This could be useful, but it is not the
functionality I'm
currently looking after.
> Are you also
aware that in QGIS 1.6 there are new selection tools?
>
> * by
click
> * by rectangle
> * by polygon
> * by
freehand
> * by radius
>
>
Yup, these are great, but
they all select _multiple_ features within radius,
rectangle,
etc.
> Maybe this also helps to address your
needs?
>
> Of course you can combine it with previous selections
by pressing the ctrl
>
key.
>
>
BR,
---
Zoran
Jankovic
ZIS-Izrada softvera i savjetovanje / ZIS - Software Development
and
Consulting
http://www.zisis.hr
M: 00 385 98 682
902
T: 00 385 44 683 374
A. Senoe 4
44320
Kutina
Croatia
_______________________________________________
Qgis-user
mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the Qgis-user
mailing list