Giter VIP home page Giter VIP logo

qgisnnjoinplugin's People

Contributors

havatv avatar jott-al avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

qgisnnjoinplugin's Issues

Sorting of elements

Hi again,

Plugin version 1.3.1

The elements within the dropdown lists are in what appears to be random order. Is it possible to sort these either alphabetically or the same as the QGIS Layers panel?

Thanks

Nigel

image

Finding second, third, ... nearest neighbor

Hi,

I’m trying to find the distance between cities (point) and the closest states (MultiPolygon). The problem is that obviously the closest state polygon to each city is the state where the city is.

Is it possible to add the option of finding the second, third, etc. nearest neighbors?

By the way great plugin!

Thanks,
José Miguel

ModuleNotFoundError: No module named 'qgisnnjoinplugin-master.resources'

Installing this plugin from the zip file produces the following:

Couldn't load plugin 'qgisnnjoinplugin-master' due to an error when calling its classFactory() method 

ModuleNotFoundError: No module named 'qgisnnjoinplugin-master.resources' 
Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgisnnjoinplugin-master/__init__.py", line 38, in classFactory
    from .NNJoin_plugin import NNJoin
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgisnnjoinplugin-master/NNJoin_plugin.py", line 43, in 
    from .resources import *
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'qgisnnjoinplugin-master.resources'


Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.34.1-Prizren Prizren, 133927424d9 

Python Path:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/jikaczmarski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms

Error in Qgis 3.22.1

         File "/home/alexander/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/NNJoin_plugin.py", line 137, in run
          self.dlg.progressBar.setValue(int(0.0))
         TypeError: setValue(self, int): argument 1 has unexpected type 'float'

NNJoin returning all "-1" or "0" values

I've been using NNJoin 3.1.1 in QGIS 2 and 3 to calculate distances from species presence/absence points (point or multipoint) to environmental features (point, line, multiline, polygon). It worked great for some time but now just returns all "-1" or "0" values for my entire vector. Even when I run it with the same input and join layers that worked in the past, I get this result. The issue only seems to occur when joining to multiline string objects and when I inspect the resulting layer, it looks like only one feature was selected to join (with a uniform distance of "-1" or "0").

Thanks in advance for your help!

CRS transformation error with QGIS 3

If the CRS of the join layer differs from the CRS of the input layer, a CRS transformation error is reported. Probably an effect of API changes in QGIS 3.0.

Thread issue with QGIS 3

There were no issues with threading in QGIS 2, but apparently there is a problem with this plugin in QGIS 3.
Here is the message (on Ubuntu 16.04, QGIS 2.99.0-Master - 287ed2d; QT 5.5.1, Python 3.5.2) that appears in the log message panel QT tab:

QObject::setParent: Cannot set parent, new parent is in a different thread

The QT message appears when the processing is done and the data set appears in the legend.

error NNjoin

hi
on Qgis 3.22 after install NNjoin

`2022-07-23T17:30:35 CRITICAL Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/init.py", line 38, in classFactory
from .NNJoin_plugin import NNJoin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/NNJoin_plugin.py", line 65

          ^
         SyntaxError: invalid character '·' (U+00B7)

2022-07-23T17:35:15 CRITICAL Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/init.py", line 38, in classFactory
from .NNJoin_plugin import NNJoin
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/NNJoin_plugin.py", line 65

          ^
         SyntaxError: invalid character '·' (U+00B7)

2022-07-23T17:39:03 WARNING Traceback (most recent call last):
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/NNJoin_plugin.py", line 137, in run
self.dlg.progressBar.setValue(0.0)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'`

Not working in QGIS ver. 3.32.2

@raymondnijssen Thanks for maintaining this very nice plugin so far. In case you still do:
I downloaded the zip-file from your place.
The plugin works like a charm in QGIS ver. 3.22, but not in ver. 3.32.2.
It gives med this:

Report Details

Python Stack Trace

Windows fatal exception: access violation

Current thread 0x00007844 (most recent call first):
  File "C:\Users/abni/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgisnnjoinplugin-progressbar\NNJoin_plugin.py", line 177 in run
    self.dlg.exec_()

Stack Trace


QgsCustomization::preNotify :
QObject::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
PyInit_QtWidgets :
PyArg_ParseTuple_SizeT :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyFloat_FromDouble :
PyVectorcall_Call :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QObject::qt_static_metacall :
QAction::activate :
QMenu::actionGeometry :
QMenu::actionGeometry :
QMenu::mouseReleaseEvent :
QWidget::event :
QMenu::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.32.2-Lima
QGIS code revision: c0b8833964
Compiled against Qt: 5.15.3
Running against Qt: 5.15.3
Compiled against GDAL: 3.7.1
Running against GDAL: 3.7.1

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.19045

Any chance for you having a look into the matter?

2nd or 3rd nearest?

Hi, I am trying to use nnjoin to solve the following task.
There are three layers:

  1. Census tracts (polygons)
  2. Census tract centroids (points)
  3. School districts (polygons)
    I want to find the closest school district (except for itself) for each census tract centroid. However the situation is that all census tracts are contained in some school district so that NNJoin will return the school district in which the census tract centroid (or the census tract itself) is located. I was guessing if there is a way to use NNjoin to do this kind of task?

Thanks a lot.

Same crasch issues with QGIS on Windows and Mac version

I have two point layers that I want to connect with columnsID data to link to each other with a line.
But QGIS crasches as soon as I press OK to run the process, I have tried with QGIS v 2.18.2 on both Mac and Windows and I have same problems. Anyone else seen this?

