Re: [Qgis-developer] Adding default OSM backround maps

2017-04-28 Thread Paolo Cavallini
Il 27/03/2017 12:25, Jürgen E. Fischer ha scritto:
> On Tue, 21. Mar 2017 at 14:58:30 +, Jorge Gustavo Rocha wrote:
>> 1. The UserAgent is already a configurable feature in QGIS (under
>> Options/Network). Any user can change it, but we can propose another
>> default value.
> 
> Correct.  And the default is what Qt would use by default.  There might be
> servers expecting a browser signature as well - so changing this default
> is probably not good for everyone either.

Hi all,
let's see if we can implement this during the HF.
I recap here the requests by OSM PSC:

1. You seem to be using an user agent of "Mozilla/5.0 QGIS/2.18.3". We
strongly recommend that you don't pretend to be a browser by adding the
"Mozilla" bit. OpenStreetMap sees increasing traffic from "fake" user
agents, and it is likely that we will penalise user agents like that at
some point in the future - meaning tiles will still be served, but
slower than to "honest" user agents that don't pretend to be a browser
when they are not. We understand that this is difficult terrain and that
other data sources might actually *require* that you pretend to be a
browser - perhaps per-datasource overrides of the user agent are a
possibility.

2. As you know, OpenStreetMap thrives on contributions by mappers, and
one of the main reasons we make our tiles freely available is the hope
of attracting new contributors. It would be nice if QGIS could do its
part to help us here, by making their users aware that OSM is open for
everyone to contribute. Perhaps a link to
http://www.openstreetmap.org/fixthemap can be placed somewhere in the
layer description or something.

a proposal by Jorge Gustavo Rocha:
> 2. The QGIS community is very much aware of OpenStreetMap. If we really
> need to make our users more aware, does it make sense to add a new
> button to QGIS to report map errors? (context dependent, when the
> OpenStreetMap layer is shown) It would have the same functionality of
> the notes in OpenStreetMap web interface.

3. Our data is licensed under ODbL 1.0, and our map tiles are CC-BY-SA
2.0. The latter could change at any time; the former is
relatively constant.

The legal consequences of this situation for your users are:

* If they publish an image in which our tiles are visible, they must
attribute OpenStreetMap as the source, and specify that the map image is
CC-BY-SA 2.0, and specify that the data behind it is ODbL 1.0. All these
requirements can be fulfilled in one go by linking to
www.openstreetmap.org/copyright but there is no legal requirement to
link to that page.

a proposal:
> 3.1 On the "add layer" dialog, we can show the OpenStreetMap url (which
> might change over time) and licenses (for data and tiles) taken from
> settings or an (external) resource. We can make this not hard coded, to
> be modified easily, without upgrading QGIS. We can also check if the
> service is enabled for us, before allow users to add that layer (related
> with 4.).

* Everyone is allowed to create derivatives of OpenStreetMap data - for
example by tracing features on the OSM tiles - and freely distribute
them. Such derived datasets, unless they are "insubstantial"
(https://wiki.osmfoundation.org/wiki/Licence/Community_Guidelines/Substantial_-_Guideline)
inherit the ODbL license and must, when publicly used, on request be
made available under ODbL.

a proposal:
> 3.2 When the tiles are used in the composer or on the web client, we can
> not enforce an attribution string. We might add or suggest it, but users
> should be free the create and edit the attributions. It the
> responsibility of the user, not a QGIS responsibility.

4. If the load coming from QGIS should be unexpectedly high and impact
our service performance, there might come a time where we'd have to
throttle or even switch off this access. You should have some mechanism
or plan that deals with that to avoid frustration among your user base -
maybe a mechanism where QGIS installations request updated tile sources
from a central service so you could notify them of the OSM tiles not
being available (or being available elsewhere) should the need arise.

> 4. We have to handle when tiles are not loading, either because there
> are network problems, server busy, etc. We can customize the user's
> feedback regarding the load of the default OpenStreetMap tiles. But we
> definitely need to know formally when they shut our access down. This is
> related with 3.1 issue. If the access is disabled, we can also disable
> adding default OpenStreetMap tiles option.

Anyone interested?
All the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
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] MMQGIS - Where is the Code Repository & Tracker?

2017-04-28 Thread Paolo Cavallini
Il 21/03/2017 22:07, C Hamilton ha scritto:
> I was wanting to contact the developer of MMQGIS and found on the
> http://plugins.qgis.org/plugins/mmqgis/ page that the link to the Code
> repository links back to itself and the Tracker goes to the home page
> for documentation. As far as I can tell there is no contact information
> or the ability to report bugs or give suggestions. I thought that both
> of these were to be a part of the information the plugin provides. At
> any rate it would be useful if it were available. I would like to
> contact the developer.

Hi,
it should be fixed now, thanks to Michael.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
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 [1035] Lat Lon Tools approval notification.

2017-04-28 Thread noreply

Plugin Lat Lon Tools approval by pcav.
The plugin version "[1035] Lat Lon Tools 0.8.1" is now approved
Link: http://plugins.qgis.org/plugins/latlontools/
___
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 [1100] shp2grass_checker approval notification.

2017-04-28 Thread noreply

Plugin shp2grass_checker approval by pcav.
The plugin version "[1100] shp2grass_checker 0.1.0 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/shp2grass_checker/
___
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 [1133] Metadata-DB-Linker approval notification.

2017-04-28 Thread noreply

Plugin Metadata-DB-Linker approval by pcav.
The plugin version "[1133] Metadata-DB-Linker 0.1.7 Experimental" is now 
approved
Link: http://plugins.qgis.org/plugins/MetadataDbLinker/
___
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 [1119] Linear Theory of Orographic Precipitation Model approval notification.

2017-04-28 Thread noreply

Plugin Linear Theory of Orographic Precipitation Model approval by pcav.
The plugin version "[1119] Linear Theory of Orographic Precipitation Model 0.1 
Experimental" is now approved
Link: http://plugins.qgis.org/plugins/LinearTheoryOrographicPrecipitation/
___
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 [1102] AequilibraE approval notification.

2017-04-28 Thread noreply

Plugin AequilibraE approval by pcav.
The plugin version "[1102] AequilibraE 0.3.2" is now approved
Link: http://plugins.qgis.org/plugins/AequilibraE/
___
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 [1102] AequilibraE approval notification.

2017-04-28 Thread noreply

Plugin AequilibraE approval by pcav.
The plugin version "[1102] AequilibraE 0.3.3" is now approved
Link: http://plugins.qgis.org/plugins/AequilibraE/
___
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] Core plugin : the Form-Aware Value Relation Widget plugin

2017-04-28 Thread Régis Haubourg
Hi,
one point in my todo list for Essen is to build and share specifications to
homogenize and improve relation widgets. Matthias, would you be available
for that work?
Régis

2017-04-28 15:45 GMT+02:00 Matthias Kuhn :

> Hi René-Luc,
>
> It is amazing indeed and the functionality it provides should be in core.
>
> Recently there has been a trend away from core plugins and lots of them
> have been removed.
>
> What should be done in my opinion is trying to modularize it as much as
> possible (I discussed some ideas with Alessandro in Girona but cannot
> recall it right now) and integrate this functionality as core fully
> featured core functionality.
>
> Regards
> Matthias
>
> On 4/28/17 3:21 PM, René-Luc Dhont wrote:
> > Hi Devs,
> >
> > What do you think about set the Form-Aware Value Relation Widget
> > plugin as a core plugin ?
> > https://github.com/elpaso/qgis-formawarevaluerelationwidget
> >
> > I think it has to be a core feature! Thank Alessandro Pasotti to have
> > done it!
> >
> > Regards,
> > René-Luc
> > ___
> > 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 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 [1069] Raster Properties approval notification.

2017-04-28 Thread noreply

Plugin Raster Properties approval by pcav.
The plugin version "[1069] Raster Properties 0.1" is now approved
Link: http://plugins.qgis.org/plugins/RasterProperties/
___
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 [1066] Isogeo approval notification.

2017-04-28 Thread noreply

Plugin Isogeo approval by pcav.
The plugin version "[1066] Isogeo 1.5.0" is now approved
Link: http://plugins.qgis.org/plugins/isogeo_search_engine/
___
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] release file after processing.runalg

2017-04-28 Thread Tom Chadwin
Have you tried:

tempOutput.close()

before the delete?

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/release-file-after-processing-runalg-tp5318609p5318772.html
Sent from the QGIS - Developer mailing list archive at Nabble.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

Re: [Qgis-developer] Plans for the Essen QGIS Hackfest by Boundless team

2017-04-28 Thread Régis Haubourg
Hi all,
currently in the train to Essen :) Here is a roadmap for Oslandia (and
thanks for starting the thread Luigi)

# QGIS server refactoring: We have some work to share
- performance improvements on WMS rendering using multithreaded
rendering
- performance improvements on GetCapabilities loading for large layers
without metadata (views, materialized views..)
- OGC CITE compliance continuous integration platform (uses docker to
run OGC CITE TeamEngine and Geoserver reference and produces html report of
compliance and failures). See
https://git.oslandia.net/Oslandia/qgis-server-testsuite and a html report
example here  http://37.187.164.233/ogc/latest_wms_1_3_0.html

# OSGEO4W infrastructure talk
Hugo Mercier started a talk here
https://lists.osgeo.org/pipermail/osgeo4w-dev/2017-April/003338.html
This is a critical point for QGIS and all osgeo tools. We lack mirroring
and space for this service, and all of us rely on Jurgen's shoulders
(thanks for that again). We have invested some time to be able to help in
that area.

By myself, I'd also like to take some time to upgrade some plugins to QGIS
3 and help in bug triage.


Cheers
Régis


2017-04-28 14:45 GMT+02:00 Paolo Cavallini :

> Il 28/04/2017 12:22, Luigi Pirelli ha scritto:
> > Hi community
> >
> > Here a short list of tasks planned by Boundless team during developer
> > meeting that will start tomorrow in Essen (DE):
>
> Wow, great plan! Thanks Boundless, and thank you for letting us know.
> All the best.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
> ___
> 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] release file after processing.runalg

2017-04-28 Thread enrico chiaradia

Hi Tom and thank you for your contribution.

It's hard to me to understand your issue but I will study it!

In the meantime, I made some tests again and I can replicate my problem 
both using the geoalgorithm directly from the processing framework and 
using a similar geoprocessing from SAGA (again from the processing 
framework).


In both the cases the result is the same and the input file is locked!!!

I can reproduce it on QGIS 2.14.5-Essen/WIN7 and QGIS 2.18.4/WIN10.

Instead, it seems to work under QGIS 2.14.10-Essen on UBUNTU 16.04. In 
this case the "map_to_clip.tif.aux.xml" file is created after the 
algorithm terminates.


Can someone confirm this issue?

I upload some test file here: 
https://github.com/eachiaradia/doc/tree/master/test_alg


enrico


Il 28/04/2017 16:42, Tom Chadwin ha scritto:

I had a similar issue (I think). I never solved it myself, but Luca did. The
issue is here:

https://github.com/tomchadwin/qgis2web/issues/148

The commit is here:

https://github.com/tomchadwin/qgis2web/pull/297

The code used in current master is here:

https://github.com/tomchadwin/qgis2web/blob/master/utils.py#L257

So, this might help you, but it might not.

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/release-file-after-processing-runalg-tp5318609p5318754.html
Sent from the QGIS - Developer mailing list archive at Nabble.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 [934] Pandora approval notification.

2017-04-28 Thread noreply

Plugin Pandora approval by pcav.
The plugin version "[934] Pandora 2.0.1" is now approved
Link: http://plugins.qgis.org/plugins/pandora/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.1.3" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.1.2" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.2.2" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.2.1" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.3.0" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.3.1" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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 [618] Processing BEAM and SNAP algorithm Provider approval notification.

2017-04-28 Thread noreply

Plugin Processing BEAM and SNAP algorithm Provider approval by pcav.
The plugin version "[618] Processing BEAM and SNAP algorithm Provider 1.4.0" is 
now approved
Link: http://plugins.qgis.org/plugins/processing_gpf/
___
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] release file after processing.runalg

2017-04-28 Thread Tom Chadwin
I had a similar issue (I think). I never solved it myself, but Luca did. The
issue is here:

https://github.com/tomchadwin/qgis2web/issues/148

The commit is here:

https://github.com/tomchadwin/qgis2web/pull/297

The code used in current master is here:

https://github.com/tomchadwin/qgis2web/blob/master/utils.py#L257

So, this might help you, but it might not.

Tom



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/release-file-after-processing-runalg-tp5318609p5318754.html
Sent from the QGIS - Developer mailing list archive at Nabble.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

Re: [Qgis-developer] release file after processing.runalg

2017-04-28 Thread enrico chiaradia

no luck :(

Il 28/04/2017 11:47, s k ha scritto:

Hi Enrico,
maybe you should register a rasterlayer direct with the QGisInteface[1] (then 
of course use again tempOutpt).

cheers

Stefan

[1]http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html#raster-layers



___
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] release file after processing.runalg

2017-04-28 Thread enrico chiaradia

Hi Stefan, thanks again!
the file "map_to_clip.tif" is saved on the HD and it is not submitted to 
any process before executing the script (I know that because I can 
delete it before running the script).
At the same time, I noticed that the file "map_to_clip.tif.aux.xml" was 
created after running the script and closing qgis (absolutely, I did no 
other things!).

Can that suggest the process that locks the file?


Il 28/04/2017 11:00, Stefan Kiefer ha scritto:

Hi Enrico,
how is that file map_to_clip.tif created? There still could be a reference on 
that file, maybe because of the generation process (I assume that because you 
call it tempOutput, so there could be still a reference from another process). 
For example, if that file is visualized somewhere there definitly is a referene 
on that file.

cheers

Stefan


enrico chiaradia  hat am 27. April 2017 um 16:29 
geschrieben:


Hi Stefan and many thanks for your answer! but it seems not working :(
Here the new code. I replaced "tempOutput" with "output". Layer is
correctly loaded and removed but "tempOutput" cannot be deleted.

import processing
import os

tempOutput = 'D:/test_alg/map_to_clip.tif'
maskFN = 'D:/test_alg/mask.shp'
output = 'D:/test_alg/clipped_map.tif'

algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
  tempOutput,
  maskFN,
"-",False,False,False,5,4,75,6,1,False,0,False,"",
  output)

try:
  # add to the map
  tempLay = QgsRasterLayer(output, "tempLay")
  if not tempLay.isValid(): raise Exception("Failed to load tempLay")
  QgsMapLayerRegistry.instance().addMapLayer(tempLay) #

  layermap = QgsMapLayerRegistry.instance().mapLayers()
  for i, layer in layermap.iteritems():
if layer.source() == output:
  print 'layername',layer.source()
  # Remove layer references
  QgsMapLayerRegistry.instance().removeMapLayer(layer.id()) #

  # Delete the file
  os.remove(tempOutput)

except Exception as e:
  print e




Il 27/04/2017 16:07, Stefan Kiefer ha scritto:

Hi enrico,
as far as I see from the reference you added the solution would be to add the result (resp. output) 
to a Layer instead "tempOutput". Then you remove that Layer, I suppose while removing the 
layer a reference on "tempOutput" ist released.

