[Qgis-user] Plugin approval

2021-03-12 Thread Jean-Baptiste Desbas
Hi,

I receveid an email about plugin approvment few days ago, but the new
version is style marked as unapproved (submited 2021-02-22). Is there a
problem? Who can I contact about this?

Plugin arrayPlus approval by zimbogisgeek.
The plugin version "[1480] arrayPlus 1.7" is now approved
Link: http://plugins.qgis.org/plugins/arrayplus/

Regards,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Save field mapping

2018-10-01 Thread Jean-Baptiste Desbas
Hello Luigi,

Yes, fields can be loaded from layer, but I want to save expressions too.

I found solution by creating a processing model --> it allow to
"preconfigure" the field mapping and save the model with the mapping.

Solved ✓

[image: image.png]

Le lun. 1 oct. 2018 à 13:17, Luigi Pirelli  a écrit :

> as far as I understand, you can choose to load the mapping from a layer.
>
> so the workflow would be... create a layer where to register the mapping
> and edit it with common editing commands.
> No reason to add a export feature when you can edit a simple vector layer
> as impit to the mapping.
> Luigi Pirelli
>
>
> **
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> *
> https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
> * Hire me: http://goo.gl/BYRQKg
>
> ******
>
>
> On Mon, 1 Oct 2018 at 12:16, Jean-Baptiste Desbas 
> wrote:
>
>> Hello !
>>
>> Does anyone know any solution to save a field mapping (algo
>> "qgis:refactorfields") ?
>>
>> Thanks !
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Plugin ArrayPlus in conflit with QGIS 3.3

2018-09-17 Thread Jean-Baptiste Desbas
OK thanks ! I'll do that !

Le lun. 17 sept. 2018 à 14:53, Etienne Trimaille <
etienne.trimai...@gmail.com> a écrit :

