Re: [Qgis-user] Handling a large number of raster layers with Qgis architectural limitations

2019-11-27 Thread Nicolas Cadieux
Hi Patrick,
How many files are we dealing with before it crashes? 
Nicolas

> Le 27 nov. 2019 à 22:35, Patrick Dunford  a écrit :
> 
> 
> Hello,
> 
> the issue is not with the performance drawing the raster, it is with the 
> system only being able to have a certain number of file based rasters loaded 
> in a project before it will crash.
> 
> On 22/11/19 11:08 AM, Alexandre Neto wrote:
>> AFAIK,
>> 
>> WMST creates pyramids in cache as needed, hence it may do a better balance 
>> between disk usage and performance. You can control the number of pyramid 
>> layers you create and the compression format of it to save some space. But 
>> having raster files with 4000x4000 pixels with no pyramids will make a full 
>> read of the raster file to show even only a bit of it... That will make QGIS 
>> performance really poor.
>> 
>> Thereºs this blog post from 2010 that does some comparison between several 
>> formats and their sizes and performances. It's in portuguese, but I think 
>> you can find ways of translating it.
>> 
>> 
>> https://blog.viasig.com/2010/01/mosaicos-de-imagens-em-mapserver-com-gdal/
>> 
>> Hope it helps
>> 
>> Alexandre Neto
>> 
>> On Thu, Nov 21, 2019 at 2:05 PM Patrick Dunford  
>> wrote:
>>> Building pyramids gobbles up heaps of disk space. I tried pyramids on 157 
>>> MB layer, which created an extra file 1.6 GiB.
>>> 
>>> I can't see the WMTS building lots of temporary file pyramids using up disk
>>> 
>>> On 18/11/19 10:50 PM, Alexandre Neto wrote:
 Hi Patrick,
 
 Sorry for asking, did you create pyramids (overlays) for your raster 
 "tiles"?
 
 See more information about pyramids on QGIS official documentation:
 
 https://docs.qgis.org/3.4/en/docs/user_manual/working_with_raster/raster_properties.html#pyramids-properties
 
 To create pyramids on many files, it's probably better to use GDAL 
 directly to process all files in a folder:
 
 https://gdal.org/programs/gdaladdo.html
 
 My feeling is that the WMS service is doing that for you, and that's the 
 reason why it works well with a service.
 
 Alexandre Neto
 QGIS Support
 www.qcooperative.net
 
>>> ___
>>> 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

Re: [Qgis-user] Handling a large number of raster layers with Qgis architectural limitations

2019-11-27 Thread Falk Huettmann
Dear Colleagues, Patrick,

thanks, this is a VERY relevant issue, and might be the future concept for
GIS, of sorts (=more data volumes).
While I have no direct answer to your architecture question (sorry),
I have a sample dataset and application on the topic and can share it with
people as they see fit.
Here the manuscript and data, unpublished
https://www.earth-syst-sci-data-discuss.net/essd-2016-65/

The 104 GIS data layers (rasters) I can share via a google drive etc with
people on request and for more
progress and completion of the topic.

Arguably,
people are shopping around in the GIS world for a solution and platform
for such type of (massive multi) layer questions/analysis, and classic R
has usually a memory issue,
and supercomputing and 'the cloud' lacks the 'usual' GIS platform etc etc.
So here comes QGIS to the rescue, more or less
(consider Metadata creation in such projects also).
I am happy to learn.

Please keep me posted on this topic, offline as needed.

Thanks so much, very best
Falk Huettmann

On Wed, Nov 27, 2019 at 6:35 PM Patrick Dunford 
wrote:

> Hello,
>
> the issue is not with the performance drawing the raster, it is with the
> system only being able to have a certain number of file based rasters
> loaded in a project before it will crash.
> On 22/11/19 11:08 AM, Alexandre Neto wrote:
>
> AFAIK,
>
> WMST creates pyramids in cache as needed, hence it may do a better balance
> between disk usage and performance. You can control the number of pyramid
> layers you create and the compression format of it to save some space. But
> having raster files with 4000x4000 pixels with no pyramids will make a full
> read of the raster file to show even only a bit of it... That will make
> QGIS performance really poor.
>
> Thereºs this blog post from 2010 that does some comparison between several
> formats and their sizes and performances. It's in portuguese, but I think
> you can find ways of translating it.
>
>
> https://blog.viasig.com/2010/01/mosaicos-de-imagens-em-mapserver-com-gdal/
>
> Hope it helps
>
> Alexandre Neto
>
> On Thu, Nov 21, 2019 at 2:05 PM Patrick Dunford 
> wrote:
>
>> Building pyramids gobbles up heaps of disk space. I tried pyramids on 157
>> MB layer, which created an extra file 1.6 GiB.
>>
>> I can't see the WMTS building lots of temporary file pyramids using up
>> disk
>> On 18/11/19 10:50 PM, Alexandre Neto wrote:
>>
>> Hi Patrick,
>>
>> Sorry for asking, did you create pyramids (overlays) for your raster
>> "tiles"?
>>
>> See more information about pyramids on QGIS official documentation:
>>
>>
>> https://docs.qgis.org/3.4/en/docs/user_manual/working_with_raster/raster_properties.html#pyramids-properties
>>
>> To create pyramids on many files, it's probably better to use GDAL
>> directly to process all files in a folder:
>>
>> https://gdal.org/programs/gdaladdo.html
>>
>> My feeling is that the WMS service is doing that for you, and that's the
>> reason why it works well with a service.
>>
>> Alexandre Neto
>> QGIS Support
>> www.qcooperative.net
>>
>> ___
>> 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

Re: [Qgis-user] Handling a large number of raster layers with Qgis architectural limitations

2019-11-27 Thread Patrick Dunford

Hello,

the issue is not with the performance drawing the raster, it is with the 
system only being able to have a certain number of file based rasters 
loaded in a project before it will crash.


On 22/11/19 11:08 AM, Alexandre Neto wrote:

AFAIK,

WMST creates pyramids in cache as needed, hence it may do a better 
balance between disk usage and performance. You can control the number 
of pyramid layers you create and the compression format of it to save 
some space. But having raster files with 4000x4000 pixels with no 
pyramids will make a full read of the raster file to show even only a 
bit of it... That will make QGIS performance really poor.


Thereºs this blog post from 2010 that does some comparison 
between several formats and their sizes and performances. It's in 
portuguese, but I think you can find ways of translating it.



https://blog.viasig.com/2010/01/mosaicos-de-imagens-em-mapserver-com-gdal/

Hope it helps

Alexandre Neto

On Thu, Nov 21, 2019 at 2:05 PM Patrick Dunford 
mailto:enzedrailm...@gmail.com>> wrote:


Building pyramids gobbles up heaps of disk space. I tried pyramids
on 157 MB layer, which created an extra file 1.6 GiB.

I can't see the WMTS building lots of temporary file pyramids
using up disk

On 18/11/19 10:50 PM, Alexandre Neto wrote:

Hi Patrick,

Sorry for asking, did you create pyramids (overlays) for your
raster "tiles"?

See more information about pyramids on QGIS official documentation:


https://docs.qgis.org/3.4/en/docs/user_manual/working_with_raster/raster_properties.html#pyramids-properties

To create pyramids on many files, it's probably better to use
GDAL directly to process all files in a folder:

https://gdal.org/programs/gdaladdo.html

My feeling is that the WMS service is doing that for you, and
that's the reason why it works well with a service.

Alexandre Neto
QGIS Support
www.qcooperative.net 


___
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-Developer] Python Implementation of QgsNetworkContentFetcher

2019-11-27 Thread Nyall Dawson
On Thu, 28 Nov 2019 at 02:07, C Hamilton  wrote:
>
> For some reason I cannot seem to get QgsBlockingNetworkRequest to work. Also 
> I think there is an error in the documentation where it says, "After 
> completion of a request, the reply content should be retrieved by calling 
> getReplyContent()." It appears to me to be reply().
>
> This is basically my code. Am I doing something wrong?
> request = QgsBlockingNetworkRequest()
> request.setAuthCfg(authcfg)
> error_code = request.get(QNetworkRequest(QUrl(url)), forceRefresh=True)
>
> The error that is returned is a ServerExceptionError. Is 
> QgsBlockingNetworkRequest really handling redirects?

Got a public test case and I experiment with?

Nyall

