[QGIS-Developer] GRASS r.kappa not working in QGIS plugin

2018-08-05 Thread Sophie Crommelinck
Hello,


I am working on a QGIS plugin, that should use the module r.kappa from
GRASS. It looks like this in my plugin source code:

processing.run('grass7:r.kappa',
   {"classification": classificationLayer,
"reference": referenceLayer,
"title": 'ACCURACY ASSESSMENT',
"-h": False,
"-w": False,
"GRASS_REGION_CELLSIZE_PARAMETER": cellSize,
"GRASS_REGION_PARAMETER": None,
"output": outputFile})

As an error, I get a QgsProcessingException saying 'There were errors
executing the algorithm'.

If I run the same manually in QGIS via the toolbox, everything works fine.
Both calls of the module (manually and via the plugin) look similar in the
log message panel. I have tried providing the inputs as QgsRasterLayer and
as full filenames/paths, without success. I don't think the error is in the
GRASS module, as it works fine when executed manually. Maybe someone
encountered a similar problem?

Thank you in advance,

Sophie
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] API for adding files to .qgz file

2018-08-05 Thread Nyall Dawson
On Mon, 6 Aug 2018 at 16:03, Chris Crook  wrote:
>
> Hi.  Can anyone give me pointers for adding data to the .qgz project file.  I 
> am thinking about updating the Memory Layer saver plugin to use this but I 
> haven't spotted the API around it.  I'm thinking I could either reconfigure 
> it to embed the current .mldata file it creates within the .qgz, or possibly 
> refactor it to use the auxilliary storage.  Any suggestions or pointers 
> welcome :-)  Thanks

2 second answer - the API doesn't exist (yet)!

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] API for adding files to .qgz file

2018-08-05 Thread Chris Crook
Hi.  Can anyone give me pointers for adding data to the .qgz project file.  I 
am thinking about updating the Memory Layer saver plugin to use this but I 
haven't spotted the API around it.  I'm thinking I could either reconfigure it 
to embed the current .mldata file it creates within the .qgz, or possibly 
refactor it to use the auxilliary storage.  Any suggestions or pointers welcome 
:-)  Thanks



This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Question on FGDB support for "Save As" / "Export"

2018-08-05 Thread James Wood
As a QGIS and ArcGIS user, I am glad the file geodatabase support is there, so 
please don’t take the following negatively. I am the Spatial Infrastructure 
Manager for a statewide Next Generation 9-1-1 implementation here in the U.S., 
and we have successfully shared data with local public safety agencies using 
GeoPackage generated from the Esri suite. Alex had mentioned this earlier, but 
I wanted to elaborate so you could pass it on to your constituents if need be.  

Users can create SpatiaLite or GeoPackage (v1.0, 1.1, 1.2) using either the 
Python Console or a Python script stored in the Workspace toolset under the 
Data Management Tools toolbox. This works at all license levels (Basic, 
Standard, or Advanced) and in Desktop (ArcMap\ArcCatalog) and ArcGIS Pro. 

Here is a link to the Desktop help which, in this case, is the same for Pro:
http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/create-sqlite-database.htm

Once created, it’s easy to drag-and-drop simple feature classes (points, lines, 
and polygons) from ESRI geodatabases into the OGC DB, and from OGC to Esri. We 
have no reported errors from QGIS users in the field with this type of data 
exchange, and vice versa. From my perspective, there is little use for file 
geodatabase exchange unless the other user is at a lesser ArcGIS Desktop 
version (as referenced by Alex). This also promotes the OGC portable database 
model over the use of shapefiles, in which we have seen degradation of 
attributes because of the DBF restrictions. 

v/r
James

Sent from my iPhone

> On Aug 2, 2018, at 08:17, Even Rouault  wrote:
> 
>> On jeudi 2 août 2018 19:34:54 CEST Nyall Dawson wrote:
>>> On Thu, 2 Aug 2018 at 18:21, Andreas Neumann  wrote:
>>> However - I wonder if there would be a way to support both drivers? The
>>> Open Source driver as default for reading. And the FGDB driver for
>>> writing?
>> That's a great idea!
>> 
>> In the QGIS world we'd have to compromise a bit here and not allow
>> editing of existing layers (as you'd normally get with the closed
>> driver). I.e. we'd only use it when writing an existing layer out to a
>> copy on disk (e.g. via right click menu on a vector layer). But still,
>> allowing layers to be saved as a geodatabase would be a step forward.
>> 
>> I'm not sure how this change would need to be made though. At the
>> moment if you install the closed driver in osgeo4w it's always used,
>> for both reading and writing layers. Even/Jürgen is this an osgeo4w
>> thing or a GDAL thing? Is it possible to have two drivers installed
>> for the one format and always read using the closed driver?
> 
> As the FileGDB driver is loaded as a plugin by GDAL, it is registered first, 
> and then probed first when opening a dataset.
> Banning one of the driver can be done by defining GDAL_SKIP=FileGDB or 
> GDAL_SKIP=OpenFileGDB and calling GDALAllRegister() again.
> It is also possible to control which drivers are allowed at dataset opening 
> with GDALOpenEx() and the papszDriversAllowed argument (but that means you 
> need to know this is a FileGeodatabase)
> 
> Even
> 
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [792] EqHazard approval notification.

2018-08-05 Thread noreply

Plugin EqHazard approval by pcav.
The plugin version "[792] EqHazard 0.1.0" is now approved
Link: http://plugins.qgis.org/plugins/EqHazard/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [725] beePen approval notification.

2018-08-05 Thread noreply

Plugin beePen approval by pcav.
The plugin version "[725] beePen 0.2.0" is now approved
Link: http://plugins.qgis.org/plugins/beePen/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer