Re: [QGIS-Developer] Python slots don't get called when they're instance methods

2018-11-28 Thread G. Allegri
So it seems something related to an old issue
https://issues.qgis.org/issues/6573

In effect I've always used old style signals and slots because new style
ones always gave me some problems (on Windows).

I will have to dig into others' plugins to verify.
Anyway it's curious to see that also Processing seems to use a workaround
in its PointTool: it emits its own signal instead of using the
QgsMapToolEmitPoint.canvasClicked signal. I've done the same to circumvent
the issue... But it doesn't apply to all the situations
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/gui/PointMapTool.py

Giovanni

Il giorno gio 29 nov 2018, 00:39 Nyall Dawson  ha
scritto:

> On Thu, 29 Nov 2018 at 09:32, G. Allegri  wrote:
> >
> > During the porting of a plugin to QGIS 3.x I'm facing the following when
> using Qgs* objects' signals (it doesn't happen with Qt widgets, etc.).
> > I'm using QGIS 3.4 on Window 10.
> >
> > If I have a Python class like the following:
> >
> > >class Foo():
> > >  def __init__(self):
> > >QgsProject.instance().writeProject.connect(self.written)
> > >
> > >  def written(self, dom):
> > >(do something)
> >
>
> Hmm - this code works fine for me!
>
> class Foo():
>   def __init__(self):
> QgsProject.instance().writeProject.connect(self.written)
>
>   def written(self, dom):
> print('bah')
>
> f=Foo()
>
> This is on Linux (Fedora).
>
> 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

Re: [QGIS-Developer] Python slots don't get called when they're instance methods

2018-11-28 Thread Nyall Dawson
On Thu, 29 Nov 2018 at 09:32, G. Allegri  wrote:
>
> During the porting of a plugin to QGIS 3.x I'm facing the following when 
> using Qgs* objects' signals (it doesn't happen with Qt widgets, etc.).
> I'm using QGIS 3.4 on Window 10.
>
> If I have a Python class like the following:
>
> >class Foo():
> >  def __init__(self):
> >QgsProject.instance().writeProject.connect(self.written)
> >
> >  def written(self, dom):
> >(do something)
>

Hmm - this code works fine for me!

class Foo():
  def __init__(self):
QgsProject.instance().writeProject.connect(self.written)

  def written(self, dom):
print('bah')

f=Foo()

This is on Linux (Fedora).

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] Python slots don't get called when they're instance methods

2018-11-28 Thread G. Allegri
During the porting of a plugin to QGIS 3.x I'm facing the following when
using Qgs* objects' signals (it doesn't happen with Qt widgets, etc.).
I'm using QGIS 3.4 on Window 10.

If I have a Python class like the following:

>class Foo():
>  def __init__(self):
>QgsProject.instance().writeProject.connect(self.written)
>
>  def written(self, dom):
>(do something)

self.written is never called. The signal can only connected to unbound
methods, e.g. to a top level def function or a class method. If I write:

>class Foo():
>  def __init__(self):
>QgsProject.instance().writeProject.connect(Foo.written)
>
>  def written(dom):
>(do something)

it works, but in general I cannot make make all my methods class methods of
course!

I've also tried making Foo derive from QObject. I've also tried decorating
"def writter" as a pyQtSlot, but nothing worked.

Is it only me, is it expected or is it a (known) bug?
In case it's the expected behaviour I wonder I the old classe signals like
I  used to write:

>QObject.connect(QgsProject.instance(),SIGNAL('writeProject (QDomDocument
&)'),self.written)

could be ported to QGIS 3

Cheers,
Giovanni
___
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] [Qgis-user] HDF Bug [Was: Raster formats in Qgis 3.4]

2018-11-28 Thread Alex M
Workaround, assuming you know which subdataset you want to load (by
using gdalinfo on the commandline). Put the full path in to the dataset.

In a terminal or osgeo4w shell
$ gdalinfo MOD09A1.A2016313.h21v09.006.2016322094441.hdf | grep SUBDATA

copy the line for the layer you want to load
SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"MOD09A1.A2016313.h21v09.006.2016322094441.hdf":MOD_Grid_500m_Surface_Reflectance:sur_refl_b01

Append the full path to the file, example here is /home/user/, like
C:/user/username on Windows.

HDF4_EOS:EOS_GRID:"/home/user/MOD09A1.A2016313.h21v09.006.2016322094441.hdf":MOD_Grid_500m_Surface_Reflectance:sur_refl_b01

Paste this into the load Raster dialog in QGIS 3.4.1

Not ideal but highlights that the driver is fine, it's just the
detection and selection of subdata layers that's not working.

Thanks,
Alex

On 11/28/18 10:30, Alex M wrote:
> On Qgis-user an issue was reported with loading HDF5 files in QGIS 3.4
> no Windows 10.
> 
> I was able to confirm that HDF5 files fail in QGIS 3.4.1, on Linux also.
> Not just the user's file but file I also have. In both cases the files
> work fine in QGIS 2.18.
> 
> This appears to be a regression related to subdatasets (sublayers). No
> dialog comes up asking the user which subdataset to load, and hence the
> load fails with a Provider is not Valid message.
> 
> Only bug info I can find was an old patch that solved this 7 years ago:
> https://issues.qgis.org/issues/5041
> 
> Here's a MODIS image in HDF5 for people to test with.
> https://drive.google.com/open?id=1hQEi3cRdVRlxih06nbo0gygAvJE08ft7
> 
> A secondary, minor issue, the Browser doesn't see the file if it has an
> extension beyond .hdf, in this the case .h5 was what the user supplied.
> 
> Thanks,
> Alex
> 
> On 11/27/18 10:26, Alex M wrote:
>> Yes, please share with the group.
>>
>> Thanks,
>> Alex
>>
>> On 11/27/18 10:20, Anabel Lamaro wrote:
>>>  Thank you very much for your answer. I use Windows 10 and I have just
>>> installed version 3.14 Madeira of the Qgis software. I enclose the error
>>> message in a screenshot. I'll see if I can send you a link to the image.
>>> Thank you very much Anabel
>>>
>>> El mar., 27 nov. 2018 a las 14:33, Alex M ()
>>> escribió:
>>>
 Anabel,

 QGIS 3 supports all the same formats, however the loading dialog did
 change.
 https://www.gdal.org/formats_list.html

 Sometimes there can also be a slight variation in which drivers are
 included in the gdal install, though that usually only applies to
 proprietary formats like MrSID and ECW.

 What operating system are you using, which version of QGIS 3.4.?, and
 can you send a link with an example file others can test with?

 Do you get an error message? Please explain more about how it's not
 working.

 Thanks,
 Alex

 On 11/27/18 09:17, Anabel Lamaro wrote:
> Good afternoon: I need to open some radar satellite images (Cosmo Skymed)
> that are in .h5 format (of the hdf type). With the previous version 2.18
 it
> could open without inconvenience. I need help on this. Is there any
 add-on
> to open this type of raster format? Thank you in advance! Anabel
>
> <
 http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>
> Libre
> de virus. www.avg.com
> <
 http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
>
> ___
> Qgis-user mailing list
> qgis-u...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>


>>>
>>
> 
> ___
> 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

Re: [QGIS-Developer] [Qgis-user] HDF Bug [Was: Raster formats in Qgis 3.4]

2018-11-28 Thread Alex M
On Qgis-user an issue was reported with loading HDF5 files in QGIS 3.4
no Windows 10.

I was able to confirm that HDF5 files fail in QGIS 3.4.1, on Linux also.
Not just the user's file but file I also have. In both cases the files
work fine in QGIS 2.18.

This appears to be a regression related to subdatasets (sublayers). No
dialog comes up asking the user which subdataset to load, and hence the
load fails with a Provider is not Valid message.

Only bug info I can find was an old patch that solved this 7 years ago:
https://issues.qgis.org/issues/5041

Here's a MODIS image in HDF5 for people to test with.
https://drive.google.com/open?id=1hQEi3cRdVRlxih06nbo0gygAvJE08ft7

A secondary, minor issue, the Browser doesn't see the file if it has an
extension beyond .hdf, in this the case .h5 was what the user supplied.

Thanks,
Alex

On 11/27/18 10:26, Alex M wrote:
> Yes, please share with the group.
> 
> Thanks,
> Alex
> 
> On 11/27/18 10:20, Anabel Lamaro wrote:
>>  Thank you very much for your answer. I use Windows 10 and I have just
>> installed version 3.14 Madeira of the Qgis software. I enclose the error
>> message in a screenshot. I'll see if I can send you a link to the image.
>> Thank you very much Anabel
>>
>> El mar., 27 nov. 2018 a las 14:33, Alex M ()
>> escribió:
>>
>>> Anabel,
>>>
>>> QGIS 3 supports all the same formats, however the loading dialog did
>>> change.
>>> https://www.gdal.org/formats_list.html
>>>
>>> Sometimes there can also be a slight variation in which drivers are
>>> included in the gdal install, though that usually only applies to
>>> proprietary formats like MrSID and ECW.
>>>
>>> What operating system are you using, which version of QGIS 3.4.?, and
>>> can you send a link with an example file others can test with?
>>>
>>> Do you get an error message? Please explain more about how it's not
>>> working.
>>>
>>> Thanks,
>>> Alex
>>>
>>> On 11/27/18 09:17, Anabel Lamaro wrote:
 Good afternoon: I need to open some radar satellite images (Cosmo Skymed)
 that are in .h5 format (of the hdf type). With the previous version 2.18
>>> it
 could open without inconvenience. I need help on this. Is there any
>>> add-on
 to open this type of raster format? Thank you in advance! Anabel

 <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

 Libre
 de virus. www.avg.com
 <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail

 <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


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

>>>
>>>
>>
> 

___
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 [895] Layer Metadata Search approval notification.

2018-11-28 Thread noreply

Plugin Layer Metadata Search approval by wonder.
The plugin version "[895] Layer Metadata Search 2.1.4" is now approved
Link: http://plugins.qgis.org/plugins/LayerMetadataSearch/
___
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] question on QGIS Time Manager

2018-11-28 Thread Xandri E Roger IAS
Hi developers,
I would like to use time animation on server side. I mean I can animate a 
temporal layer in QGIS desktop application by using TimeManager plugin, but I 
want to do this in QGIS Server to be seen in a browser.
I have decided to use leaflet TimeDimension plugin to manage time requests in 
client side, but all WMS in those examples I have found return a full filled 
 tag when you do a GetCapabilities HTTP request, and so you can do 
an HTTP request with TIME=-MM-DD parameter on url.
How can I generate a QGIS WMS with this time dimension capability?
Any suggestion will be very appreciate.
Thanks in advance.
Kind regards,

Roger Xandri i Elias
IAS
   Informàtica Aj SBD
   Rambla, 
69
Ed Narcís Giralt, 2a planta
rxan...@ajsabadell.cat
Tlf: +34 93 745 33 70



  
Aquest missatge, que conté informació privada i confidencial, s'adreça 
exclusivament al destinatari o destinatària.
Si heu rebut el missatge per error, cal que ho feu saber tot seguit al remitent 
per aquesta mateixa via i que el destruïu (inclosos els arxius adjunts), amb 
l'advertiment que la utilització, la divulgació i/o la còpia total o parcial 
del contingut d'aquest missatge sense autorització està prohibida en virtut de 
la legislació vigent.

Abans d'imprimir aquest missatge penseu bé si és necessari fer-ho.

Este mensaje, que contiene información privada y confidencial, se dirige 
exclusivamente a su destinatario o destinataria.
Si ha recibido el mensaje por error, debe comunicarlo de inmediato al remitente 
por esta misma vía y destruirlo (incluidos los archivos adjuntos), con la 
advertencia de que la utilización, divulgación y/o copia sin autorización está 
prohibida en virtud de la legislación vigente.

Antes de imprimir este mensaje piense bien si es necesario hacerlo.
___
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