>
> I've had luck with QgsFileDownloader, but using a method you say I shouldn't. 
> This works.
>
> tempfile = QgsProcessingUtils.generateTempFilename('data.json')
> loop = QEventLoop()
> dl = QgsFileDownloader(QUrl(url), tempfile, authcfg, delayStart=True)
> dl.downloadExited.connect(loop.quit)
> dl.startDownload()
> loop.exec_()
>
> In this case the data was correctly written into the tempfile.
>
>
>
> On Wed, Nov 27, 2019 at 12:35 AM Nyall Dawson  wrote:
>>
>> On Wed, 27 Nov 2019 at 15:26, Denis Rouzaud  wrote:
>> >
>> > Thanks Nyall for the precisions.
>> > I wasn't aware of QgsBlockingNetworkRequest.
>> >
>> > So basically, if I don't require authcf, then starting from 3.6 there is 
>> > no reason to use my python nam, I should use both QgsNetworkContentFetcher 
>> > and QgsBlockingNetworkRequest. And from 3.10 if require authcfg in 
>> > QgsNetworkContentFetcher.
>> > Is this correct?
>>
>> QgsBlockingNetworkRequest has always supported auth, so you should use
>> that in 3.6 and above in all situations WHEN you need a blocking
>> request.
>>
>> QgsNetworkContentFetcher is async, so definitely prefer to use that
>> whenever you don't need a blocking request.
>>
>> I'd say the matrix is something like
>>
>> QGIS 3.4:
>>
>>  Blocking:
>>With auth: python nam (but be aware that it CAN and DOES crash
>> crashes if used on the main thread)
>>Without auth: python nam (but be aware that it CAN and DOES crash
>> crashes if used on the main thread)
>>
>>  Non-blocking:
>>With auth:  nothing available off-the-shelf -- roll your own
>> using raw the qt and QGIS auth api?
>>Without auth: QgsNetworkContentFetcher
>>
>> QGIS 3.6 - 3.8:
>>
>>  Blocking:
>>With auth: QgsBlockingNetworkRequest
>>Without auth: QgsBlockingNetworkRequest
>>
>>  Non-blocking:
>>With auth:  nothing available off-the-shelf -- roll your own
>> using raw the qt and QGIS auth api?
>>Without auth: QgsNetworkContentFetcher
>>
>> QGIS 3.10:
>>
>>  Blocking:
>>With auth: QgsBlockingNetworkRequest
>>Without auth: QgsBlockingNetworkRequest
>>
>>  Non-blocking:
>>With auth:  QgsNetworkContentFetcher
>>Without auth: QgsNetworkContentFetcher
>>
>>
>> Nyall
>>
>>
>>
>> >
>> > Cheers,
>> > Denis
>> >
>> > Le mer. 27 nov. 2019 à 00:27, Nyall Dawson  a 
>> > écrit :
>> >>
>> >> On Wed, 27 Nov 2019 at 00:44, Denis Rouzaud  
>> >> wrote:
>> >> >
>> >> > Hi,
>> >> >
>> >> > Jumping late but we use the work from NAM Alessandro did in a couple of 
>> >> > locator filters.
>> >> > https://github.com/opengisch/qgis-swiss-locator/blob/master/swiss_locator/core/network_access_manager.py
>> >> >
>> >> > I believe I have done very very few adaptations/fixes to the original 
>> >> > work and it works like a charm.
>> >>
>> >> Not quite. It works in some circumstances, but it uses an event loop.
>> >> So if you run it on the main thread, you're potentially doing an
>> >> effective call to QApplication.processEvents, which can lead to all
>> >> sorts of crashes. That said, it's generally a safe approach to use for
>> >> QGIS <= 3.4... just don't use it in any code which relates to
>> >> rendering!
>> >>
>> >> >
>> >> > I had in mind to bring this as is within QGIS core for some time. The 
>> >> > main point being for us the blocking request rather than authcfg.
>> >>
>> >> That's EXACTLY what QgsBlockingNetworkRequest is -- please don't
>> >> re-re-implement this!
>> >>
>> >> Nyall
>> >>
>> >>
>> >> >
>> >> > Denis
>> >> >
>> >> > Le mar. 26 nov. 2019 à 15:36, C Hamilton  a 
>> >> > écrit :
>> >> >>
>> >> >> Thanks everyone. This gives me some good ideas. These are the possible 
>> >> >> solutions:
>> >> >>
>> >> >> 1. Write a python implementation of QgsNetworkContentFetcher or 
>> >> >> QgsBlockingNetworkRequest. With this I could look at the QGIS version 
>> >> >> and if it is 3.10 or greater import the core method; otherwise, import 
>> >> >> the python implementation.
>> >> >> 2. Use the old Boundless implementation if it still works in QGIS 3.
>> >> >> 3. Use QgsFileDownloader and save it as a temporary file before 
>> >> >> processing.
>> >> >>
>> >> >> Calvin
>> >> >>
>> >> >> On Tue, Nov 26, 2019 at 2:29 AM Alessandro Pasotti 
>> >> >>  wrote:
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Tue, Nov 26, 2019 

