Re: [Qgis-developer] Python unit tests and SIP API version

2013-06-18 Thread Nathan Woodrow
Hey Chris,

Yes I forgot to mention that any standalone pyqgis scripts, like the unit
tests, will need to have the sip version set before PyQt4 is imported.  On
Python < 3 PyQt4 will automatically set its SIP version to 1.  In Python >
3 this will change but for now you will have to set it your self.

What I did think of doing was setting the SIP version in qgis.core so that
if you import them first then everything is set for you.  What are your
thoughts on doing this?

- Nathan


On Wed, Jun 19, 2013 at 5:59 AM, Chris Crook  wrote:

> Ok I've found it at
>
> http://stackoverflow.com/questions/6238193/pyqt-new-api-with-python-2
>
> Looks like I need to add
>
> import sip
> API_NAMES = ["QDate", "QDateTime", "QString", "QTextStream", "QTime",
> "QUrl", "QVariant"]
> API_VERSION = 2
> for name in API_NAMES:
> sip.setapi(name, API_VERSION)
>
> before importing from PyQt4.QtCore.  And also to not try and import
> QString.
>
> Seems to be working..
>
> Chris
>
> > -Original Message-
> > From: Chris Crook
> > Sent: Wednesday, 19 June 2013 6:15 a.m.
> > To: qgis-developer@lists.osgeo.org
> > Subject: [Qgis-developer] Python unit tests and SIP API version
> >
> > Hi
> >
> > Currently when I run make the unit tests (unbuntu) the delimited text
> > python tests are running under SIP API version 1, or possibly some sort
> of
> > strange mixture, and seem to be failing.  So if I do
> >
> > from PyQt4.QtCore import QVariant
> > import sip
> >
> > print sip.getapi('QVariant')
> >
> > I get '1'.  I see sip as a setapi function, which I guess I should be
> using to set
> > the API I want.  Anyone know how to use it?
> >
> > Thanks
> > Chris
> >
> > This message contains information, which is confidential 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.
>
>
> This message contains information, which is confidential 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
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Python unit tests and SIP API version

2013-06-18 Thread Chris Crook
Ok I've found it at

http://stackoverflow.com/questions/6238193/pyqt-new-api-with-python-2

Looks like I need to add

import sip
API_NAMES = ["QDate", "QDateTime", "QString", "QTextStream", "QTime", "QUrl", 
"QVariant"]
API_VERSION = 2
for name in API_NAMES:
sip.setapi(name, API_VERSION)

before importing from PyQt4.QtCore.  And also to not try and import QString.

Seems to be working..

Chris

> -Original Message-
> From: Chris Crook
> Sent: Wednesday, 19 June 2013 6:15 a.m.
> To: qgis-developer@lists.osgeo.org
> Subject: [Qgis-developer] Python unit tests and SIP API version
>
> Hi
>
> Currently when I run make the unit tests (unbuntu) the delimited text
> python tests are running under SIP API version 1, or possibly some sort of
> strange mixture, and seem to be failing.  So if I do
>
> from PyQt4.QtCore import QVariant
> import sip
>
> print sip.getapi('QVariant')
>
> I get '1'.  I see sip as a setapi function, which I guess I should be using 
> to set
> the API I want.  Anyone know how to use it?
>
> Thanks
> Chris
>
> This message contains information, which is confidential 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.


This message contains information, which is confidential 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
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Python unit tests and SIP API version

2013-06-18 Thread Chris Crook
Hi

Currently when I run make the unit tests (unbuntu) the delimited text python 
tests are running under SIP API version 1, or possibly some sort of strange 
mixture, and seem to be failing.  So if I do

from PyQt4.QtCore import QVariant
import sip

print sip.getapi('QVariant')

I get '1'.  I see sip as a setapi function, which I guess I should be using to 
set the API I want.  Anyone know how to use it?

Thanks
Chris

This message contains information, which is confidential 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
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Relative paths in mapserver

2013-06-18 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all.
I'm finding problems in using relative paths in qgis mapserver.
The following request works:

http://192.168.0.79/cgi-bin/qgis_mapserv.fcgi?map=/usr/lib/cgi-bin/test/test.qgs&SERVICE=WMS&REQUEST=GetMap&BBOX=15,20,50,40&CRS=EPSG:4326&WIDTH=800&HEIGHT=480&LAYERS=comuni&FORMAT=image/png

while this one does not (returns a white page):

http://192.168.0.79/cgi-bin/qgis_mapserv.fcgi?map=test/test.qgs&SERVICE=WMS&REQUEST=GetMap&BBOX=15,20,50,40&CRS=EPSG:4326&WIDTH=800&HEIGHT=480&LAYERS=comuni&FORMAT=image/png

Am I doing something wrong?
All the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlHAmCsACgkQ/NedwLUzIr5J+wCgoHiV+pdYuJCoh8LyMeRU4jZN
oXQAn37T0LnXvUyb1eOvvwrJNyay+m6c
=G6NJ
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] [Clipping] VRT memory

2013-06-18 Thread Alexia Mondot

Hello,

Recently, I had a problem while clipping a non georeferenced image based 
on (0,0), x right, y down, because of the negative coordinates.
On the clipping tool, a tip consists in removing the minus of the 
coordinates in the expression of the command gdal_translate to run.


It works fine with a vrt written on disk.
When I try to clip a vrt memory, the clipping tool writes all the vrt in 
the expression of the command to run (that is ok).

When I run the clipping, I get this :


Warning 1: Line 0: Attribute value should be single or double quoted. 
Going on, but this is invalid XML that might be rejected in future 
versions.

ERROR 1: Line 0: Didn't find expected '=' for value of attribute '\'.
GDALOpen failed - 1
Line 0: Didn't find expected '=' for value of attribute '\'.


But here's the thing, it works fine from a terminal.

In the clipping tool, when I change all protected double quotes \", to 
simple quotes ', the clipping works fine.


It seems to be an anomaly of the clipping tool.

Thanks in advance,
Alexia



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Update map bug in master

2013-06-18 Thread Werner Macho
login to hub is your OSGEO Account
Hope this helps! :)


On Tue, Jun 18, 2013 at 12:53 PM, Jakob Lanstorp wrote:

> Cannot log on the hub for reporting issues. I guess it is the same log in,
> has to this mailing list??
>
> Jakob
>
>
>
> -
> Jakob Lanstorp
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Update-map-bug-in-master-tp5060810p5060825.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Update map bug in master

2013-06-18 Thread Jakob Lanstorp
Cannot log on the hub for reporting issues. I guess it is the same log in,
has to this mailing list??

Jakob



-
Jakob Lanstorp
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Update-map-bug-in-master-tp5060810p5060825.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] little fix in tip

2013-06-18 Thread Werner Macho
Hi Richard!
Thanks for that tip .. I changed it ..

regards
Werner


On Tue, Jun 18, 2013 at 12:14 PM, Richard Duivenvoorde
wrote:

>
> During translation I came along this tip:
>
> QGIS has plugins that extend its functionality. QGIS ships with some core
> plugins you can explore from the Plugins->Manage Plugins menu. In addition
> there are over 150 Python plugins contributed by the user community that
> can be installed from the Plugins->Fetch Python Plugins menu. Don't miss
> out on all QGIS has to offer---check out the plugins and see what they can
> do for you.
>
> The name of the menu-item changed, so I think I should be something like:
>
> QGIS has plugins that extend its functionality. QGIS ships with some core
> plugins you can explore and activate from the Plugins->Manage and Install
> Plugins menu. In addition there are over 150 Python plugins contributed by
> the user community that can be installed via this same menu. Don't miss out
> on all QGIS has to offer---check out the plugins and see what they can do
> for you.
>
> I fear a pull request would not make it, so maybe someone with direct
> commit rights change this (and or the text)?
>
> Regards,
>
> Richard
> __**_
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] little fix in tip

2013-06-18 Thread Richard Duivenvoorde


During translation I came along this tip:

QGIS has plugins that extend its functionality. QGIS ships with some 
core plugins you can explore from the Plugins->Manage Plugins menu. In 
addition there are over 150 Python plugins contributed by the user 
community that can be installed from the Plugins->Fetch Python Plugins 
menu. Don't miss out on all QGIS has to offer---check out the plugins 
and see what they can do for you.


The name of the menu-item changed, so I think I should be something like:

QGIS has plugins that extend its functionality. QGIS ships with some 
core plugins you can explore and activate from the Plugins->Manage and 
Install Plugins menu. In addition there are over 150 Python plugins 
contributed by the user community that can be installed via this same 
menu. Don't miss out on all QGIS has to offer---check out the plugins 
and see what they can do for you.


I fear a pull request would not make it, so maybe someone with direct 
commit rights change this (and or the text)?


Regards,

Richard
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Update map bug in master

2013-06-18 Thread Matthias Kuhn
Hi Jakob,

Thank you for reporting this issue.

Could you open a bug in the issue tracker [1]
It will be much easier to follow there and track the status of the 
issue.

Regards,
Matthias

[1] http://hub.qgis.org/projects/quantum-gis/issues

On Die 18 Jun 2013 11:30:16 CEST, Jakob Lanstorp wrote:
> If one runs a 'Select by location' in QGIS 1.9.0-Master, the map is not
> updated with the new selection. If you, after running the algorithm,
> manually press the Refresh map button the selection becomes visibly.
>
> Jakob
>
>
>
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Update-map-bug-in-master-tp5060810.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Update map bug in master

2013-06-18 Thread Jakob Lanstorp
If one runs a 'Select by location' in QGIS 1.9.0-Master, the map is not
updated with the new selection. If you, after running the algorithm,
manually press the Refresh map button the selection becomes visibly.

Jakob



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Update-map-bug-in-master-tp5060810.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Redmine projects

2013-06-18 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 18/06/2013 10:06, Alexander Bruy ha scritto:

> as I can see,  there are two projects in redmine (Contrast Homogenizer and
> geoUmbriaSUIT) that are top-level projects while this projects should be under
> User plugins section.
> 
> Can anyone fix this?

done.
it's a bug on the redmine, it's enough
http://hub.qgis.org/projects/geoumbriasuit/settings
all the best.
- -- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAlHAH7sACgkQ/NedwLUzIr47ZACeMxGuhhrYi6/wOxIx5Bxv/nt8
+MUAmOPzYMLZkDOYBLNU1lVfeou++/E=
=f3/D
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Redmine projects

2013-06-18 Thread Alexander Bruy
Hi all,

as I can see,  there are two projects in redmine (Contrast Homogenizer and
geoUmbriaSUIT) that are top-level projects while this projects should be under
User plugins section.

Can anyone fix this?

-- 
Alexander Bruy
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer