Code Monkey home page Code Monkey logo

qgis-vectorfieldrenderer-plugin's People

Contributors

ccrook avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qgis-vectorfieldrenderer-plugin's Issues

Arguments did not match any overloaded call:

Hi Mr Chris Crook,

I am trying to create a vector field with the table you can see in 'Captura1.PNG' and 'Captura2.PNG' as it's showed in 'Captura3.PNG'. But then I get the error in 'Captura4.PNG'. Could you help me to find how to fix it?

Thank you in advance,
Antonio.

Captura1 Captura2 Captura3 Captura4

QGIS3 implementation thread assertion failure

QGIS3 implementation under development. Currently failing with
" ASSERT failure in QgsFeatureRenderer::renderFeature: "renderFeature called in a different thread - use a cloned renderer instead"

Looking at QgsFeatureRenderer code it appears this is caused by a two calls to QgsFeatureRenderer::startRender from different threads, or from a call to renderFeature without a corresponding call to startRender.

https://qgis.org/api/classQgsFeatureRenderer.html#af01839c584bf5fc58e259adaa318c0bd

Python plugin code for startRender is at:

https://github.com/ccrook/QGIS-VectorFieldRenderer-Plugin/blob/qgis3_wip/VectorFieldRenderer/VectorFieldRenderer.py#L412

The plugin does not override renderFeature, but does override startRender, stopRender, and symbolsForFeature.

Sample project attached below. Steps to reproduce are select test.csv layer, open properties/symbology
select VectorField renderer, set X attribute to dx and Y attribute to dy, then Ok.

Running gdb qgis.bin gives following abbreviated stack trace:

Fatal: ASSERT failure in QgsFeatureRenderer::renderFeature: "renderFeature called in a different thread - use a
 cloned renderer instead", file ../../src/core/symbology/qgsrenderer.cpp, line 121
QGIS died on signal -1Warning: QPainter::end: Painter not active, aborted
Stacktrace (piped through c++filt):
/usr/bin/qgis.bin(+0xca4d)[0x555555560a4d]
/usr/bin/qgis.bin(+0xcf5a)[0x555555560f5a]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x914c6)[0x7ffff4ae64c6]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMessageLogger::warning(char const*, ...) const+0xac)[0x7ffff4ae728c]
/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(QPainter::end()+0x35e)[0x7ffff52635ee]
/usr/lib/libqgis_core.so.2.99.0(QgsSymbolLayerUtils::symbolPreviewPixmap(QgsSymbol*, QSize, int, QgsRenderConte
xt*)+0x167)[0x7ffff5f18955]
/usr/lib/libqgis_core.so.2.99.0(QgsSymbolLegendNode::minimumIconSize(QgsRenderContext*) const+0xd3)[0x7ffff5f92
f13]
/usr/lib/libqgis_core.so.2.99.0(QgsLayerTreeModel::invalidateLegendMapBasedData()+0x1b3)[0x7ffff5f87879]
/usr/lib/libqgis_core.so.2.99.0(+0x49044b)[0x7ffff5f9044b]
/usr/lib/libqgis_core.so.2.99.0(+0x48f747)[0x7ffff5f8f747]
/usr/lib/libqgis_core.so.2.99.0(+0x48df9f)[0x7ffff5f8df9f]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void**)+0x66f)[0x7ffff4d09b
af]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimer::timerEvent(QTimerEvent*)+0x28)[0x7ffff4d165c8]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QObject::event(QEvent*)+0xa3)[0x7ffff4d0abb3]
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x8c)[0x7fff
f55ce05c]
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplication::notify(QObject*, QEvent*)+0x256)[0x7ffff55d3516]
/usr/lib/libqgis_core.so.2.99.0(QgsApplication::notify(QObject*, QEvent*)+0x9b)[0x7ffff611b319]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0xdb)[0x7ffff4cdb
38b]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimerInfoList::activateTimers()+0x52d)[0x7ffff4d305ed]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2dbaf1)[0x7ffff4d30af1]
../../src/core/qgsmessagelog.cpp: 27: (logMessage) [695ms] 2018-02-11T23:26:03 Qt[1] QPainter::end: Painter not
 active, aborted