Re: [QGIS-it-user] Problema trasformazioni

2019-11-27 Thread andreaerdna
Luca Angeli wrote
> Buonasera,
> uso QGIS 3.4.13-2 su Win 10
> Il problema dell'aggiornamento alle PROJ 6 è noto o è necessario
> segnalarlo?
> 
> E' possibile sapere come fare per risolvere il problema?

Purtroppo la questione è un po' complicata e si puo' risolvere in vari modi:

Se vuoi usare la versione 3.4 LTR
1) puoi installare ex novo la standalone 3.4.13-1 (che usa ancora le
librerie GDAL 2.4.1 e PROJ 5.2.0), non la 3.4.13-2; la 3.4.13-1 la trovi
all'URL https://qgis.org/downloads/QGIS-OSGeo4W-3.4.13-1-Setup-x86_64.exe
per SO 64bit o
https://qgis.org/downloads/QGIS-OSGeo4W-3.4.13-1-Setup-x86.exe per SO 32bit.
2) oppure puoi anche fare il tentativo di continuare ad usare
l'installazione che hai già fatto 3.4.13-2 e aggiornare, tramite il setup di
OSGeo4W, le librerie gdal e proj alle versioni gdal-3.0.2-3 e proj-6.2.1-2;
non è detto però che il problema si risolva; potresti fare comunque un
tentativo prima di procedere con il punto 1)

Se vuoi passare alla versione 3.10 per sfruttare a pieno le nuove librerie
GDAL e PROJ:
3) puoi installare la versione standalone 3.10.0-2 direttamente dal sito e
poi devi aggiornare le librerie gdal e proj alle versioni gdal-3.0.2-3 e
proj-6.2.1-2 tramite il setup di OSGeo4W; questo dovrebbe risolvere gran
parte dei problemi in attesa di una nuova 3.10.1
4) puoi anche installare la versione qgis-3.10.0, anche in aggiunta alla
vesione qgis-ltr, sempre tramite il setup di OSGeo4W dell'installazione che
hai già; devi solo poi verificare che le librerie siano aggiornate
(gdal-3.0.2-3 e proj-6.2.1-2); sempre in attesa della nuova 3.10.1.

A presto.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] Problema trasformazioni

2019-11-27 Thread Luca Angeli
Buonasera,
uso QGIS 3.4.13-2 su Win 10
Il problema dell'aggiornamento alle PROJ 6 è noto o è necessario segnalarlo?
Il sistema Monte Mario fuso ovest (EPSG 3003) è largamente usato dagli
utenti.

Da quello che ho capito dalla risposta di Francesco Marucci è necessario
inserire manualmente i 7 parametri della proiezione, mentre secondo Mauro
D'Ambrosio basta aggiornare alla 3.10 (??)
Secondo Luca Bellani tornare alla versione precedente: osgeow4 non consente
tale operazione o meglio, io non ci sono riuscito.

E' possibile sapere come fare per risolvere il problema?

Grazie della disponibilità

Luca Angeli

Il giorno mer 27 nov 2019 alle ore 07:28 Mauro D'Ambroso <
dambroso.ma...@gmail.com> ha scritto:

> Purtroppo non avevo tempo di fare prove. Nell'emergenza ho installato la
> 3.10 con installer e tutto sembra a posto.
> Certo che aprendo il vecchio progetto la conversione dei vari master a
> 3003 non era automatica ma venivano proposte alcune scelte...lasciando
> quella di default tutto è stato convertito correttamente. Mi sembra anche,
> ma è solo un'impressione da verificare che sia leggermente migliorata la
> precisione nella trasformazione.
> Grazie comunque a tutti.
>
> Mauro
>
> Il mar 26 nov 2019, 18:40 francesco marucci 
> ha scritto:
>
>> ciao,
>> un consiglio veloce e un po al buio: prova a vedere se per caso nella
>> definizione del 3003 ci siano i 7 parametri towgs84 (o sono diversi) e nel
>> caso prendili dalla definizione di PROJ precedente.
>>
>> un saluto,
>> francesco
>>
>>
>> Il mar 26 nov 2019 18:31 Luca Bellani 
>> ha scritto:
>>
>>> Ciao, ci sono vari poblemi giusto con PROJ 6 (le ultimissime versioni di
>>> QGIs
>>> 3.10 e 3.4.13)
>>> Io ti consiglio di tornare alla versione immediatamente precedente, e
>>> tutto
>>> torna sotto controllo!
>>>
>>>
>>>
>>> --
>>> Sent from:
>>> http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
>>> ___
>>> QGIS-it-user mailing list
>>> QGIS-it-user@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/qgis-it-user
>>>
>> ___
>> QGIS-it-user mailing list
>> QGIS-it-user@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/qgis-it-user
>>
> ___
> QGIS-it-user mailing list
> QGIS-it-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-it-user
>
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] funzione Aggregate del Field Calculator

2019-11-27 Thread Luca Bellani
Grazie! tutto chiarissimo ora!!!
Ciao



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] [QGIS-Developer] Python Implementation of QgsNetworkContentFetcher

2019-11-27 Thread C Hamilton
For some reason I cannot seem to get QgsBlockingNetworkRequest to work.
Also I think there is an error in the documentation where it says, "After
completion of a request, the reply content should be retrieved by calling
getReplyContent()." It appears to me to be reply().

This is basically my code. Am I doing something wrong?
request = QgsBlockingNetworkRequest()
request.setAuthCfg(authcfg)
error_code = request.get(QNetworkRequest(QUrl(url)), forceRefresh=True)

The error that is returned is a ServerExceptionError. Is
QgsBlockingNetworkRequest really handling redirects?

I've had luck with QgsFileDownloader, but using a method you say I
shouldn't. This works.

tempfile = QgsProcessingUtils.generateTempFilename('data.json')
loop = QEventLoop()
dl = QgsFileDownloader(QUrl(url), tempfile, authcfg, delayStart=True)
dl.downloadExited.connect(loop.quit)
dl.startDownload()
loop.exec_()

In this case the data was correctly written into the tempfile.



On Wed, Nov 27, 2019 at 12:35 AM Nyall Dawson 
wrote:

> On Wed, 27 Nov 2019 at 15:26, Denis Rouzaud 
> wrote:
> >
> > Thanks Nyall for the precisions.
> > I wasn't aware of QgsBlockingNetworkRequest.
> >
> > So basically, if I don't require authcf, then starting from 3.6 there is
> no reason to use my python nam, I should use both QgsNetworkContentFetcher
> and QgsBlockingNetworkRequest. And from 3.10 if require authcfg in
> QgsNetworkContentFetcher.
> > Is this correct?
>
> QgsBlockingNetworkRequest has always supported auth, so you should use
> that in 3.6 and above in all situations WHEN you need a blocking
> request.
>
> QgsNetworkContentFetcher is async, so definitely prefer to use that
> whenever you don't need a blocking request.
>
> I'd say the matrix is something like
>
> QGIS 3.4:
>
>  Blocking:
>With auth: python nam (but be aware that it CAN and DOES crash
> crashes if used on the main thread)
>Without auth: python nam (but be aware that it CAN and DOES crash
> crashes if used on the main thread)
>
>  Non-blocking:
>With auth:  nothing available off-the-shelf -- roll your own
> using raw the qt and QGIS auth api?
>Without auth: QgsNetworkContentFetcher
>
> QGIS 3.6 - 3.8:
>
>  Blocking:
>With auth: QgsBlockingNetworkRequest
>Without auth: QgsBlockingNetworkRequest
>
>  Non-blocking:
>With auth:  nothing available off-the-shelf -- roll your own
> using raw the qt and QGIS auth api?
>Without auth: QgsNetworkContentFetcher
>
> QGIS 3.10:
>
>  Blocking:
>With auth: QgsBlockingNetworkRequest
>Without auth: QgsBlockingNetworkRequest
>
>  Non-blocking:
>With auth:  QgsNetworkContentFetcher
>Without auth: QgsNetworkContentFetcher
>
>
> Nyall
>
>
>
> >
> > Cheers,
> > Denis
> >
> > Le mer. 27 nov. 2019 à 00:27, Nyall Dawson  a
> écrit :
> >>
> >> On Wed, 27 Nov 2019 at 00:44, Denis Rouzaud 
> wrote:
> >> >
> >> > Hi,
> >> >
> >> > Jumping late but we use the work from NAM Alessandro did in a couple
> of locator filters.
> >> >
> https://github.com/opengisch/qgis-swiss-locator/blob/master/swiss_locator/core/network_access_manager.py
> >> >
> >> > I believe I have done very very few adaptations/fixes to the original
> work and it works like a charm.
> >>
> >> Not quite. It works in some circumstances, but it uses an event loop.
> >> So if you run it on the main thread, you're potentially doing an
> >> effective call to QApplication.processEvents, which can lead to all
> >> sorts of crashes. That said, it's generally a safe approach to use for
> >> QGIS <= 3.4... just don't use it in any code which relates to
> >> rendering!
> >>
> >> >
> >> > I had in mind to bring this as is within QGIS core for some time. The
> main point being for us the blocking request rather than authcfg.
> >>
> >> That's EXACTLY what QgsBlockingNetworkRequest is -- please don't
> >> re-re-implement this!
> >>
> >> Nyall
> >>
> >>
> >> >
> >> > Denis
> >> >
> >> > Le mar. 26 nov. 2019 à 15:36, C Hamilton  a
> écrit :
> >> >>
> >> >> Thanks everyone. This gives me some good ideas. These are the
> possible solutions:
> >> >>
> >> >> 1. Write a python implementation of QgsNetworkContentFetcher or
> QgsBlockingNetworkRequest. With this I could look at the QGIS version and
> if it is 3.10 or greater import the core method; otherwise, import the
> python implementation.
> >> >> 2. Use the old Boundless implementation if it still works in QGIS 3.
> >> >> 3. Use QgsFileDownloader and save it as a temporary file before
> processing.
> >> >>
> >> >> Calvin
> >> >>
> >> >> On Tue, Nov 26, 2019 at 2:29 AM Alessandro Pasotti <
> apaso...@gmail.com> wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Tue, Nov 26, 2019 at 8:22 AM Richard Duivenvoorde <
> rdmaili...@duif.net> wrote:
> >> 
> >>  On 26/11/2019 00.06, Nyall Dawson wrote:
> >> 
> >>  > There's not. But there's the ex-boundless "networkaccessmanager"
> >>  > implementation that supports authcfg, which you can find at
> >>  >
> 

Re: [Qgis-user] [QGIS-Developer] Python Implementation of QgsNetworkContentFetcher

2019-11-27 Thread C Hamilton
Nyall,

Thanks so much for this detailed explanation. Without it I probably would
have taken the wrong direction and wasted a lot of time.
QgsBlockingNetworkRequest is probably what I need so my development with
this will assume user's have 3.6 or later.

Calvin


On Wed, Nov 27, 2019 at 12:35 AM Nyall Dawson 
wrote:

> On Wed, 27 Nov 2019 at 15:26, Denis Rouzaud 
> wrote:
> >
> > Thanks Nyall for the precisions.
> > I wasn't aware of QgsBlockingNetworkRequest.
> >
> > So basically, if I don't require authcf, then starting from 3.6 there is
> no reason to use my python nam, I should use both QgsNetworkContentFetcher
> and QgsBlockingNetworkRequest. And from 3.10 if require authcfg in
> QgsNetworkContentFetcher.
> > Is this correct?
>
> QgsBlockingNetworkRequest has always supported auth, so you should use
> that in 3.6 and above in all situations WHEN you need a blocking
> request.
>
> QgsNetworkContentFetcher is async, so definitely prefer to use that
> whenever you don't need a blocking request.
>
> I'd say the matrix is something like
>
> QGIS 3.4:
>
>  Blocking:
>With auth: python nam (but be aware that it CAN and DOES crash
> crashes if used on the main thread)
>Without auth: python nam (but be aware that it CAN and DOES crash
> crashes if used on the main thread)
>
>  Non-blocking:
>With auth:  nothing available off-the-shelf -- roll your own
> using raw the qt and QGIS auth api?
>Without auth: QgsNetworkContentFetcher
>
> QGIS 3.6 - 3.8:
>
>  Blocking:
>With auth: QgsBlockingNetworkRequest
>Without auth: QgsBlockingNetworkRequest
>
>  Non-blocking:
>With auth:  nothing available off-the-shelf -- roll your own
> using raw the qt and QGIS auth api?
>Without auth: QgsNetworkContentFetcher
>
> QGIS 3.10:
>
>  Blocking:
>With auth: QgsBlockingNetworkRequest
>Without auth: QgsBlockingNetworkRequest
>
>  Non-blocking:
>With auth:  QgsNetworkContentFetcher
>Without auth: QgsNetworkContentFetcher
>
>
> Nyall
>
>
>
> >
> > Cheers,
> > Denis
> >
> > Le mer. 27 nov. 2019 à 00:27, Nyall Dawson  a
> écrit :
> >>
> >> On Wed, 27 Nov 2019 at 00:44, Denis Rouzaud 
> wrote:
> >> >
> >> > Hi,
> >> >
> >> > Jumping late but we use the work from NAM Alessandro did in a couple
> of locator filters.
> >> >
> https://github.com/opengisch/qgis-swiss-locator/blob/master/swiss_locator/core/network_access_manager.py
> >> >
> >> > I believe I have done very very few adaptations/fixes to the original
> work and it works like a charm.
> >>
> >> Not quite. It works in some circumstances, but it uses an event loop.
> >> So if you run it on the main thread, you're potentially doing an
> >> effective call to QApplication.processEvents, which can lead to all
> >> sorts of crashes. That said, it's generally a safe approach to use for
> >> QGIS <= 3.4... just don't use it in any code which relates to
> >> rendering!
> >>
> >> >
> >> > I had in mind to bring this as is within QGIS core for some time. The
> main point being for us the blocking request rather than authcfg.
> >>
> >> That's EXACTLY what QgsBlockingNetworkRequest is -- please don't
> >> re-re-implement this!
> >>
> >> Nyall
> >>
> >>
> >> >
> >> > Denis
> >> >
> >> > Le mar. 26 nov. 2019 à 15:36, C Hamilton  a
> écrit :
> >> >>
> >> >> Thanks everyone. This gives me some good ideas. These are the
> possible solutions:
> >> >>
> >> >> 1. Write a python implementation of QgsNetworkContentFetcher or
> QgsBlockingNetworkRequest. With this I could look at the QGIS version and
> if it is 3.10 or greater import the core method; otherwise, import the
> python implementation.
> >> >> 2. Use the old Boundless implementation if it still works in QGIS 3.
> >> >> 3. Use QgsFileDownloader and save it as a temporary file before
> processing.
> >> >>
> >> >> Calvin
> >> >>
> >> >> On Tue, Nov 26, 2019 at 2:29 AM Alessandro Pasotti <
> apaso...@gmail.com> wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Tue, Nov 26, 2019 at 8:22 AM Richard Duivenvoorde <
> rdmaili...@duif.net> wrote:
> >> 
> >>  On 26/11/2019 00.06, Nyall Dawson wrote:
> >> 
> >>  > There's not. But there's the ex-boundless "networkaccessmanager"
> >>  > implementation that supports authcfg, which you can find at
> >>  >
> https://github.com/north-road/qgis-redistricting-plugin/blob/master/redistrict/linz/networkaccessmanager.py
> >>  > (and other projects -- as far as I'm aware there's no real
> upstream
> >>  > for this... Alessandro?).
> >> 
> >>  I used this Boundless thingie for several plugins now (original
> source
> >>  is now pointing/redirecting to planetlabs [0]).
> >> >>>
> >> >>>
> >> >>> Yes, that's the "upstream" but I don't know if that one is
> maintained anymore.
> >> >>>
> >> >>> Btw, there is also a specialized class for sync/async downloads
> that supports authcfg:
> https://qgis.org/api/classQgsFileDownloader.html#details
> >> >>>
> >> >>>
> >> 
> >> 
> >>  I think we already discussed 