cheers

Stefan


enrico chiaradia  hat am 27. April 2017 um 15:13 
geschrieben:


Dear List,

I'd like to remove an existing file (see [tempOutput]) after it was used
by a geoalgorithm. The geoalgorithm works perfectly but after its
execution, the file [tempOutput] is locked.

Here a simple test script that returns "[Error 32] The process cannot
access the file because it is being used by another process:
'D:/test_alg/map_to_clip.tif'":

import processing
import os

tempOutput = 'D:/test_alg/map_to_clip.tif'
maskFN = 'D:/test_alg/mask.shp'
output = 'D:/test_alg/clipped_map.tif'

algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
   tempOutput,
   maskFN,
"-",False,False,False,5,4,75,6,1,False,0,False,"",
   output)

try:
   os.remove(tempOutput)
except Exception as e:
   print e

I also found a solution on the web [1] but it doesn't work for me :( If
I understand correctly, the trick is to load the file as layer and then
release it. Here its implementation:

import processing
import os

tempOutput = 'D:/test_alg/map_to_clip.tif'
maskFN = 'D:/test_alg/mask.shp'
output = 'D:/test_alg/clipped_map.tif'

algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
   tempOutput,
   maskFN,
"-",False,False,False,5,4,75,6,1,False,0,False,"",
   output)

try:
   # add to the map
   tempLay = QgsRasterLayer(tempOutput, "tempLay")
   if not tempLay.isValid(): raise Exception("Failed to load tempLay")
   QgsMapLayerRegistry.instance().addMapLayer(tempLay) #

   layermap = QgsMapLayerRegistry.instance().mapLayers()
   for i, layer in layermap.iteritems():
 print 'layername',layer.source()
 if layer.source() == tempOutput:
   # Remove layer references
   QgsMapLayerRegistry.instance().removeMapLayer(layer.id()) #
   # Delete the file
   os.remove(tempOutput)

except Exception as e:
   print e

I didn't find any other solution for the moment. Any suggestion is
really very appreciate!

Thanks

enrico


[1]
https://gis.stackexchange.com/questions/93143/can-not-delete-file-after-using-runalg-function



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: 

[Qgis-developer] QGIS-GDAL OUT-DB RASTER SUPPORT

2017-04-28 Thread Osahon Oduware
Hi All,

I am getting a black image when I try to display PostGIS out-db rasters. I
discovered that it has to do with GDAL support for out-db rasters as stated
in the link below for a similar issue (over 1 year back):
https://hub.qgis.org/issues/12133

The last comment by Jürgen Fischer states "... only black images. So it's a
dependency issue (GDAL complains ERROR 1: This raster has outdb storage.
This feature isn't still available)."

I would like to know if out-db rasters remain unsupported by GDAL. If yes,
how do one solve this issue of displaying out-db rasters?
___
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] Core plugin : the Form-Aware Value Relation Widget plugin

2017-04-28 Thread Matthias Kuhn
Hi René-Luc,

It is amazing indeed and the functionality it provides should be in core.

Recently there has been a trend away from core plugins and lots of them
have been removed.

What should be done in my opinion is trying to modularize it as much as
possible (I discussed some ideas with Alessandro in Girona but cannot
recall it right now) and integrate this functionality as core fully
featured core functionality.

Regards
Matthias

On 4/28/17 3:21 PM, René-Luc Dhont wrote:
> Hi Devs,
>
> What do you think about set the Form-Aware Value Relation Widget
> plugin as a core plugin ?
> https://github.com/elpaso/qgis-formawarevaluerelationwidget
>
> I think it has to be a core feature! Thank Alessandro Pasotti to have
> done it!
>
> Regards,
> René-Luc
> ___
> 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] Core plugin : the Form-Aware Value Relation Widget plugin

2017-04-28 Thread René-Luc Dhont

Hi Devs,

What do you think about set the Form-Aware Value Relation Widget plugin 
as a core plugin ?

https://github.com/elpaso/qgis-formawarevaluerelationwidget

I think it has to be a core feature! Thank Alessandro Pasotti to have 
done it!


Regards,
René-Luc
___
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] Plans for the Essen QGIS Hackfest by Boundless team

2017-04-28 Thread Paolo Cavallini
Il 28/04/2017 12:22, Luigi Pirelli ha scritto:
> Hi community
> 
> Here a short list of tasks planned by Boundless team during developer
> meeting that will start tomorrow in Essen (DE):

Wow, great plan! Thanks Boundless, and thank you for letting us know.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
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] Are there plans to create a unique "Add layer" tool?

2017-04-28 Thread Stéphane Henriod
Very good!

Looking forward to hearing the outcome of these discussions!

Cheers and thanks for your support here

Stéphane


“When you travel, remember that a foreign country is not designed to make
you comfortable. It is designed to make its own people comfortable." --
Clifton Fadiman

2017-04-27 22:54 GMT+06:00 Alexandre Neto :

> Hi,
>
> Some of my colleagues will be in Essen for QGIS Developers meeting. They
> will bring this up, and try to get the opinion of other developers. I'm
> sure everyone there will be interested in contributing with ideas for it.
>
> So, let's wait for now.
>
> Thanks for your work.
>
> Stéphane Henriod  escreveu no dia quinta,
> 27/04/2017 às 09:42:
>
>> Hi all
>>
>> I would be more than happy to help push this new feature forward but I am
>> not really sure what is needed now?
>>
>> Alexandre, I think you mentioned that your company might be interested to
>> implement this unique "Add layer" button. Does the Gdoc now contain
>> sufficient information for you to move on and identify what can
>> realistically be done? Or is there a need for more polishing?
>>
>> Thanks in advance!
>>
>> Stéphane
>>
>>
>> Le vendredi 21 avril 2017, Stéphane Henriod  a
>> écrit :
>>
>>> Done!
>>>
>>> https://docs.google.com/document/d/1aMX9jOfl10q8oETRzOHSHnRpHCc7U
>>> J1dDnCCq3VyTAY/edit?usp=sharing
>>>
>>>
>>> “When you travel, remember that a foreign country is not designed to
>>> make you comfortable. It is designed to make its own people comfortable."
>>> -- Clifton Fadiman
>>>
>>> 2017-04-20 14:47 GMT+06:00 Alexandre Neto :
>>>
 Fine with me.

 Stéphane Henriod  escreveu no dia terça,
 18/04/2017 às 05:46:

> Hi all
>
> Harrissou has quite intensively re-organised the doc, which is now,
> IMO, much clearer. Thanks for that!
>
> But lots of changes are in "suggestion mode". I'd like to accept all
> those changes to increase the clarity and readability. Any objection on
> this?
>
> Thanks and cheers
>
> Stéphane
>
>
> Le mercredi 12 avril 2017, Alexandre Neto  a
> écrit :
>
>> Hi Stéphane,
>>
>> I believe it's a great starting point, very complete (I would not
>> remember/consider some types of data).
>>
>> We still need to fill the second page and discuss the possible UI/UX
>> implementation. Then, we will need some developers (I'm not a developer) 
>> to
>> consider the requests and filter what would be hard or impossible to 
>> tackle.
>>
>> Our best chance to have this implemented is by doing baby steps. I
>> would not consider more data format/providers than the ones we have in 
>> the
>> manage layers toolbar in this first phase.
>>
>> Thanks!
>>
>> Stéphane Henriod  escreveu no dia terça,
>> 11/04/2017 às 12:57:
>>
>>> Hi Alexandre
>>>
>>> this is indeed great!
>>>
>>> Is the gdoc as it is now helpful enough for you to design a possible
>>> implementation? Or, if not, what other inputs / comments would be 
>>> necessary?
>>>
>>> Cheers
>>>
>>> Stéphane
>>>
>>>
>>> Le lundi 10 avril 2017, Alexandre Neto  a
>>> écrit :
>>>
 Hello all,

 At Boundless we are planning to put some development time in this
 "unified add layer" button/feature. As others already did, our idea 
 was to
 use the browser panel as a base for replacing most of the buttons and 
 add
 any capabilities that are still missing.

 So, let's work together to find what are those missing pieces, and
 how it would be the best way to implement it. We will put our thoughts 
 in
 the Google document. As soon we have it stabilized we can start 
 creating a
 QEP for it.

 Thanks,

 Alexandre Neto

 Stéphane Henriod  escreveu no dia quinta,
 6/04/2017 às 12:14:

> Thanks Harrissou!
>
> I took the liberty to remove the first table (that I created) and
> to leave only yours. It is more complete anyway
>
> Cheers
>
> Stéphane
>
>
> Le mercredi 5 avril 2017, DelazJ  a écrit :
>
>> I took the liberty to do some changes to the doc (especially add
>> a new table with more detailed features on the existing tools + 
>> comments).
>> It's supposed to replace the table already drafted but I didn't go 
>> so far
>> without a review.
>>
>> 2017-04-05 10:36 GMT+02:00 DelazJ :
>>
>>> Hi Stéphane,
>>> actually 

[Qgis-developer] Plans for the Essen QGIS Hackfest by Boundless team

2017-04-28 Thread Luigi Pirelli
Hi community

Here a short list of tasks planned by Boundless team during developer
meeting that will start tomorrow in Essen (DE):


- Cleaning bug tracker

- Prioritize and work on 2.18/3.x regression fixes

- Help work on additions to Nyall’s PR about checkGeometry in
FeatureIterator (add auto validity check and more)

- Contribute to an updated template for plugins and Plugin Builder

- Contribute to the discussion about simplified Add Layer function (single
button)

- Plugin repository infrastructure maintenance and bug fix

- Presentation of some QGIS common Python libraries (qgiscommons) -
https://github.com/boundlessgeo/lib-qgis-commons

- Contribute to fixing macOS tests for better Travis CI

- Collaborate with community on best approach for QGIS project-released
macOS app bundle

- Gather community feedback for State of QGIS talk at FOSS4G 2017 in Boston

- Demo new OAuth2 authentication method plugin

- Discuss authentication system update QEP

- Discuss updates to new developer guide, specifically for devs new to
project

please contribute to the discussion on this list, or chat channels por
github.

for the team

Luigi Pirelli


**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* 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

**


-- 
Luigi Pirelli

**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* 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
**
___
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] release file after processing.runalg

2017-04-28 Thread Stefan Kiefer
Hi Enrico,
how is that file map_to_clip.tif created? There still could be a reference on 
that file, maybe because of the generation process (I assume that because you 
call it tempOutput, so there could be still a reference from another process). 
For example, if that file is visualized somewhere there definitly is a referene 
on that file.

cheers

Stefan

> enrico chiaradia  hat am 27. April 2017 um 16:29 
> geschrieben:
> 
> 
> Hi Stefan and many thanks for your answer! but it seems not working :(
> Here the new code. I replaced "tempOutput" with "output". Layer is 
> correctly loaded and removed but "tempOutput" cannot be deleted.
> 
> import processing
> import os
> 
> tempOutput = 'D:/test_alg/map_to_clip.tif'
> maskFN = 'D:/test_alg/mask.shp'
> output = 'D:/test_alg/clipped_map.tif'
> 
> algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
>  tempOutput,
>  maskFN,
> "-",False,False,False,5,4,75,6,1,False,0,False,"",
>  output)
> 
> try:
>  # add to the map
>  tempLay = QgsRasterLayer(output, "tempLay")
>  if not tempLay.isValid(): raise Exception("Failed to load tempLay")
>  QgsMapLayerRegistry.instance().addMapLayer(tempLay) #
> 
>  layermap = QgsMapLayerRegistry.instance().mapLayers()
>  for i, layer in layermap.iteritems():
>if layer.source() == output:
>  print 'layername',layer.source()
>  # Remove layer references
>  QgsMapLayerRegistry.instance().removeMapLayer(layer.id()) #
> 
>  # Delete the file
>  os.remove(tempOutput)
> 
> except Exception as e:
>  print e
> 
> 
> 
> 
> Il 27/04/2017 16:07, Stefan Kiefer ha scritto:
> > Hi enrico,
> > as far as I see from the reference you added the solution would be to add 
> > the result (resp. output) to a Layer instead "tempOutput". Then you remove 
> > that Layer, I suppose while removing the layer a reference on "tempOutput" 
> > ist released.
> >
> > cheers
> >
> > Stefan
> >
> >> enrico chiaradia  hat am 27. April 2017 um 
> >> 15:13 geschrieben:
> >>
> >>
> >> Dear List,
> >>
> >> I'd like to remove an existing file (see [tempOutput]) after it was used
> >> by a geoalgorithm. The geoalgorithm works perfectly but after its
> >> execution, the file [tempOutput] is locked.
> >>
> >> Here a simple test script that returns "[Error 32] The process cannot
> >> access the file because it is being used by another process:
> >> 'D:/test_alg/map_to_clip.tif'":
> >>
> >> import processing
> >> import os
> >>
> >> tempOutput = 'D:/test_alg/map_to_clip.tif'
> >> maskFN = 'D:/test_alg/mask.shp'
> >> output = 'D:/test_alg/clipped_map.tif'
> >>
> >> algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
> >>   tempOutput,
> >>   maskFN,
> >> "-",False,False,False,5,4,75,6,1,False,0,False,"",
> >>   output)
> >>
> >> try:
> >>   os.remove(tempOutput)
> >> except Exception as e:
> >>   print e
> >>
> >> I also found a solution on the web [1] but it doesn't work for me :( If
> >> I understand correctly, the trick is to load the file as layer and then
> >> release it. Here its implementation:
> >>
> >> import processing
> >> import os
> >>
> >> tempOutput = 'D:/test_alg/map_to_clip.tif'
> >> maskFN = 'D:/test_alg/mask.shp'
> >> output = 'D:/test_alg/clipped_map.tif'
> >>
> >> algRes = processing.runalg("gdalogr:cliprasterbymasklayer",
> >>   tempOutput,
> >>   maskFN,
> >> "-",False,False,False,5,4,75,6,1,False,0,False,"",
> >>   output)
> >>
> >> try:
> >>   # add to the map
> >>   tempLay = QgsRasterLayer(tempOutput, "tempLay")
> >>   if not tempLay.isValid(): raise Exception("Failed to load tempLay")
> >>   QgsMapLayerRegistry.instance().addMapLayer(tempLay) #
> >>
> >>   layermap = QgsMapLayerRegistry.instance().mapLayers()
> >>   for i, layer in layermap.iteritems():
> >> print 'layername',layer.source()
> >> if layer.source() == tempOutput:
> >>   # Remove layer references
> >>   QgsMapLayerRegistry.instance().removeMapLayer(layer.id()) #
> >>   # Delete the file
> >>   os.remove(tempOutput)
> >>
> >> except Exception as e:
> >>   print e
> >>
> >> I didn't find any other solution for the moment. Any suggestion is
> >> really very appreciate!
> >>
> >> Thanks
> >>
> >> enrico
> >>
> >>
> >> [1]
> >> https://gis.stackexchange.com/questions/93143/can-not-delete-file-after-using-runalg-function
> >>
> >>
> >>
> >> ___
> >> Qgis-developer mailing list
> >> Qgis-developer@lists.osgeo.org
> >> List info: