Re: [Qgis-developer] Identify crash

2014-12-10 Thread Radim Blazek
Solved by make clean, sorry for the noise.

Thanks
Radim

On Wed, Dec 10, 2014 at 8:04 AM, Denis Rouzaud  wrote:
> I'm not
> Can you give more details to reproduce?
>
>
>
> On 09.12.2014 20:10, Radim Blazek wrote:
>>
>> I am getting immediate crash with current master when identify tool is
>> selected. I don't see anything obvious in backtrace (maybe
>> this=0x8000 ?):
>>
>> #0  0x7fe9dd757475 in *__GI_raise (sig=) at
>> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
>> 64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
>> directory.
>> (gdb) bt
>> #0  0x7fe9dd757475 in *__GI_raise (sig=) at
>> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
>> #1  0x7fe9dd75a6f0 in *__GI_abort () at abort.c:92
>> #2  0x0059717b in qgisCrash (signal=11) at
>> /home/radim/devel/qgis/src/app/main.cpp:306
>> #3  
>> #4  data (this=) at
>> ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
>> #5  qGetPtrHelper > (p=...) at
>> ../../include/QtCore/../../src/corelib/global/qglobal.h:2436
>> #6  d_func (this=) at
>> ../../include/QtGui/../../src/gui/kernel/qwidget.h:150
>> #7  QWidget::insertAction (this=0x8000, before=0x0,
>> action=0x2613e70) at kernel/qwidget.cpp:3281
>> #8  0x006cc769 in
>> QgsIdentifyResultsDialog::QgsIdentifyResultsDialog (this=0x6e1d0e0,
>> canvas=0x279cda0, parent=0x23f8f60, f=...)
>>  at /home/radim/devel/qgis/src/app/qgsidentifyresultsdialog.cpp:274
>> #9  0x00758055 in QgsMapToolIdentifyAction::resultsDialog
>> (this=0x293e7f0)
>>  at /home/radim/devel/qgis/src/app/qgsmaptoolidentifyaction.cpp:75
>> #10 0x00758da0 in QgsMapToolIdentifyAction::activate
>> (this=0x293e7f0)
>>  at /home/radim/devel/qgis/src/app/qgsmaptoolidentifyaction.cpp:176
>> #11 0x7fe9e170b620 in QgsMapCanvas::setMapTool (this=0x279cda0,
>> tool=0x293e7f0) at
>> /home/radim/devel/qgis/src/gui/qgsmapcanvas.cpp:1471
>> #12 0x005c4027 in QgisApp::identify (this=0x23f8f60) at
>> /home/radim/devel/qgis/src/app/qgisapp.cpp:4598
>>
>> Radim
>> ___
>> 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] [Qgis-user] How load Postgis layer from command line?

2014-12-10 Thread Richard Duivenvoorde
On 10-12-14 10:11, Uggla Henrik wrote:
> In Linux it is very easy to setup a ramdisk for fast temporal file storage.
> 
> --help really gives the impression that loading Qgis with PostGIS layers 
> using the FILE parameter is a breeze. Also, I still doesn't get what this 
> "PostGIS extension" mentioned in --help is.

cc'ing to dev list, original thread here:

http://lists.osgeo.org/pipermail/qgis-user/2014-December/030180.html


Me neither, best to bring this to the dev list then, to ask which this
extension is.

And IF we want a FILE parameter work for postgis we could come up with a
design for that file param and do a feature request to get this implemented?

For example, as this works:

l = iface.addVectorLayer('dbname=bag host=localhost port=5432 user=geo
password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql=',
"test", "postgres")

this is the actual uri:

'dbname=bag host=localhost port=5432 user=geo
password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='

so maybe prepend that with the provider part:

postgres:'dbname=bag host=localhost port=5432 user=geo
password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='

and add a --uri option to QGIS?

qgis --uri postgres:'dbname=bag host=localhost port=5432 user=geo
password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='

or something like that?

Regards,

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


[Qgis-developer] New raster calc in Processing?

2014-12-10 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all.
Anyone has plans to add this upcoming feature to standard Processing
framework?
http://blog.orfeo-toolbox.org/news/coming-soon-new-powerful-raster-
calculator-in-otb
Thanks.
- -- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iEYEARECAAYFAlSIHfcACgkQ/NedwLUzIr5vPQCeI2HG06gnlyuP/B3qSOayTYno
Zk8AoKg4JiOID0XIDnlV9SGrBBzd07qN
=g28P
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Python Oracle getFeatures non working on non-geometric tables

2014-12-10 Thread mederic.ribreux

Hello,

I've been further this morning... You just need to build a 
QgsFeatureRequest which grabs the NoGeometry features.


layer = 
QgsMapLayerRegistry.instance().mapLayersByName('MY_ATTRIBUTE_TABLE')[0]
for f in 
layer.getFeatures(QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry)):

  print f

This behavior seems to be specific to Oracle NoGeometry QgsVectorLayers. 
I have made tests under PostGIS and Spatialite and you can use the 
getFeatures() method without specifying a QgsFeatureRequest to grab all 
the features of the layer.


Should I file a bug report on Oracle provider ?

Best regards,

Le 2014-12-09 17:47, mederic.ribreux a écrit :

Hello,

I am trying to iterate over a non geographic table under PyQGis. The
table is stored in an Oracle database and I use QGis Api to get the
data (table is opened in a QGis project with Oracle provider). I have
added primary key constraint to this table but I am not able to
iterate through its features with the getFeatures() method. The
following snippet always returns nothing:

layer = 
QgsMapLayerRegistry.instance().mapLayersByName('MY_ATTRIBUTE_TABLE')[0]

for f in layer.getFeatures():
  print f

I have tried with a geographic layer and there is no problem on this
side because the above snippets prints a line for every feature in the
table. I have also tried with opening the geographic table without
geometry (geometry is "No Geometry"). In this configuration, I am not
able to get access to the features...

I have tried to reproduce this on a PostgreSQL/PostGIS server and
there is no bug: I am able to iterate over a non-geographic layer
(even a geographic layer declared as non-geographic).

Is this a problem with the Oracle provider or just me having forgotten
something in the table ?

Best regards


--
Médéric RIBREUX
http://medspx.homenet.org
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-user] How load Postgis layer from command line?

2014-12-10 Thread Germán Carrillo
Exactly Richard, that would be the expected behaviour.

Regards,

Germán

2014-12-10 4:37 GMT-05:00 Richard Duivenvoorde :

> On 10-12-14 10:11, Uggla Henrik wrote:
> > In Linux it is very easy to setup a ramdisk for fast temporal file
> storage.
> >
> > --help really gives the impression that loading Qgis with PostGIS layers
> using the FILE parameter is a breeze. Also, I still doesn't get what this
> "PostGIS extension" mentioned in --help is.
>
> cc'ing to dev list, original thread here:
>
> http://lists.osgeo.org/pipermail/qgis-user/2014-December/030180.html
>
>
> Me neither, best to bring this to the dev list then, to ask which this
> extension is.
>
> And IF we want a FILE parameter work for postgis we could come up with a
> design for that file param and do a feature request to get this
> implemented?
>
> For example, as this works:
>
> l = iface.addVectorLayer('dbname=bag host=localhost port=5432 user=geo
> password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
> type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql=',
> "test", "postgres")
>
> this is the actual uri:
>
> 'dbname=bag host=localhost port=5432 user=geo
> password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
> type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='
>
> so maybe prepend that with the provider part:
>
> postgres:'dbname=bag host=localhost port=5432 user=geo
> password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
> type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='
>
> and add a --uri option to QGIS?
>
> qgis --uri postgres:'dbname=bag host=localhost port=5432 user=geo
> password=xxx sslmode=disable key=gid estimatedmetadata=true srid=28992
> type=MULTIPOLYGON table="bag8mrt2014"."provincie" (geovlak) sql='
>
> or something like that?
>
> Regards,
>
> Richard Duivenvoorde
>



-- 
---
   |\__
(:>__)(
   |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Problems with refresh canvas after upgrade to 2.6

2014-12-10 Thread Luca Mandolesi
Hi, someone knows why the method self.iface.mapCanvas().refresh() doesn't
work properly after QGis upgrade to 2.6?
I've lost some changelog?

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

Re: [Qgis-developer] Problems with refresh canvas after upgrade to 2.6

2014-12-10 Thread Sandro Santilli
On Wed, Dec 10, 2014 at 06:03:07PM +0100, Luca Mandolesi wrote:
> Hi, someone knows why the method self.iface.mapCanvas().refresh() doesn't
> work properly after QGis upgrade to 2.6?
> I've lost some changelog?

What do you mean by properly ?

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Problems with refresh canvas after upgrade to 2.6

2014-12-10 Thread Martin Dobias
Hi Luca

On Thu, Dec 11, 2014 at 12:03 AM, Luca Mandolesi  wrote:
> Hi, someone knows why the method self.iface.mapCanvas().refresh() doesn't
> work properly after QGis upgrade to 2.6?
> I've lost some changelog?

Upgrade from what version?

In QGIS 2.4 there were some changes:
http://qgis.org/api/api_break.html

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


Re: [Qgis-developer] Problems with refresh canvas after upgrade to 2.6

2014-12-10 Thread Luca Mandolesi
Sorry, you're right. The canvas has not been refreshed. I need every time
to do it manually with the refresh button.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Problems with refresh canvas after upgrade to 2.6

2014-12-10 Thread Luca Mandolesi
2014-12-10 18:41 GMT+01:00 Martin Dobias :

> Hi Luca
>
> On Thu, Dec 11, 2014 at 12:03 AM, Luca Mandolesi 
> wrote:
> > Hi, someone knows why the method self.iface.mapCanvas().refresh() doesn't
> > work properly after QGis upgrade to 2.6?
> > I've lost some changelog?
>
> Upgrade from what version?
>

>From 2.2 to 2.6.


>
> In QGIS 2.4 there were some changes:
> http://qgis.org/api/api_break.html



Oh,probably my mistake is here. Thanks a lot.

>
>
> Regards
> Martin
>

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

Re: [Qgis-developer] Error : cannot connect to X server on Ubuntu

2014-12-10 Thread devquestio...@gmail.com
Yeah, I am trying to use headless application. I was able to overcome the
earlier error, but now i am stuck with a new error message.

"QPixmap: Cannot create a QPixmap when no GUI is being used"
"QPixmap: Cannot create a QPixmap when no GUI is being used"
"QPixmap: Cannot create a QPixmap when no GUI is being used"

Now I am creating QApplication by passing flase for ui mode.
>>app = QgsApplication([], False)

Here is the revised code.

I thought someone should figured this out before.  It is so painful to use
qgis in headless mode !!


import os
import sys

qgisprefix = '/usr'
#qgisprefix='/usr/share/qgis/resources'

# configure paths for QGIS
sys.path.insert(0, qgisprefix+'/share/qgis/python')
sys.path.insert(1, qgisprefix+'/share/qgis/python/plugins')

# disable QGIS debug messages
#os.environ['QGIS_DEBUG'] = '-1'
os.environ['DISPLAY']=""
# import QGIS modules
from qgis.core import *

#from qgis.gui import *

# configure QGIS paths
QgsApplication.setPrefixPath(qgisprefix, False)

# initalise QGIS
QgsApplication.initQgis()

app = QgsApplication([], False)

import processing



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Error-cannot-connect-to-X-server-on-Ubuntu-tp5177029p5177312.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] Error : cannot connect to X server on Ubuntu

2014-12-10 Thread Matthias Kuhn
The tests run on a headless server with xvfb.

So I assume that doing anything with

xvfb-run python yourapp.py

and no messing with display should work perfectly as well.

On 12/10/2014 08:50 PM, devquestio...@gmail.com wrote:
> Yeah, I am trying to use headless application. I was able to overcome the
> earlier error, but now i am stuck with a new error message.
>
> "QPixmap: Cannot create a QPixmap when no GUI is being used"
> "QPixmap: Cannot create a QPixmap when no GUI is being used"
> "QPixmap: Cannot create a QPixmap when no GUI is being used"
>
> Now I am creating QApplication by passing flase for ui mode.
>>> app = QgsApplication([], False)
> Here is the revised code.
>
> I thought someone should figured this out before.  It is so painful to use
> qgis in headless mode !!
>
>
> import os
> import sys
>
> qgisprefix = '/usr'
> #qgisprefix='/usr/share/qgis/resources'
>
> # configure paths for QGIS
> sys.path.insert(0, qgisprefix+'/share/qgis/python')
> sys.path.insert(1, qgisprefix+'/share/qgis/python/plugins')
>
> # disable QGIS debug messages
> #os.environ['QGIS_DEBUG'] = '-1'
> os.environ['DISPLAY']=""
> # import QGIS modules
> from qgis.core import *
>
> #from qgis.gui import *
>
> # configure QGIS paths
> QgsApplication.setPrefixPath(qgisprefix, False)
>
> # initalise QGIS
> QgsApplication.initQgis()
>
> app = QgsApplication([], False)
>
> import processing
>
>
>
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Error-cannot-connect-to-X-server-on-Ubuntu-tp5177029p5177312.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] Error : cannot connect to X server on Ubuntu

2014-12-10 Thread devquestio...@gmail.com
thanks Matthias,

Actually this is what i am trying to do.

i need to calculate wetness index, so i have developed a model in qgis
graphical modeler that invokes grss-saga algorithsm to calculate slope,
wetness index etc.

all i want to do is to run that algorithm in a headless mode. 

So, using processing model is the only way here or there are any other
approaches ?

using xvfb-run  is an option, but it will complicate something else i.e i
want then invoke the scripts via hadoop-mapreduce for parallel execution.





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Error-cannot-connect-to-X-server-on-Ubuntu-tp5177029p5177316.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] Error : cannot connect to X server on Ubuntu

2014-12-10 Thread Matthias Kuhn
I have never run a processing model standalone, so I cannot help there.
I don't know how closely tied this is to GUI related things. It may or
may not work without X. But if you have to create a QgsApplication which
is a QApplication I am pretty sure that you need to have some kind of X
running. So it would be a matter of getting processing to run without
QgsApplication.
How does hadoop-mapreduce work? Is it not possible to spawn one separate
xvfb-run process per map?


On 12/10/2014 08:58 PM, devquestio...@gmail.com wrote:
> thanks Matthias,
>
> Actually this is what i am trying to do.
>
> i need to calculate wetness index, so i have developed a model in qgis
> graphical modeler that invokes grss-saga algorithsm to calculate slope,
> wetness index etc.
>
> all i want to do is to run that algorithm in a headless mode. 
>
> So, using processing model is the only way here or there are any other
> approaches ?
>
> using xvfb-run  is an option, but it will complicate something else i.e i
> want then invoke the scripts via hadoop-mapreduce for parallel execution.
>
>
>
>
>
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Error-cannot-connect-to-X-server-on-Ubuntu-tp5177029p5177316.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] Documentation for QGIS server

2014-12-10 Thread Daniel Scholten

Dear QGIS developers,

I want to use QGIS-Server to
* create a WMS and a WFS,
* perform some GIS analysis on-the-fly within my interactive online map 
to dynamically create new layers and

* enable users of my online map to manipulate some stored geodata.

I found some documentation [1,2,3,4,5], but did not achive to install 
QGIS-server successfully locally on my Windows 7 machine. I also did not 
found any API documentation. Can somebody give me a hint where to find 
some more documentation? I am also interested in book recommondations.


Best wishes
Daniel

[1] http://hub.qgis.org/wiki/quantum-gis/QGIS_Server_Tutorial
[2] 
http://qgis-documentation.readthedocs.org/en/latest/server/server.html

[3] http://live.osgeo.org/de/overview/qgis_mapserver_overview.html
[4] 
http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/
[5] 
http://linfiniti.com/2010/08/qgis-mapserver-a-wms-server-for-the-masses/

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