Regards
Soren

The points don't move to new place

I tried the NNJoin plugin on OSM data transformed to EPSG:23700 CRS.
I would like to join fuels (points) to roads (linestring), but the points' place in the output didn't change. The distance field is correct by the way. What can be the problem?

Display of plugin on high resolution monitor

Hi,

Love the plugin!! I am using the plugin with QGIS 2.18.6 on a Dell 27 inch 5K monitor with Windows 10 and the plugin does not display correctly. It appears that it does not scale the bounding boxes for the text (see image).

I am guessing that the issue relates to the scaling of the text elements that is done by windows for high resolution monitors, I have scaling set to 200% most of the time.

Thanks!!

Nigel

image

NNjoin crash

I'm trying to run NNjoin plugin to compute nearest distance between my plot and buildings (urban) but I'm having this error :

Report Details

Python Stack Trace ``` Windows fatal exception: access violation

Current thread 0x000067a8 (most recent call first): File "C:\Users/germa/AppData/Roaming/QGIS/QGIS3\profiles\nnjoin/python/plugins\NNJoin\NNJoin_plugin.py", line 177 in run self.dlg.exec_() ```

Stack Trace


QgsCustomization::preNotify : QObject::event :
QApplicationPrivate::notify_helper : QApplication::notify :
QgsApplication::notify : QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents : qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents : qt_plugin_query_metadata :
QEventLoop::exec : QDialog::exec : PyInit_QtWidgets :
PyArg_ParseTuple_SizeT : PyEval_EvalFrameDefault :
PyFunction_Vectorcall : PyFloat_FromDouble : PyVectorcall_Call :
PyObject_Call : PyInit_QtCore : PyInit_QtCore : PyInit_QtCore :
PyInit_QtCore : QObject::qt_static_metacall : QAction::activate :
QAbstractButton::click : QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent : QWidget::event :
QApplicationPrivate::notify_helper : QApplication::notify :
QgsApplication::notify : QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent : QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy : QApplicationPrivate::notify_helper :
QApplication::notify : QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents : qt_plugin_query_metadata :
QEventLoop::exec : QCoreApplication::exec : main : BaseThreadInitThunk
: RtlUserThreadStart : ```



**QGIS Info** QGIS Version: 3.34.0-Prizren QGIS code revision: ffbdd67881 Compiled against Qt: 5.15.3 Running against Qt: 5.15.3
Compiled against GDAL: 3.7.2 Running against GDAL: 3.7.2



**System Info** CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.22621
Capture d'écran 2023-11-28 161847

Here are my files(maybe not projected yet but it should be in ESPG 23839)

showError not defined in getwkbtext

Hello,

For a vector layer of "PointZ" type a Python error ("name 'showError' is not defined") is generated. I was able to fix it by changing line 570 in NNJoin_gui.py (else: in getwkbtext) from showError(...) to _self._showError(...).

Would it make sense to include PointZ in the list of supported types, and issue a warning that the z coordinate will be ignored?

Joerg

Status bar shows 100% but no joined file created

When I run a large spatial point to polygon join of 2 million points to 657 polygons using NNjoin, when the process completes and the status bar shows 100%, the NNjoin window does not close and no output file is created or added to QGIS, even after waiting an hour. If I close the status bar on QGIS, I get a Python error "RuntimeError: wrapped C/C++ object of type QProgressBar has been deleted.

NNjoin works fine on smaller point files of tens of thousands rather than millions. Will it work for these larger files?

Include in Processing

I really think your plugin should become a core algorithm of Processing (yeah I now it's not the first time I'm saying this :P )

QGIS Crashes When Running NNJoin

When running NNJoin 1.2.0 in QGIS 2.6.0 on OS X Yosemite 10.10.1, QGIS crashes when clicking 'OK" in the NNJoin dialog.
screenshot 2014-12-11 11 48 28

screenshot 2014-12-11 11 49 05

This has been reproduced on two different systems, each running the same versions of NNJoin and OS X. They're running either QGIS 2.6.0 or 2.6.1.

Would a crash report be helpful?

Warning NNjoin

Hi,
there is an error everytime we use NNjoin.

File "C:/Users/....\NNJoin_gui.py", line 367, in layerlistchanged
QMessageBox.information(None,
NameError: name 'QMessageBox' is not defined

Cardinality Question: What record does NN Join choose when there are two points inside a polygon?

Does anyone know what record will be chosen when using NN Join in QGIS when joining a polygon layer to a point layer with one-to-many cardinality?

I am joining a point layer to a polygon layer. The points layer are well test results with dates and concentration readings. I only want the oldest test result to be joined to the polygon it falls inside of but I'm not sure how NN Join selects which point will be joined to the polygon. Please help if you know!

Capture
(Which of the two points will be joined!?)

error TypeError: setValue(self, int): argument 1 has unexpected type 'float'

Hi
have you a issue for me ?
after install NNjoin on Ubuntu 22.04 and QGIS 3.22, when i click on icon

`Une erreur est survenue lors de l'éxécution du code Python:

TypeError: setValue(self, int): argument 1 has unexpected type 'float'
Traceback (most recent call last):
File "/home/laurent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NNJoin/NNJoin_plugin.py", line 139, in run
self.dlg.progressBar.setValue(0.0)
TypeError: setValue(self, int): argument 1 has unexpected type 'float'

Version de Python : 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
Version de QGIS : 3.22.4-Białowieża Białowieża, exported `

LJ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.