> Hi,
>
> I think you shouldn't mark it as deprecated until all functions are in
> QGIS core.
> Indeed, https://github.com/qgis/QGIS/pull/7645 won't be merged until 3.6,
> the feature freeze is ON since friday for 3.4.
>
> If I were you, I would still release the plugin with 3.0 minimum verison
> and add something like "if Qgis.QGIS_VERSION_INT
> <https://qgis.org/api/classQgis.html#a599a850991eeb103d08d7954439df9d4> <
> 30300: register foo()" according to the current QGIS version.
>
> About array_lambda, there is now array_foreach in QGIS core using an
> expression.
>
> Le lun. 17 sept. 2018 à 04:15, Jean-Baptiste Desbas 
> a écrit :
>
>> Hello,
>>
>> I am maintener of ArrayPlus plugin (
>> https://plugins.qgis.org/plugins/arrayplus/)
>> Since QGIS 3.3 includes "hstore_to_map" and "json_to_map" functions, the
>> ArrayPlus plugin is in conflit with QGIS 3.3.  (
>> https://framagit.org/jbdesbas/arrayPlus/issues/2 )
>> Tough, I'm not sur that others functions (array_avg, array_min, etc..)
>> will be in the QGIS core (https://github.com/qgis/QGIS/pull/7645).
>>
>> So what is the proper thing to do ?
>> Release a new version of the plugin without "hstore_to_map"/"json_to_map"
>> and with minimum QGIS version 3.3 ?
>> Mark the plugin as deprecated ?
>>
>> Thanks,
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Plugin ArrayPlus in conflit with QGIS 3.3

2018-09-17 Thread Jean-Baptiste Desbas
Hello,

I am maintener of ArrayPlus plugin (
https://plugins.qgis.org/plugins/arrayplus/)
Since QGIS 3.3 includes "hstore_to_map" and "json_to_map" functions, the
ArrayPlus plugin is in conflit with QGIS 3.3.  (
https://framagit.org/jbdesbas/arrayPlus/issues/2 )
Tough, I'm not sur that others functions (array_avg, array_min, etc..) will
be in the QGIS core (https://github.com/qgis/QGIS/pull/7645).

So what is the proper thing to do ?
Release a new version of the plugin without "hstore_to_map"/"json_to_map"
and with minimum QGIS version 3.3 ?
Mark the plugin as deprecated ?

Thanks,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Geopagkage and "geom" in DBmanager

2018-09-13 Thread Jean-Baptiste Desbas
Hi,

I have to use *st_area(CastAutomagic(geom)) *instead of *st_area(geom)*,
otherwise null column is retourned.

Le jeu. 13 sept. 2018 à 11:45, Bo Victor Thomsen <
bo.victor.thom...@gmail.com> a écrit :

> Hi Lene -
>
> I've made a few observations regarding the use of GeoPackage in
> DBManager...
>
> I have a *GeoPackage* based table called "renhold" containing polygons.
> Primary key column is an integer called "fid" and the geometry column is
> called "geom" - It's pretty close to your setup
>
> If I use the *DBManager* with the *GeoPackage *dataprovider and execute
> the following statement: *select fid, st_area (geom) from renhold , *it
> returns a table with 2 columns as expected. However , column nr. 2 contains
> only nulls. However, the statement does not result in an error. The
> function "st_area" simply doesn't return a value besides null.
>
> An now the mystery!! :
>
> If I use the *DBManager* with the *Virtual Layers -> Project layers 
> *dataprovider
> and execute the following statement: *select fid, st_area (geometry) from
> renhold , *it returns a table with 2 columns as expected. And column nr.
> 2 do contain the expected area values. Go figure...
>
> NB! The "renhold" layer is visible in the map and named "renhold"
> NBB! In the *Virtual Layers* dataprovider you have to use the standard
> name "geometry" to represent the geometry column - not the real column name
> ("geom" in this case)
>
> Actually I have a reasonable explanation: The 2 different dataproviders
> uses different internal functions to calculate the area. However the
> function used by the GeoPackage Dataprovider doesn't work !
>
>
> Regards
> Bo Victor Thomsen
> LIFA Denamrk
>
> Den tor. 13. sep. 2018 kl. 09.27 skrev Alexandre Neto <
> senhor.n...@gmail.com>:
>
>> Hi Lee,
>>
>> Can you try removing the quotation marks around geom?
>>
>> Best wishes,
>>
>> Alex Neto
>>
>> A qui, 13/09/2018, 02:04, Lene Fischer  escreveu:
>>
>>> Hi,
>>> Trying out a geopackage layer in DBManager asking a simple SQL statement
>>> st_area
>>> But when I try to write a statement like this
>>>
>>> SELECT "vandopland".* , st_area("vandopland"."geom") as areal_m2
>>> FROM "vandopland"
>>>
>>>  "geom" is not found. Suggestions as geomfromexifgpsblob or geomfromfgf
>>> or geomfromwkb . Then I get "an error occured"
>>>
>>> Any suggestions what I might have done wrong.
>>>
>>> Regards from a newbee Geopagkace/DBmanager
>>>
>>> Lene Fischer
>>>
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>> --
>> Alexandre Neto
>> -
>> @AlexNetoGeo
>> http://sigsemgrilhetas.wordpress.com
>> http://gisunchained.wordpress.com
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> --
> Med venlig hilsen
>
> Bo Victor Thomsen
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Categorized Symbology

2018-08-09 Thread Jean-Baptiste Desbas
Hi,

What appened if you type " to_string(YOURFIELD) " instead of juste "
YOURFIELD " as categorized field ?

2018-08-09 11:11 GMT+02:00 GILLEN Finbar :

> Hi,
>
>
>
> I have added delimited text layer to QGIS 3.2 which I have converted to
> point layer. When I add it in I am able to style the layer using a string
> field within the attribute table.
>
>
>
> When I save the file as a geopackage layer and bring it into QGIS I am not
> able to style it the way I did previous. The distinct string values within
> the style field are not showing up. Even when I go to filter the layer the
> distinct value for the field are not showing up. I checked the attribute
> table and the field is populated.
>
>
>
> Anyone else come across this?
>
>
>
> Regards
>
> Finbar
>
>
>
> *Finbar GILLEN*
> Performance Analyst
>
>
>
>
> *
>
> The contents and any attachments of this electronic mail message are
> confidential and intended only for the named addressees. Dissemination,
> forwarding, publication or other use of the message or attachments by any
> unauthorised person is strictly prohibited.
>
> Unless stated to the contrary, any opinions expressed in this message are
> personal and may not be attributed to AXA Insurance dac or any member of
> the AXA Group of Companies.
>
> AXA Insurance dac is regulated by the Central Bank of Ireland. For
> business in Northern Ireland, AXA Insurance dac is authorised by the
> Central Bank of Ireland and subject to limited regulation by the Financial
> Conduct Authority. Details about the extent of our regulation by the
> Financial Conduct Authority are available from us on request. AXA Insurance
> dac is a private company limited by shares, registered in Ireland number
> 136155. Registered Office Wolfe Tone House, Wolfe Tone Street, Dublin 1.
>
> "AXA Supporting Road Safety in Ireland"
>
> Internet e-mails are not necessarily secure. AXA Group does not accept
> responsibility for changes made to this message after it was sent. To help
> promote the use of electronic documents and to be kinder to the
> environment, please consider whether you really need to print this
> email.
>
> *
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Add processing script to toolbox

2018-07-30 Thread Jean-Baptiste Desbas
Hi,

Any error message ?

2018-07-25 11:32 GMT+02:00 Reginald :

> Hi,
>
> I'm trying to add some scripts to the toolbox of QGIS-versie
> 3.2.1-Bonn. Whatever I do to import the script in the toolbox fails.
> I use the python icon that is in the menubar of Toolbox Processing.
> I have run the scripts and they work with QGIS 3.21.
> Any help?
>
> Regards,
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Access to iface in processing alg

2018-07-10 Thread Jean-Baptiste Desbas
Thanks to you two,

I didn't realize that it can cause other troubles.. So I will continue to
use pushInfo/repportError !

Regards,

2018-07-10 2:56 GMT+02:00 Nyall Dawson :

> On Tue, 10 Jul 2018 at 05:15, Jean-Baptiste Desbas 
> wrote:
> >
> >
> > Hi,
> >
> > I just want to display a messageBar instead of displaying it un the
> processing output console (feedback.pushInfo) It's ni big deal but i was
> just confused.
>
> As Matthias has said -- don't do this! Apart from the crashes, it will
> also break use of your algorithms from standalone scripts, where iface
> is not available. It also means the output is not properly logged, so
> users who want to save the log from model execution for later
> reference won't have these messages included.
>
> > Do toi have any tips of use case of the differents pushInfo,
> pushConsoleInfo, etc. ?
>
> Basically you can stick to pushInfo and reportError. Use pushInfo for
> informative messages, such as "Building spatial index" or "Found 56
> matching features", and reportError for... errors... e.g. "Feature
> does not have a point geometry, skipping".
>
> Nyall
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Access to iface in processing alg

2018-07-09 Thread Jean-Baptiste Desbas
Hi,

I just want to display a messageBar instead of displaying it un the
processing output console (feedback.pushInfo) It's ni big deal but i was
just confused.

Do toi have any tips of use case of the differents pushInfo,
pushConsoleInfo, etc. ?

Thanks

Le lun. 9 juil. 2018 19:18, Matthias Kuhn  a écrit :

> Hi,
>
> can you elaborate why you need access to iface? In most cases there are
> different ways that help you keep the algorithm modular and portable by
> specifying required components via parameters or acquiring them from the
> processing context.
>
> Best regards
>
> Matthias
>
> On 07/09/2018 09:58 AM, Jean-Baptiste Desbas wrote:
>
> Hello,
>
> What is the proper way to access iface in a processing alg ?
>
> I try "from qgis.utils import iface" but it crash when i make an
> iface.pushWarning.
>
> Thanks,
>
> Here is the stack trace :
>
>
>
>
> *Crash ID*: 59968a8cbec4e3d98bbe532ada707149cd7f9eee
>
>
> *Stack Trace*
> 
> QgsCustomization::preNotify :
> QObject::event :
> QApplicationPrivate::notify_helper :
> QApplication::notify :
> QgsApplication::notify :
> QCoreApplication::notifyInternal2 :
> QCoreApplicationPrivate::sendPostedEvents :
> qt_plugin_query_metadata :
> QEventDispatcherWin32::processEvents :
> CallWindowProcW :
> DispatchMessageW :
> QEventDispatcherWin32::processEvents :
> qt_plugin_query_metadata :
> QEventLoop::exec :
> QDialog::exec :
> PyCFunction_FastCallDict :
> PyObject_GenericGetAttr :
> PyEval_EvalFrameDefault :
> PyFunction_FastCallDict :
> PyObject_CallFunctionObjArgs :
> PyObject_Call :
> PyInit_QtCore :
> PyInit_QtCore :
> PyInit_QtCore :
> PyInit_QtCore :
> PyInit_QtCore :
> QMetaObject::activate :
> QAbstractItemView::doubleClicked :
> QTreeView::mouseDoubleClickEvent :
> QWidget::event :
> QFrame::event :
> QAbstractItemView::viewportEvent :
> QCoreApplicationPrivate::sendThroughObjectEventFilters :
> 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 :
> CallWindowProcW :
> DispatchMessageW :
> QEventDispatcherWin32::processEvents :
> qt_plugin_query_metadata :
> QEventLoop::exec :
> QCoreApplication::exec :
> main :
> BaseThreadInitThunk :
> RtlUserThreadStart :
> 
>
>
> *QGIS Info*
> QGIS Version: 3.2.0-Bonn
> QGIS code revision: commit:bc43194061
> Compiled against Qt: 5.9.2
> Running against Qt: 5.9.2
> Compiled against GDAL: 2.2.4
> Running against GDAL: 2.2.4
>
>
>
> *System Info*
> CPU Type: x86_64
> Kernel Type: winnt
> Kernel Version: 10.0.17134
>
>
>
> ___
> Qgis-user mailing listqgis-u...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> --
> Matthias Kuhn
> matth...@opengis.ch
> +41 (0)76 435 67 63 <+41764356763>
> [image: OPENGIS.ch Logo] <http://www.opengis.ch>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Access to iface in processing alg

2018-07-09 Thread Jean-Baptiste Desbas
Hello,

What is the proper way to access iface in a processing alg ?

I try "from qgis.utils import iface" but it crash when i make an
iface.pushWarning.

Thanks,

Here is the stack trace :




*Crash ID*: 59968a8cbec4e3d98bbe532ada707149cd7f9eee


*Stack Trace*

QgsCustomization::preNotify :
QObject::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
PyCFunction_FastCallDict :
PyObject_GenericGetAttr :
PyEval_EvalFrameDefault :
PyFunction_FastCallDict :
PyObject_CallFunctionObjArgs :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QMetaObject::activate :
QAbstractItemView::doubleClicked :
QTreeView::mouseDoubleClickEvent :
QWidget::event :
QFrame::event :
QAbstractItemView::viewportEvent :
QCoreApplicationPrivate::sendThroughObjectEventFilters :
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 :
CallWindowProcW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :



*QGIS Info*
QGIS Version: 3.2.0-Bonn
QGIS code revision: commit:bc43194061
Compiled against Qt: 5.9.2
Running against Qt: 5.9.2
Compiled against GDAL: 2.2.4
Running against GDAL: 2.2.4



*System Info*
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS 3 Processing question

2018-06-29 Thread Jean-Baptiste Desbas
Hi,

I had the same issue. I had to loop over the output vector layer (child
alg) to feed the sink (main alg). Maybe is not the
simpliest/shortest/fastest, but it works.
Something like that :

o = processing.run(
'qgis:pointsalonglines',
params, context=context, feedback=feedback
)['OUTPUT']

 (sink, dest_id) = self.parameterAsSink(
parameters,
self.OUTPUT,
context,
o.fields,
o.wkbType(),
o.sourceCrs()
)

for f in o.getFeatures()
sink.addFeature(f)


return {'OUTPUT':dest_id}


2018-06-29 9:35 GMT+02:00 Frank Broniewski :

> Hi Nyall,
>
> thanks a ton for your response. I am well know for making things tricky
> for myself 
> Anyway, my testing-algorithm-script is still not working. It runs through,
> but I do not get the expected result loaded into the layer tree. I suppose
> it runs through - the  output from the 'qgis:pointsalonglines' is a
> QgsVectorLayer - but after finishing I get nuthink back.
>
> Here's my complete script: You'll need a temporary polygon layer in a
> projected CRS (I use EPSG:31466) for it to work nicely. Copy & Paste it
> into a new script window and run it. I simply don't find the reason why the
> point result layer isn't loaded into my layer tree ...
>
>
> from qgis.PyQt.QtCore import QCoreApplication
> from qgis.core import (QgsApplication,
>QgsProcessing,
>QgsFeatureSink,
>QgsProcessingAlgorithm,
>QgsProcessingParameterFeatureSource,
>QgsProcessingParameterNumber,
>QgsProcessingParameterFeatureSink)
>
> import processing
>
>
> class PolygonCenterline(QgsProcessingAlgorithm):
>
> INPUT = 'INPUT'
> DISTANCE = 'DISTANCE'
> OUTPUT = 'OUTPUT'
>
> def tr(self, text):
> return QCoreApplication.translate('Processing', text)
>
> def createInstance(self):
> return PolygonCenterline()
>
> def group(self):
> return self.tr('Cartography')
>
> def groupId(self):
> return 'cartography'
>
> def name(self):
> return 'polygoncenterline'
>
> def displayName(self):
> return self.tr('Calculate a polygon centerline')
>
> def initAlgorithm(self, config=None):
> self.addParameter(
> QgsProcessingParameterFeatureSource(
> self.INPUT,
> self.tr('Vector Polygon Layer'),
> [QgsProcessing.TypeVectorPolygon]
> )
> )
>
> self.addParameter(
> QgsProcessingParameterNumber(
> self.DISTANCE,
> self.tr('Point distance value'),
> type=QgsProcessingParameterNumber.Double,
> minValue=10.0
> )
> )
>
> self.addParameter(
> QgsProcessingParameterFeatureSink(
> self.OUTPUT,
> self.tr('Center line')
> )
> )
>
> def processAlgorithm(self, parameters, context, feedback):
> # qgis:pointsalonglines
> params = {
> 'INPUT': parameters[self.INPUT],
> 'DISTANCE': parameters[self.DISTANCE],
> 'START_OFFSET': 0,
> 'END_OFFSET': 0,
> 'OUTPUT': 'memory:'
> }
> points = processing.run(
> 'qgis:pointsalonglines',
> params, context=context, feedback=feedback
> )['OUTPUT']
>
> return {self.OUTPUT: points}
>
>
>
>
> -Ursprüngliche Nachricht-
> Von: Nyall Dawson 
> Gesendet: Freitag, 29. Juni 2018 01:04
> An: Frank Broniewski 
> Cc: qgis-user 
> Betreff: Re: [Qgis-user] QGIS 3 Processing question
>
> On Fri, 29 Jun 2018 at 07:14, Frank Broniewski 
> wrote:
> >
> > def processAlgorithm(self, parameters, context, feedback):
>
>
> You're making this tricky for yourself! Cut out everything in
> processAlgorithm related to self.INPUT, and just pass the parameter value
> direct to the child algorithm to handle:
>
> > params = {
> >
> > 'INPUT': parameters[self.INPUT],
> >
> > 'DISTANCE': pt_value,
> >
> > 'START_OFFSET': 0,
> >
> > 'END_OFFSET': 0,
> >
> > 'OUTPUT': 'memory:'
> >
> > }
>
>
> Nyall
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Error while processing "servicearea"

2018-05-04 Thread Jean-Baptiste Desbas
Solved by myself :

serviceParameter={'INPUT':network,'START_POINTS':depart,'STRATEGY':0,'TRAVEL_COST':travel_cost,'DEFAULT_DIRECTION':2,'DEFAULT_SPEED':5.0,'TOLERANCE':0.0,'INCLUDE_BOUNDS':False,'OUTPUT_LINES':'memory:','DIRECTION_FIELD'
> : '','VALUE_BACKWARD' : '', 'VALUE_BOTH' : '', 'VALUE_FORWARD' : '' }
>
>
> r=processing.run('qgis:serviceareafromlayer',serviceParameter,feedback=feedback)
> l=r['OUTPUT_LINES']
>
for f in l.getFeatures():
> sink.addFeature(f)
>

2018-05-03 9:33 GMT+02:00 Jean-Baptiste Desbas <jb.des...@gmail.com>:

> Hello,
>
> I want to use the serviceareafromlayer alg in a python script, but it give
> me an error :
>
> Traceback (most recent call last):
> File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\
> processing\algs\qgis\ServiceAreaFromLayer.py", line 264, in
> processAlgorithm
> fields, QgsWkbTypes.MultiLineString, network.sourceCrs())
> Exception: unknown
>
> I can successfuly lunch that alg with the same input layer from the GUI,
> so what's wrong with my code ?
>
> Here is the code : http://paste.debian.net/1023040/
>
> Thanks,
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Error while processing "servicearea"

2018-05-03 Thread Jean-Baptiste Desbas
Hello,

I want to use the serviceareafromlayer alg in a python script, but it give
me an error :

Traceback (most recent call last):
File
"C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\qgis\ServiceAreaFromLayer.py",
line 264, in processAlgorithm
fields, QgsWkbTypes.MultiLineString, network.sourceCrs())
Exception: unknown

I can successfuly lunch that alg with the same input layer from the GUI, so
what's wrong with my code ?

Here is the code : http://paste.debian.net/1023040/

Thanks,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] QGIS 3 : Run alg in an algorithm

2018-04-08 Thread Jean-Baptiste Desbas
Hello,

I wan't to run a native algorithm (execute SQL) in an homemade algorithm :
I try
processing.run('qgis:executesql',{'INPUT_DATASOURCES':[sink],'INPUT_QUERY':'SELECT
* FROM input1'},feedback=None)

but i've got an error :

line 140, in processAlgorithm
a=processing.run('qgis:executesql',{'INPUT_DATASOURCES':[sink],'INPUT_QUERY':'SELECT
* FROM input1'},feedback=None)
File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 84,
in run
return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback,
context)
File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line
135, in runAlgorithm
feedback.reportError(msg)
TypeError: reportError() missing 1 required positional argument:
'fatal_error'

how can I do that ?

Thanks,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Copy-paste form definition (QGIS3)

2018-04-04 Thread Jean-Baptiste Desbas
Hello,

When I copy-paste a style form a layer to another, symbology AND form
definition are copied (because they are both part of style). Is it possible
to copy-paste form definition without symbology and vice versa ?

Thanks,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS 3 : Python scripts

2018-03-26 Thread Jean-Baptiste Desbas
Hi,

If still interested in templates for alg, i found this :
https://gis.stackexchange.com/questions/272927/processing-framework-input-variables-from-qgis-2-not-working-in-qgis-3/276263#276263
And this :
https://anitagraser.com/2018/03/25/processing-script-template-for-qgis3/amp/


2018-03-06 11:38 GMT+01:00 Stefan Giese <stefan.gi...@wheregroup.com>:

> Hi,
>
> I have the same issue. I don't know where to start with new processing
> scripts. Is there any documentation available?
>
> Best
>
> Stefan
>
> Mit freundlichen Grüßen
> Stefan Giese
> Projektleiter/Consultant
> ***
> Treffen Sie uns auf der
> FOSSGIS Konferenz 2018
> 21.-24. März 2018 in Bonnhttps://fossgis-konferenz.de/2018/
> ***
> WhereGroup GmbH & Co. KG
> Schwimmbadstr. 2
> 79100 Freiburg
> Germany
>
> Fon: +49 (0)761 / 519 102 - 61 <+49%20761%2051910261>
> Fax: +49 (0)761 / 519 102 - 11 <+49%20761%2051910211>
> stefan.gi...@wheregroup.comwww.wheregroup.com
> Amtsgericht Bonn, HRA 6788
> ---
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> ---
>
> Am 06.03.2018 um 08:41 schrieb Jean-Baptiste Desbas:
>
> Thank you for your explanation,
> So, do you know where i can find sample or doc about making python scripts
> in QGIS 3 ?
>
> 2018-03-05 9:22 GMT+01:00 Etienne Trimaille <etienne.trimai...@gmail.com>:
>
>> We should say somewhere that it's not a "script" with some simple
>> commands anymore (such as print()), but it's now following OOP (Object
>> Oriented Programming) and the user must define his class and methods
>> following the QGIS algorithm.
>>
>> Can we provide a template in the editor? Is-there a working script
>> somewhere?
>>
>> 2018-03-05 9:13 GMT+01:00 Alexander Bruy <alexander.b...@gmail.com>:
>>
>>> "Create new script" was moved to the toolbar inside Processing toolbox.
>>>
>>> As Processing API was changed, scripts should be adopted to new API.
>>>
>>> 2018-03-05 10:10 GMT+02:00 Jean-Baptiste Desbas <jb.des...@gmail.com>:
>>>
>>>> Hello,
>>>>
>>>> Since QGIS 3, I can't run python scripts :
>>>> - In the toolbox, there is no "create new scripte" under the script
>>>> block in the toolbox
>>>> - In the script editeur, when i try to run a script i have an alert :
>>>> "Seems ther is no valid script in the file"
>>>>
>>>> The issue occurs in QGIS 3.0 and 3.1.0-9.
>>>> I am on Windows 10 - 64bits.
>>>>
>>>> Anyone with the same issue ?
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ___
>>>> Qgis-user mailing list
>>>> Qgis-user@lists.osgeo.org
>>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>
>>>
>>>
>>> --
>>> Alexander Bruy
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>>
>
>
> ___
> Qgis-user mailing listqgis-u...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS3 Processing Clip

2018-03-23 Thread Jean-Baptiste Desbas
You can also use the "fix geometries" algorithm on your invalid layer

2018-03-23 11:30 GMT+01:00 Drexel Peter :

> Hi all,
>
> In QGIS 3.0 I use native:clip in processing to clip a Shapefile with
> another shapefile.
>
> The Import-Shapefile contains some invalid polygons so I get an error
>
> 
>
> Processing algorithm…
>
> AlgorithmDialog
>
> Input parameters:
>
> { 'INPUT' : 'V:/Geodaten/Wasser/Einzugsgebiete/Vlbg_Umgebung/
> Einzugsgebiete_FGW/ezg_gesamt1_bearbeitet_3D_name.shp', 'OVERLAY' :
> 'C:/temp/QGIS3/Clip-Maske.shp', 'OUTPUT' : 'memory:' }
>
>
>
> Feature (0) has invalid geometry. Please fix the geometry or change the
> Processing setting to the "Ignore invalid input features" option.
>
> Execution failed after 0.35 seconds
>
>
>
> Loading resulting layers
>
> Algorithm 'Clip' finished
>
> __
>
>
>
>
>
> In the Log-section of the Clip-Tool.
>
>
>
> But where can change the setting to “Ignore invalid input features”?
>
>
>
>
>
> Thanks
>
> Peter
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Grass not found

2018-03-20 Thread Jean-Baptiste Desbas
Hello,

Maybe check if you use the "with GRASS" shortcuts (bin\qgis-bin-g7.4.0.exe)
?
I also had some issues with GRASS algorithms when I used geopackage layer
as inputs.

Regards,

2018-03-19 20:57 GMT+01:00 :

> Thanks William.
>
> I downloaded the update and am still having the same issues.
>
> Other ideas?  Thanks guys!
>
>
> On Mon, Mar 19, 2018 at 1:51 PM, William Kyngesburye <
> wokl...@kyngchaos.com> wrote:
>
>> I just uploaded an update yesterday that should fix this.  At least the
>> 2nd error.  The first error could be a bigger problem due to my using a
>> space in the QGIS app name (there may be a path quoting issue in the GRASS
>> internals).
>>
>> On Mar 19, 2018, at 2:15 PM, jehduke...@gmail.com wrote:
>>
>> Hi,
>>
>> I'm a new Qgis user.  Here are the details:
>>
>> Qgis version  3.0.0 (Downloaded 3/17)
>> MAC OS 10.12.6 (Sierra)
>>
>> I'm trying to use Grass to do some shortest distance network calculations
>> and I receive the following error messages:
>>
>>
>> /var/folders/d3/q41sw4cj5_s479lpjf1z3hwcgn/T/processing_
>> 8f76fdc70e874abb92d2ebbbef92c2d3/grassdata/temp_location/PERMANENT:
>> /Applications/QGIS: No such file or directory
>>
>> and
>>
>> The following layers were not correctly generated.
>>
>>- /var/folders/d3/q41sw4cj5_s479lpjf1z3hwcgn/T/processing_
>>8f76fdc70e874abb92d2ebbbef92c2d3/d24dd229b47946bb8d89c4b98af
>>4e5fe/output.shp
>>
>>
>> After searching around I've tried updating the directories in GRASS
>> options as suggested here:
>>
>> https://gis.stackexchange.com/questions/219808/finding-grass
>> -module-after-upgrading-qgis-mac
>>
>> Still no dice.  Now I also get the following error when starting Qgis:
>>
>> GRASS init error: GRASS was not found in '/Applications/QGIS
>> 3.app/Contents/MacOS/grass7' (GISBASE), provider and plugin will not work.
>>
>> Any ideas?
>>
>> Thanks in advance.  Otherwise, this is way better than my old ArcGIS
>> packages.
>>
>>
>>
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>>
>> "This is a question about the past, is it? ... How can I tell that the
>> past isn't a fiction designed to account for the discrepancy between my
>> immediate physical sensations and my state of mind?"
>>
>> - The Ruler of the Universe
>>
>>
>>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS 3 : Python scripts

2018-03-05 Thread Jean-Baptiste Desbas
Thank you for your explanation,
So, do you know where i can find sample or doc about making python scripts
in QGIS 3 ?

2018-03-05 9:22 GMT+01:00 Etienne Trimaille <etienne.trimai...@gmail.com>:

> We should say somewhere that it's not a "script" with some simple commands
> anymore (such as print()), but it's now following OOP (Object Oriented
> Programming) and the user must define his class and methods following the
> QGIS algorithm.
>
> Can we provide a template in the editor? Is-there a working script
> somewhere?
>
> 2018-03-05 9:13 GMT+01:00 Alexander Bruy <alexander.b...@gmail.com>:
>
>> "Create new script" was moved to the toolbar inside Processing toolbox.
>>
>> As Processing API was changed, scripts should be adopted to new API.
>>
>> 2018-03-05 10:10 GMT+02:00 Jean-Baptiste Desbas <jb.des...@gmail.com>:
>>
>>> Hello,
>>>
>>> Since QGIS 3, I can't run python scripts :
>>> - In the toolbox, there is no "create new scripte" under the script
>>> block in the toolbox
>>> - In the script editeur, when i try to run a script i have an alert :
>>> "Seems ther is no valid script in the file"
>>>
>>> The issue occurs in QGIS 3.0 and 3.1.0-9.
>>> I am on Windows 10 - 64bits.
>>>
>>> Anyone with the same issue ?
>>>
>>> Regards,
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>>
>>
>> --
>> Alexander Bruy
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] QGIS 3 : Python scripts

2018-03-05 Thread Jean-Baptiste Desbas
Hello,

Since QGIS 3, I can't run python scripts :
- In the toolbox, there is no "create new scripte" under the script block
in the toolbox
- In the script editeur, when i try to run a script i have an alert :
"Seems ther is no valid script in the file"

The issue occurs in QGIS 3.0 and 3.1.0-9.
I am on Windows 10 - 64bits.

Anyone with the same issue ?

Regards,
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS3: can't write to loaded GPKG

2018-03-01 Thread Jean-Baptiste Desbas
Hi,

I have got this issue too. Sometimes.. I don't know when it appends or not.
Perhaps when you open the GPKG with drag'n'drop ?
You can use DB manager to save your layer in the DPKG without error.

Regards,

2018-03-01 8:56 GMT+01:00 Alessandro Pasotti :

> Hi,
>
> I've never had an issue when testing drag and drop to a gpkg from the
> browser panel, but you are not saying exactly how you're doing so I can not
> say more.
>
>
> On Mar 1, 2018 02:44, "Tobias Wendorff" 
> wrote:
>
> Hi there,
>
> I've opened a GPKG layer created by QGIS and want to export
> another layer into this GPKG. I'm getting this error:
>
> "Error: Cannot overwrite a OGR layer in place"
>
> Actually, I'm not overwriting it. It has a complete different
> name of course.
>
> In past, SQLite files were read-only when being opened, but
> with WAL, this should be possible. I mean, Firefox and others
> are doing it all the time. See:
> https://www.skoumal.net/en/parallel-read-and-write-in-sqlite/
>
> Is this a bug, which needs to be reported or is it just an
> unsupported feature?
>
> Best regards,
> Tobias
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user