Warning: QPainter::end: Painter not active, aborted
Stacktrace (piped through c++filt):
/usr/bin/qgis.bin(+0xca4d)[0x555555560a4d]
/usr/bin/qgis.bin(+0xcf5a)[0x555555560f5a]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x914c6)[0x7ffff4ae64c6]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMessageLogger::warning(char const*, ...) const+0xac)[0x7ffff4ae728c]
/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(QPainter::end()+0x35e)[0x7ffff52635ee]
/usr/lib/libqgis_core.so.2.99.0(QgsSymbolLayerUtils::symbolPreviewPixmap(QgsSymbol*, QSize, int, QgsRenderConte
xt*)+0x167)[0x7ffff5f18955]
/usr/lib/libqgis_core.so.2.99.0(QgsSymbolLegendNode::minimumIconSize(QgsRenderContext*) const+0xd3)[0x7ffff5f92
f13]
/usr/lib/libqgis_core.so.2.99.0(QgsLayerTreeModel::invalidateLegendMapBasedData()+0x1b3)[0x7ffff5f87879]
/usr/lib/libqgis_core.so.2.99.0(+0x49044b)[0x7ffff5f9044b]
/usr/lib/libqgis_core.so.2.99.0(+0x48f747)[0x7ffff5f8f747]
/usr/lib/libqgis_core.so.2.99.0(+0x48df9f)[0x7ffff5f8df9f]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void**)+0x66f)[0x7ffff4d09b
af]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimer::timerEvent(QTimerEvent*)+0x28)[0x7ffff4d165c8]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QObject::event(QEvent*)+0xa3)[0x7ffff4d0abb3]
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x8c)[0x7fff
f55ce05c]
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplication::notify(QObject*, QEvent*)+0x256)[0x7ffff55d3516]
/usr/lib/libqgis_core.so.2.99.0(QgsApplication::notify(QObject*, QEvent*)+0x9b)[0x7ffff611b319]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0xdb)[0x7ffff4cdb
38b]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimerInfoList::activateTimers()+0x52d)[0x7ffff4d305ed]
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2dbaf1)[0x7ffff4d30af1]

Using ubuntu 16.04 nightly-ubuntugis .. details from About are

QGIS version 2.99.0-Master QGIS code revision 779fe1a
Compiled against Qt 5.5.1 Running against Qt 5.5.1
Compiled against GDAL/OGR 2.2.2 Running against GDAL/OGR 2.2.2
Compiled against GEOS 3.5.1-CAPI-1.9.1 Running against GEOS 3.5.1-CAPI-1.9.1 r4246
PostgreSQL Client Version 9.5.2 SpatiaLite Version 4.3.0a
QWT Version 6.1.2 PROJ.4 Version 492
QScintilla2 Version 2.9.1 This copy of QGIS writes debugging output.

vectest.zip

Issues noticed by Nyall from reviewing code

You'll get a lot of crashes, because there's other parts of your
renderer which need upgrading to QGIS 3.0 API. And unfortunately when
a renderer crashes in Python code, it segfaults after dumping the
python error to the console. You'll need to run in a console to see
the Python errors which are thrown and upgrade the corresponding API
calls.

Also - I noticed you access a layer from the project within your
startRender method -- is is very unsafe for a renderer to do, since it
is running in a background thread and should not be accessing layers
at all. Just another thing to try to refactor out as you upgrade your
plugin for 3.0!

Sorry I figured it out - dont know how to delete. using with geographic coordinate systems

I am trying to use the plugin on a table linked to a spatial database. The database uses a geographical coordinate system- (lats and longs).
I am trying to reproduce the actual length using a polar coordinate system with my lengths field in metres.
if I use the symbol units as mm the length changes dependent on scale, while if I use the map unit the measurements circle the globe. I can use the scale but it is fiddly.
would it be possible to have the symbol units as true metre length, or to specify the symbol units as the project units?
I have just figured out that if I change the project coord system to metre based, then everything works fine.
thanks

AttributeError: 'QgsFeatureRendererV2' object has no attribute ...

Error occurs on platforms which do not allow setting the renderer via the properties dialog (this rendererer does not implement a graphical user interface #2) Although the fix to this issue allows the renderer to be assigned to a layer, it is unfortunately virtually useless, as the same underlying issue means that the buttons for setting the layer properties etc all generate the an error along the lines of

AttributeError: 'QgsFeatureRendererV2' object has no attribute ...

This is because the python bindings for the renderer are lost when it is passed via a C++ base class object (QgsFeatureRendererV2).

http://hub.qgis.org/issues/8646

Vector field renderer for Rasters?

Hi,
thanks for the the plugin!

I was wondering if it'd be hard to support raster files as I'm interested in a QGIS feature similar to quiver plots in matplotlib. I'm trying to visualize velocity and displacement fields that are raster not vector. As the rasters are generally large, conversion to a shapefile (vectorize) is undesirable.

Autosize and scale box not working in QGIS 2.4

It seems that the rendering refactoring for version 2.4 has disabled some functions - specifically:

  1. The use defined layer implementing the scale box is not displaying
  2. The auto-scaling of the vectors is not working.

Problem with qgis 1.9 master branch

Hi,
after compilation of Qgis 1.9 master branch sources on my desk, I installed the vector field renderer plugin.
I add a vector point layer in a new project and go in the properties of that layer. In the style tab, in the drop down combobox, I choose vector field style in place of the unique symbol. Then after the refresh of the dialogue box, all the widgets vanish and I only get : this style does not give any graphic interface (which is a translate of the french message).
What did I miss ?
Regards

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.