[QGIS-it-user] Calcolare valori basandosi su altre righe

2019-11-27 Thread afilipel
Buongiorno a tutti,
il calcolatore dei campi permette di introdurre formule basate su righe
differenti?
--
Colonna A | Colonna B
--
Tipo  1 |  55
Tipo  2 |  -1
Tipo  3 |  10
--
Ad esempio se Tipo 1 > 0 & Tipo 2 < 0 & Tipo 3 < 5, allora moltiplica 55*10 
L'ipotetica Colonna C ovviamente conterrà lo stesso valore per tutte le
righe
Grazie




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] [QGIS-Developer] Instalacion de Qgis en Rhel 7 u 8

2019-11-27 Thread Luigi Pirelli
Hi Fabian

this is a english speaking mailing list!

btw if you need latest stuffs you shouldn't use redhat that is a
conservative (certified oriented) distribution. BUT you can override the
problem running qgis ina docker container. RedHat should have docker...
then just do:
docker pull qgis:qgis:latest (or whatever version).
Tha fact that qgis on docker is based on ubuntu does not means that it does
not work on redhat... ubuntu is only the container context in which qgis is
running.

If you need more spanish speaking support you can check mailing list of
telegram group... look for info here: http://qgis.es/ or the mexican group
and so on...

regards

Luigi Pirelli

**
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Book: Mastering QGIS3 - 3rd Edition

* Hire a team: http://www.qcooperative.net
**


On Tue, 26 Nov 2019 at 22:06, Fabian Jimenez 
wrote:

> Actualmente cuento con Qgis 2.14.1 en un servidor Linux RedHat 7.3, sin
> embargo, no he podido hacer el upgrade a 3.x por medio de rpm o hacer la
> instalacion inicial por este mismo medio, ya que marca dependencias
> infinitas que aun teniendolos en un repositorio local, me sigue marcando el
> error.
>
> Tendra algun repositorio para la version Qgis 3.x o alguna documentacion
> donde me pueda basar para hacer dicha instalacion.?
>
> Por otro lado, es posible instalar la version 3.10 en un servidor RedHat
> 7.??
>
> He visto docker con Qgis, sin embargo, estos estan basados en Ubuntu,
> existe un Docker de qgis 3.x para RedHat .?
>
> De antemano muchas gracias.
>
> *Ing. Federico Fabián Jiménez Esparza*
>
>
> ___
> QGIS-Developer mailing list
> qgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
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-it-user] funzione Aggregate del Field Calculator

2019-11-27 Thread Totò
Luca Bellani wrote
> Semplice per te... ahaha! potresti darmi dei dettagli in piú sui
> componenti
> del codice?
> 
> la variabile @curret_geometry si attiva con un form aperto del value
> relation...quindi se ho un semplice layer di punti, senza widget, non
> funzionerebbe... facio delle prove..
> 
> nel codice: come si fa a differenziare la geometria del punto, e dei
> poligoni? chi é tra @current y $geometry?
> 
> Ciao e grazie mille

Ciao Luca,
La drill-down forms è stata introdotta nella QGIS 3.2 dopo una raccolta
fondi [0], l'autore è Alessandro Pasotti.
Per implementare questa funzionalità, Pasotti ha introdotto una nuova
funzione current_value() e due variabili: current_geometry e current_feature
[1]; queste sono visibili solo nel contesto del widget.

Nel caso in esame:

current_geometry: è la geometria che stai creando (nel nostro caso il punto)
$geometry: è la geometria corrente che esiste già (nel nostro caso i
poligoni)

ciao

[0] https://north-road.com/drill-down-cascading-forms/
[1]
http://hfcqgis.opendatasicilia.it/it/latest/release/novita_32.html#form-drill-down-a-cascata-widget-value-relation-relazione-valore



-
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user