Hi list
When loading a vector layer via Python, is there a way to get a hold of the
error message for when the loading fails?
I can check if the layer is valid or not, but I'd like to get a description
of the error. I see the error on the QGIS log panel, so I'm hoping it is
possible to access it
see that it is there and I was the one looking at the wrong
place.
Cheers
Denis Rouzaud escreveu no dia quarta, 2/06/2021
à(s) 09:09:
>
>
> Le mar. 1 juin 2021 à 16:43, Ricardo Filipe Soares Garcia da <
> ricardo.garcia.si...@gmail.com> a écrit :
>
>> Hi all
>>
Hi all
I see that settings management in QGIS seems to be changing for the
upcoming 3.20 release. I got this clue when consulting the online API docs
for master and then realizing there is no QgsSettings class in there
anymore.
I then searched the commit history on github and found some commits
e, please excuse my brevity.
>
> On Tue, Feb 19, 2019, 12:50 Ricardo Filipe Soares Garcia da <
> ricardo.garcia.si...@gmail.com wrote:
>
>> Hi all
>> I'm using the flatpak version of QGIS and I'd like to install some
>> additional python packages. Is this possible?
Hi all
I'm using the flatpak version of QGIS and I'd like to install some
additional python packages. Is this possible?
My current use case is I'd like to install the Time Manager plugin. This
requires the `future` package, which I do not have installed. So I want to
install it.
The flatpak is
Hi Richard
You can add widgets to a specific layer if you know the widget provider's
id. It is simply a matter of setting up the relevant custom properties.
Take a look at the code in the PR you linked, more specifically here:
Hi all
I have a working python code snippet that enables updating a WMS layer with
a different named style.
It basically manipulates the raster provider's `dataSourceUri` property,
replacing the `style=` with a different substring. and then it calls for a
reload of the data and triggers a
s you have to inherit.
> You need to implement title, icon and createWidget. In the latter, you'll
> be able to load your UI and return the widget to be displayed. The widget
> you return must inherit QgsOptionsPageWidget.
>
> I hope this helps!
>
>
> Denis
>
Hi all
The API docs for QgisInterface[1] mention the existence of a
`registerMapLayerConfigWidgetFactory()` method which says in its
documentation:
> Register a new tab in the vector layer properties dialog.
I've been trying to test this out and see if I can add a new panel to a
layer's
rdo
>
> Sorry for the delayed answer...
>
> On Mon, Sep 17, 2018 at 12:10 AM Ricardo Filipe Soares Garcia da
> wrote:
> >
> > This code kind of works, but I'm facing two problems at the moment:
> >
> > 1. The `MyWidgetProvider.supportsLayer()` method is neve
Hi all (specially Martin Dobias)
I'm working on a plugin that will use embedded widgets in the layer tree. I
am using the following as reference:
- Martin's PR that brought this feature into existence (thanks for that
BTW):
Hi Peter
In addition to Matthias' advice perhaps try using QNetworkAccessManager[1]
and related classes in order to deal with your http requests
asynchronously. This should fix the UI blocking issues.
Best regards
[1] -
http://pyqt.sourceforge.net/Docs/PyQt4/qnetworkaccessmanager.html#details
re for the world to use.
>
> Just my two cents.
>
> Denis
>
>
Cheers
>
>
>
>
> Le mar. 3 oct. 2017 à 16:09, Ricardo Filipe Soares Garcia da <
> ricardo.garcia.si...@gmail.com> a écrit :
>
>> Hi all
>>
>> Answering my own ques
ms to work on QGIS 2.18:
```
provider_registry = qgis.core.QgsProviderRegistry.instance()
add_wms_dialog = provider_registry.selectWidget("wms")
action.triggered.disconnect()
action.triggered.connect(add_wms_dialog.show)
```
Best regards
On Mon, Oct 2, 2017 at 12:41 PM, Ricardo Fil
Hi all
Is it possible to replace one of QGIS' dialogues with a custom one during
runtime by using Python?
My concrete goal is to replace the dialogue that shows when clicking the
'Add WMS/WMTS Layer' with something custom. I'd like to enhance the native
QGIS dialogue with additional elements for
It's looking great :)
Having processing algs run in the background will really improve the user
experience IMO.
Having the possibility to use expressions in order to define parameters
dynamically is really awesome too! In your video demo you effectively
turned the fixed distance buffer algorithm
I generally avoid wildcard imports. Two additional reasons not to use them:
- When you use the wildcard form it is harder for other people (and for
yourself in the future) to know just what it is that you are actually
importing. As such, debugging eventual errors takes more time.
- wildcard
My two cents:
Personally I see this whole sandbox thing as being more suitable for the
application as a whole and not specifically for the python plugins part. As
such, it seems to me that sandboxing would be a job better suited for the
OS that is running apps, and not for the apps themselves.
+1 it is a great idea. I've been teaching a few training courses on Python
and QGIS for prospecting plugin writers and I'm always reccommending
creating new plugins via processing rather than standalone (after going
through what is possible and what is not).
The main issue here, in my opinion, is
Hi list
hub.qgis.org seems to be broken for people who want to use it as a
repository for plugin's source code.
I'm having problems with it since almost a year:
http://osgeo-org.1560.x6.nabble.com/using-hub-qgis-org-git-repository-td5057063.html
and there are also several tickets related to
think this is
the best way of distributing them. If the number of example models is
high I might even classify them differently.
Thanks!
Victor
2013/9/15 Ricardo Filipe Soares Garcia da ricardo.garcia.si...@gmail.com
:
Sorry for the noise, but this message's title should say 'how
Hi list
I am building a plugin for Processing (former Sextante). Besides the
GeoAlgorithms, I'd like to include some ready-made models along with the
plugin.
Is this feasible? How to do it?
I am currently using a 'models' subdir under my plugin's code with the
models.
It seems I should be
Sorry for the noise, but this message's title should say 'how to distribute
Processing models' instead of modules...
On Sun, Sep 15, 2013 at 2:39 AM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hi list
I am building a plugin for Processing (former Sextante
Hi list
When building plugins that operate on vector layers, it is a common pattern
to include a checkbox in the plugin's GUI where the user can choose to
perform the plugin analysis on the whole layer or just using the currently
selected features (see for example most fTools dialogs).
However,
I've got that functionality ready in a separate branch but it will have
to wait for 2.1 due to the feature freeze as you mentioned
Great! Will be looking forward to it then :)
--
___ ___ __
Ricardo Garcia Silva
___
:
features = layers.selectedFeatures()[]
Else:
features = layer.getFeatures()
From: Ricardo Filipe Soares Garcia da
Sent: 17/06/2013 11:47 PM
To: qgis-developer@lists.osgeo.org
Subject: [Qgis-developer] iteration over a layer's features in python
plugins
Hi list
When building plugins
Hi list
What is the recommended way to show a help dialog in a plugin?
The pyqgis cookbook[1] advises using the qgis.utils.showPluginHelp()
function. However, this function calls iface.openURL(), which logs a
DeprecationWarning, so I guess it should not be used anymore.
Is there another
Hello list
When dealing with plugins with broken code, as is my current case, while
updating to the new SIP API, the new plugin manager (which is super nice,
by the way) will only show a portion of the error.
In my case I get an 'invalid syntax' message, which does not include the
line number
Nevermind... I just add to click to enable the plugin and it showed me the
error just as the old plugin manager. Sorry for the noise.
On Tue, Jun 11, 2013 at 11:10 PM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hello list
When dealing with plugins with broken code
be the problem?
On Thu, May 30, 2013 at 11:50 PM, Alex Mandel tech_...@wildintellect.comwrote:
On 05/30/2013 03:42 PM, Ricardo Filipe Soares Garcia da wrote:
Hi list
I created a new plugin in hub.qgis.org and I'd like to use a git
repository. I've done this in the past and had no problems but now I am
Hi list
I created a new plugin in hub.qgis.org and I'd like to use a git
repository. I've done this in the past and had no problems but now I am
having dificulties pushing the initial commit to gitosis.qgis.org
In redmine I created the repository and added my SSH key. Then I
initialized my git
Hi list
How could I extract the current project's CRS from python?
I've tried looking for it in QSettings but came up short. Mybe somewhere in
QgsProject? I can't figure out how to use the readListEntry() method though.
Thanks
--
___ ___ __
Ricardo Garcia Silva
Thanks Martin
It's working fine now!
On Tue, May 22, 2012 at 8:35 PM, Martin Dobias wonder...@gmail.com wrote:
On Mon, May 21, 2012 at 1:26 AM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hi list
I am writing a plugin that creates new features. According
Hi list
I am writing a plugin that creates new features. According to the
pyqgis cookbook[0], and the API docs[1], when I call the addFeatures
method on a QgsVectorLayer, the features should get added to the
layers editing buffer. It is my understanding that this action ought
to be undo-able,
Thanks
I got it working now!
I now have a different doubt, regarding geometry vertex iteration
(sending another e-mail with it).
On Sun, May 13, 2012 at 9:24 AM, Martin Dobias wonder...@gmail.com wrote:
Hi Ricardo
On Sun, May 13, 2012 at 1:39 AM, Ricardo Filipe Soares Garcia da
Hi list
I'm trying to translate and rotate a geometry using python, in order
to create parallel lines.
For the translation I could use QgsGeometry's translate() method, but
for the rotation I haven't found a ready-made solution. So my current
strategy is to individually rotate each vertex,
Hi list
I'm trying to code some tools for working with lines layers using
python. One such tool is meant to create parallel lines.
I am trying to create my new line geometry by first copying the
geometry of a previously selected linestring and then translating it
according to a specified
Hi Paolo
Thanks for your reports, I am the author of this plugin. I'll be
looking into the mentioned issues in a short while.
I am using hub.qgis.org for this plugin, so feel free to open new
tickets there in the future. For these issues I will do it myself.
- it is important (and does not
Hi Paolo
One more:
Traceback (most recent call last):
File C:\Documents and Settings\eleauser/.
qgis/python/plugins\profiletool\doProfile.py, line 244, in selectLayer1
self.readData(0)
File C:\Documents and Settings\eleauser/.
qgis/python/plugins\profiletool\doProfile.py, line 152,
FYI, just opened ticket #4941 describing this issue.
--
___ ___ __
Ricardo Garcia Silva
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Hi all
I'm getting the same error trying to compile latest trunk on Ubuntu
11.10 (Oneiric) 32 bit. Is there some way to solve this without
messing around with sip source? Borys, did you solve it?
--
___ ___ __
Ricardo Garcia Silva
Hi list
Sorry for the noise, but I just want to bring some attention to bug #4302.
Being able to visualize data using the GEOS projection would be a big
plus for people working with meteorological satellites, like me ;)
I guess I am hitting two separate issues, one of them seems to be
related
Hi list
Sorry for the newbish question:
I remember reading somewhere online about the QGIS_PLUGINPATH
environment variable and thinking it was a cool idea. I set it up to
point to my local development folder.
Now I want to disable it to test some improvements on a plugin, but I
don't remember
Hello list
in order to identify pixel values I'm using QgsRasterLayer.identify()
This method returns a tuple, with first value being a boolean (by the
way, see ticket[1] on trac). The second value is a dictionary with
band names as keys and pixel value.
I want to check for the pixel value and,
Hi Guiseppe
I think it is great that you're willing to develop the Database manager idea :)
Me and Luiz Motta have been collaborating on the customDBQuery plugin,
which also allows for loading of spatial queries on the map canvas. It
takes a more minimalist approach than the other plugins,
Hi Chris
In the 'Profile from lines' plugin I'm using a similar approach:
# python code
projectionSettingKey = Projections/defaultBehaviour
oldProjectionSetting = self.qgisSettings.value(projectionSettingKey)
self.qgisSettings.setValue(projectionSettingKey, useGlobal)
self.qgisSettings.sync()
Hi list
I have been working with Luiz Motta in the 'Custom db query' plugin
and we came about the dilemma of how to best format our Python code.
Looking around the QGIS wiki, we found the developers manual [1] and
read through the coding guidelines, but the rules defined in it are
for C++
Hi Noli
I can run your query in both plugins without any problem.
Maybe the real problem lies elsewhere.
I have been using using ubuntu almost exclusively lately, with
packages from the ubuntugis repository. So I really haven't had a
chance to test these things out on diferent OS/software
. http://www.gaia-gis.it/spatialite/spatialite-tutorial-2.3.1.html#t1
).
Thanks.
Noli
On 12/17/10, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hi Noli, Guiseppe, all
I downloaded the spatialite sample database and ran your query.
I could run it fine without
Hi all
To celebrate the fixing of this bug by brushtyler (Guiseppe maybe?), I
have updated 'custom db query' to version 0.4.
The plugin's window is now modeless, and it stays on top of the QGIS
main window. So you can interact with the rest of QGIS while having
the plugin open. This way you can,
Hi all
But after upgrading to v. 3.0 I get following traceback when trying to
load every query in PostGIS (for example: SELECT * from schema.table).
I uploaded v 0.3.1 that (hopefully) fixes the bug you are refering.
I will think about adding Noli's feature requests, which seem
reasonable
Hi Paolo, all
Uploaded a new version (v0.3) of the 'Custom DB query' plugin.
I've added it to the 'database' menu. Also, it is now possible to save
the result of the SQL query as a new table in its corresponding
database.
So, to summarize, you can run SQL queries over postgis or spatialite
unfinished.
A small gotcha: if you decide to test it with postgis layers, don't
forget to include the schema name when you reference a table.
Please let me have some feedback, if you have the time to test it out. Thanks
On Thu, Dec 9, 2010 at 10:40 AM, Ricardo Filipe Soares Garcia da
Sorry, forgot to add this:
I will add a small help page explaining the functionality later.
Probably tomorrow.
Cheers
On Thu, Dec 9, 2010 at 10:38 AM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hello
I have uploaded my plugin to the contributed repository. I marked
Hi all
In fact, I have a plugin that allows to load custom spatialite queries
to the map canvas. I started it as a pet project, to see if I could
improve my Qt skills ;)
Currently it is really crude. I can make it available at the
experimental repository if you are interested.
My initial goal was
Hi list
There is a bug in the generation of the Makefile in the online pyqgis
plugin builder [1].
I'm no expert on Makefile generation, but I think the only issue is an
evil tabspace, right after the 'compile' rule.
Didn't know where to report this, hopefully here is the right place.
[1] -
Hi
I think it would be great if this new 'database' section could be made
to work with spatialite as well as with postgis. Maybe the creation of
a general manager for spatial databases that could integrate the
'Postgis manager', 'Spatialite manager', 'RT SQL layer' and the rest
of the
Hi list
I'm trying to toggle my plugin's availability based on the presence or
absence of loaded vector layers of type 'line'.
For this purpose I have a _get_loaded_layers() and a
toggle_availability() methods (code follows in the end of this
message).
After searching the online API docs, it
I am sorry, I accidentally pressed some key combination that caused
gmail to send the previous message before it was finished...
Please follow the rest of the code in the attached version of the
previous e-mail.
On Tue, Aug 17, 2010 at 12:29 PM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si
Thanks Jurgen, it is working now!
On Tue, Aug 17, 2010 at 12:37 PM, Jürgen E. j...@norbit.de wrote:
Hi Ricardo,
On Tue, 17. Aug 2010 at 12:32:06 +0100, Ricardo Filipe Soares Garcia da wrote:
def initGui(self):
some other code
QObject.connect(self.layerRegistry, SIGNAL(layerWasAdded
, Aug 9, 2010 at 2:50 PM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hello list
How can I add a new field to an existing layer and insert some new
values in it? In the following example, pointLayer refers to an
existing layer, previously created using the memory provider
Hi list
A quick (and hopefully not too embarassing ;) ) question:
-How can I print some variables to the shell when creating a python plugin?
For example, I have a piece of code that goes:
# python code
parameters = dlg.return_parameters()
print(parameters: %s % parameters)
# end of code
I was
Hi again
My problem has been solved, although I admit I don't know why. I just
had to restart Qgis, and now I can see the output of my print commands
in the shell again. Sorry for the noise
On Thu, Aug 5, 2010 at 4:25 PM, Ricardo Filipe Soares Garcia da
ricardo.garcia.si...@gmail.com wrote:
Hi
63 matches
Mail list logo