Re: [Qgis-user] DB manager PostGIS import fails for strange reason

2022-08-06 Thread Mats Elfström via Qgis-user
Hi!
Thanks to a tip in this thread, I have been able to confirm that the table
actually contains multipart polygons. So the error message is right, and
since the first found feature is multipart, the import fails immediately.
If I select only the single part features, the import runs with no problem.

Two questions remain to solve the issue.
1/ How come that the gpkg table properties are reported as
geometry=Polygon? Is it so that geopackage polygon tables do not
differentiate single and multipart?
2/ How do I force the DB Manager to create a MultiPolygon table instead of
a Polygon table?

Regards, Mats.E

-- 


*GisKraft*, Geodatakonsult

Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
tel: +46 70 595 39 35 / www.giskraft.se
___
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] DB manager PostGIS import fails for strange reason

2022-07-27 Thread Jésahel Benoist via Qgis-user
Hi Mats,

Several times I had to deal with this kind of problem and I found that the
plugin GeomAttribute can be useful to find a faulty entity in a table.
Maybe it could help you.

https://philipwhitten.github.io/geomAttribute/html/pluginTools/geomAttribute.html

Btw, I have the feeling that the code validating a new entity in QGIS is
too permissive... I have to manually correct our DB regularly as some users
are creating incorrect data (especially NULL entities) and we don't even
know how...

The plugin is also useful to correct data before import.

Regards,

Jésahel B.
___
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] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Mats Elfström via Qgis-user
Hi again!

Andrea Giudiceandrea responded :"*it seems to me the error message
says the contrary: you are trying to import MultiPolygon geometries in
a Polygon column geom type table.*"

Well I am not sure about that. It may be a semantic matter.
The PostGIS table is non-existent at the time of import, so the importer
can create any geometry type needed. Preferably polygon since the table in
the geopackage has geometrytype=Polygon.
And the error message "*PostGIS error while adding features: ERROR:
 Geometry type (MultiPolygon) does not match column type (Polygon)*" does
not really define origin and target.
Knowing that the geopackage table is polygon I assumed that for some reason
a PostGIS multipolygon table was created, causing the mismatch.

But let us assume that you are right - that the origin really is
multipolygon - how can I specify that a multipolygon table be created when
importing it to PostGIS?

Regards, Mats.E

-- 


*GisKraft*, Geodatakonsult

Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
tel: +46 70 595 39 35 / www.giskraft.se
___
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] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Andrea Giudiceandrea via Qgis-user

*Mats Elfström*
/Tue Jul 26 02:31:29 PDT 2022/

*PostGIS error while adding features: ERROR: Geometry type (MultiPolygon)
does not match column type (Polygon)*

a MultiPolygon table should anyway be able to accept single polygons.


Hi Mats,
it seems to me the error message says the contrary: you are trying to 
import MultiPolygon geometries in a Polygon column geom type table.


Best regards.

Andrea Giudiceandrea___
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] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Mats Elfström via Qgis-user
Hi!

This regards QGIS version 3.26.0-Buenos Aires.

Attempting to import a gpkg poly layer to PostGIS I get this unexpected
error.

*Error 6*

*Feature write errors:*

*Creation error for features from #-9223372036854775808 to
#-9223372036854775808. Provider errors was: *

*PostGIS error while adding features: ERROR: Geometry type (MultiPolygon)
does not match column type (Polygon)*


*Only 0 of 179 features written.*


There is no option to set geometry type in the import settings, and a
MultiPolygon table should anyway be able to accept single polygons.

A corresponding gpkg point table from the same source can be imported
without problem.

I normally use FME to load PostGIS data, else I would probably have come
across this sooner.

-- 


*GisKraft*, Geodatakonsult

Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
tel: +46 70 595 39 35 / www.giskraft.se
___
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] DB Manager Attach another SQLite database

2021-10-30 Thread Prof . Dr . Jörg Höttges

Hi,

The SQL-Command
ATTACH DATABASE 'c:\xxx\yyy.sqlite'
doesn't work in the QGIS DBManager (and also not in the layer context menue). The command *does* work in python plugins. 
Is there another method in the DB Manager to transfer data from a table from one database to another?


Best wishes

Jörg

FH Aachen   
Prof. Dr.-Ing. Jörg Höttges
Fachbereich 2 - Bauingenieurwesen
Wasserwirtschaft und Bauinformatik
Raum 02315
FH Aachen
University of Applied Sciences
Bayernallee 9
52066 Aachen | Germany
T +49 (0)241 6009-51176
F +49 (0)241 6009-51206
https://www.fh-aachen.de/menschen/hoettges/ 

hoett...@fh-aachen.de 
Beratungstermin buchen... 



smime.p7s
Description: S/MIME Cryptographic Signature
___
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] DB Manager error with PostgreSQL 12

2019-12-20 Thread Paolo Cavallini
this has already been reported and fixed.
Please upgrade.
cheers.

Il 20/12/19 14:28, haytastan ha scritto:
> PROBLEM: 
>  
> column adef.adsrc does not exist
> LINE 8: adef.adsrc AS default_value,
> 
> 
> SOLUTION: 
> 
> In the python file *connector.py * 
> in the diroctory
> C:\Program Files\QGIS
> 3.10\apps\qgis\python\plugins\db_manager\db_plugins\postgis
> 
> substitue
> *adef.adsrc*
> with
> *pg_get_expr(adbin,adrelid)*
> 
> and 
> substitue
> *c.consrc*
> with
> *c.conbin*
> 
> Regards,
> Hayati Tastan
> https://tr.linkedin.com/in/hayatitastan
>   
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> ___
> 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
> 

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
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] DB Manager error with PostgreSQL 12

2019-12-20 Thread haytastan
PROBLEM: 
 
column adef.adsrc does not exist
LINE 8: adef.adsrc AS default_value,


SOLUTION: 

In the python file *connector.py * 
in the diroctory
C:\Program Files\QGIS
3.10\apps\qgis\python\plugins\db_manager\db_plugins\postgis

substitue
*adef.adsrc*
with
*pg_get_expr(adbin,adrelid)*

and 
substitue
*c.consrc*
with
*c.conbin*

Regards,
Hayati Tastan
https://tr.linkedin.com/in/hayatitastan
  



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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] DB Manager error with PostgreSQL 12

2019-12-20 Thread haytastan
PROBLEM: 
 
column adef.adsrc does not exist
LINE 8: adef.adsrc AS default_value,


SOLUTION: 

In the python file *connector.py * 
in the diroctory
C:\Program Files\QGIS
3.10\apps\qgis\python\plugins\db_manager\db_plugins\postgis

substitue
*adef.adsrc*
with
*pg_get_expr(adbin,adrelid)*

and 
substitue
*c.consrc*
with
*c.conbin*

Regards,
Hayati Tastan
https://tr.linkedin.com/in/hayatitastan
  




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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] DB Manager error with PostgreSQL 12

2019-12-20 Thread haytastan
PROBLEM: 
 
column adef.adsrc does not exist
LINE 8: adef.adsrc AS default_value,


SOLUTION: 

In the python file *connector.py * 
in the directory
C:\Program Files\QGIS
3.10\apps\qgis\python\plugins\db_manager\db_plugins\postgis

substitue
*adef.adsrc*
with
*pg_get_expr(adbin,adrelid)*

and 
substitue
*c.consrc*
with
*c.conbin*

Regards,
Hayati Tastan
https://tr.linkedin.com/in/hayatitastan
  




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
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] DB Manager query: Can't get CASE WHEN to work

2019-12-07 Thread Bernd Vogelgesang

Ok, sorry for the noise!
comma missing after select *

SQL and me not going to be good friends

Cheers,
Bernd

Am 07.12.19 um 18:47 schrieb Bernd Vogelgesang:

Hi,

maybe it's again some strange local issue, but I can't find a way to
make CASE WHEN working in a DB Manger query or in a Vitual Layer.

The example is analog to https://www.sqlitetutorial.net/sqlite-case/
I would like to populate a new column "category" in that select

SELECT *

CASE WHEN status = 'v' THEN 'v'

ELSE 'nv'

END category

FROM

table;

Whatever I try, the result is always a:

near "CASE": syntax error

This should have been the preparation for a much more complex query,
but I even fail at the start :(

Any ideas whats wrong?

Cheers,

Bernd



___
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] DB Manager query: Can't get CASE WHEN to work

2019-12-07 Thread Bernd Vogelgesang

Hi,

maybe it's again some strange local issue, but I can't find a way to make CASE 
WHEN working in a DB Manger query or in a Vitual Layer.

The example is analog to https://www.sqlitetutorial.net/sqlite-case/
I would like to populate a new column "category" in that select

SELECT *

CASE WHEN status = 'v' THEN 'v'

ELSE 'nv'

END category

FROM

table;

Whatever I try, the result is always a:

near "CASE": syntax error

This should have been the preparation for a much more complex query, but I even 
fail at the start :(

Any ideas whats wrong?

Cheers,

Bernd

___
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] DB Manager error with PostgreSQL 12

2019-11-09 Thread Árni Geirsson
Great, thanks!

Árni Geirsson
*Alta ehf* // +354 582 5003 // +354 897 9549


On Sat, 9 Nov 2019 at 19:02, Alessandro Pasotti  wrote:

> This issue was fixed yesterday.
>
> On Sat, Nov 9, 2019, 19:35 Árni Geirsson  wrote:
>
>> Hi
>> I just upgraded my database to PostgreSQL 12 and PostGIS 3.0. Since then
>> I get an error when trying to load layers with the DB Manager:
>>
>> column adef.adsrc does not exist
>> LINE 8: adef.adsrc AS default_value,
>>
>> However, loading through the browser works well and other clients do not
>> seem to have a problem.
>> I see that this issue has already been reported here:
>> https://github.com/qgis/QGIS/issues/32321
>> I am not familiar enough with the Git workflow to be able to tell if this
>> has been fixed and entered into the code, so that the problem is solved in
>> the next release.  If not, I would have to downgrade to PostgreSQL 11. Can
>> anyone tell me what the status of the fix is?
>>
>> Thanks
>>
>> Árni
>>
>> Árni Geirsson
>> *Alta ehf* // +354 582 5003 // +354 897 9549
>> ___
>> 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] DB Manager error with PostgreSQL 12

2019-11-09 Thread Alessandro Pasotti
This issue was fixed yesterday.

On Sat, Nov 9, 2019, 19:35 Árni Geirsson  wrote:

> Hi
> I just upgraded my database to PostgreSQL 12 and PostGIS 3.0. Since then I
> get an error when trying to load layers with the DB Manager:
>
> column adef.adsrc does not exist
> LINE 8: adef.adsrc AS default_value,
>
> However, loading through the browser works well and other clients do not
> seem to have a problem.
> I see that this issue has already been reported here:
> https://github.com/qgis/QGIS/issues/32321
> I am not familiar enough with the Git workflow to be able to tell if this
> has been fixed and entered into the code, so that the problem is solved in
> the next release.  If not, I would have to downgrade to PostgreSQL 11. Can
> anyone tell me what the status of the fix is?
>
> Thanks
>
> Árni
>
> Árni Geirsson
> *Alta ehf* // +354 582 5003 // +354 897 9549
> ___
> 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] DB Manager error with PostgreSQL 12

2019-11-09 Thread Árni Geirsson
Hi
I just upgraded my database to PostgreSQL 12 and PostGIS 3.0. Since then I
get an error when trying to load layers with the DB Manager:

column adef.adsrc does not exist
LINE 8: adef.adsrc AS default_value,

However, loading through the browser works well and other clients do not
seem to have a problem.
I see that this issue has already been reported here:
https://github.com/qgis/QGIS/issues/32321
I am not familiar enough with the Git workflow to be able to tell if this
has been fixed and entered into the code, so that the problem is solved in
the next release.  If not, I would have to downgrade to PostgreSQL 11. Can
anyone tell me what the status of the fix is?

Thanks

Árni

Árni Geirsson
*Alta ehf* // +354 582 5003 // +354 897 9549
___
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] DB Manager:"Load as new layer" query from point data returns invisible poylgon layer

2019-04-29 Thread Bernd Vogelgesang

Hi,

it seems that my project was somehow broken. After a while zooming out
froze the application. After setting up everything from zero, the "Load
as new layer" button works as expected. Great!

Big "but": When such a layer (is it a virtual layer?) is present in the
project, I can't edit the underlying GeoPackage anymore. Trying to add
an entry to a table (which of course will change the query result of the
new layer), an error is thrown that the database is locked. Afterwards
all layers from the geopackage even disappear from thecanvas and I can't
even reconnect to the database in DB Manager, so I have to restart QGIS.

Removing this virtual layer from the project enables editing of the
tables again.

This is somehow unpleasant, cause I thought that I finally found a way
to easily indicate the points I still have to work on through a query,
but it seems that visualizing and editing the source at the same time is
not possible :(

With sad greetings,,

Bernd

Am 29.04.19 um 15:27 schrieb Bernd Vogelgesang:


Hi Alessandro,

forgot to mention that I'm on 3.6.2 on Linux Mint. At the moment I
have no running instance of master, so I can't check if it is resolved
there.

Added sth to https://issues.qgis.org/issues/21675

Cheers,

Bernd

Am 29.04.19 um 14:11 schrieb Alessandro Pasotti:


On Mon, Apr 29, 2019 at 2:00 PM Bernd Vogelgesang
mailto:bernd.vogelges...@gmx.de>> wrote:

Hi,

maybe I miss something obvious, but I can't manage to produce a new
point layer from a query in the DB Manager from a point dataset
(First
time going this route, and very old sql-knowledge only).

The query runs fine, I see the results, but when I hit the "Load
as new
layer"-button, it adds a new polygon-layer name"QueryLayer" and of
course nothing is visible.

When I create a new virtual layer and paste my query there, it
works and
adds a new point layer from my query.

But it seems a bit strange that I have to produce a query, and
then copy
it to another section while there is a "load as new layer"-button
available.

Any hints?


Several issues like this have been fixed in the past, please check
newest releases and if that does not work please file a ticket
(attaching test project & data plus the failing queries).

Kind regards.

--
Alessandro Pasotti
w3: www.itopen.it 


___
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] DB Manager: Different results from query in DB Manager and in Virtual Layer

2019-04-29 Thread Bernd Vogelgesang

Hi,

I have a point dataset with nesting boxes (443) and a non-spatial table
from QField where I filled in the already controlled nesting boxes.

Now trying to find out which bixes are still need to be controlled. To
filter the already boxes, I use this query

SELECT "Birdboxes_GTA_20190316".*
FROM "Birdboxes_GTA_20190316"
WHERE EXISTS (SELECT 1 FROM  "birdbox_kontrolle"  WHERE
"Birdboxes_GTA_20190316"."kasten_nr"= "birdbox_kontrolle"."kastennr")

in DB Manager, this returns the quiet low of 35 matches.

When I now create new Virtual Layer with exact the same query, a point
dataset is produced with the quite resonable amount of 262

Same the other way round: To get those not controlled boxes I use

SELECT "Birdboxes_GTA_20190316".*
FROM "Birdboxes_GTA_20190316"
WHERE NOT EXISTS (SELECT 1 FROM  "birdbox_kontrolle"  WHERE
"Birdboxes_GTA_20190316"."kasten_nr"= "birdbox_kontrolle"."kastennr")

which returns 408 rows, but the more resonable number that is produced
with the virtual layer is 181

I'm happy that all my points are generated correctly, but still I'm a
bit concerned that the query result in DB Manager is so awfully wrong.

Is this just due to my poor sql-knowledge or is it a bug?

Cheers,

Bernd


___
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] DB Manager:"Load as new layer" query from point data returns invisible poylgon layer

2019-04-29 Thread Bernd Vogelgesang

Hi Alessandro,

forgot to mention that I'm on 3.6.2 on Linux Mint. At the moment I have
no running instance of master, so I can't check if it is resolved there.

Added sth to https://issues.qgis.org/issues/21675

Cheers,

Bernd

Am 29.04.19 um 14:11 schrieb Alessandro Pasotti:


On Mon, Apr 29, 2019 at 2:00 PM Bernd Vogelgesang
mailto:bernd.vogelges...@gmx.de>> wrote:

Hi,

maybe I miss something obvious, but I can't manage to produce a new
point layer from a query in the DB Manager from a point dataset (First
time going this route, and very old sql-knowledge only).

The query runs fine, I see the results, but when I hit the "Load
as new
layer"-button, it adds a new polygon-layer name"QueryLayer" and of
course nothing is visible.

When I create a new virtual layer and paste my query there, it
works and
adds a new point layer from my query.

But it seems a bit strange that I have to produce a query, and
then copy
it to another section while there is a "load as new layer"-button
available.

Any hints?


Several issues like this have been fixed in the past, please check
newest releases and if that does not work please file a ticket
(attaching test project & data plus the failing queries).

Kind regards.

--
Alessandro Pasotti
w3: www.itopen.it 
___
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] DB Manager:"Load as new layer" query from point data returns invisible poylgon layer

2019-04-29 Thread Alessandro Pasotti
On Mon, Apr 29, 2019 at 2:00 PM Bernd Vogelgesang 
wrote:

> Hi,
>
> maybe I miss something obvious, but I can't manage to produce a new
> point layer from a query in the DB Manager from a point dataset (First
> time going this route, and very old sql-knowledge only).
>
> The query runs fine, I see the results, but when I hit the "Load as new
> layer"-button, it adds a new polygon-layer name"QueryLayer" and of
> course nothing is visible.
>
> When I create a new virtual layer and paste my query there, it works and
> adds a new point layer from my query.
>
> But it seems a bit strange that I have to produce a query, and then copy
> it to another section while there is a "load as new layer"-button
> available.
>
> Any hints?
>
>
Several issues like this have been fixed in the past, please check newest
releases and if that does not work please file a ticket (attaching test
project & data plus the failing queries).

Kind regards.

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
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] DB Manager:"Load as new layer" query from point data returns invisible poylgon layer

2019-04-29 Thread Bernd Vogelgesang

Hi,

maybe I miss something obvious, but I can't manage to produce a new
point layer from a query in the DB Manager from a point dataset (First
time going this route, and very old sql-knowledge only).

The query runs fine, I see the results, but when I hit the "Load as new
layer"-button, it adds a new polygon-layer name"QueryLayer" and of
course nothing is visible.

When I create a new virtual layer and paste my query there, it works and
adds a new point layer from my query.

But it seems a bit strange that I have to produce a query, and then copy
it to another section while there is a "load as new layer"-button available.

Any hints?

Cheers,

Bernd

___
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] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-20 Thread G. Allegri
thanks Luigi!

2018-03-20 16:59 GMT+01:00 Luigi Pirelli :

> working on that... seems Boundless master repo remained to november
> Luigi Pirelli
>
> 
> **
> * 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
> * Hire me: http://goo.gl/BYRQKg
> 
> **
>
>
> On 19 March 2018 at 14:05, G. Allegri  wrote:
> > Well, I don't know if they're inclined to do it but it would nice to know
> > how they want to manage it...
> >
> > This is a severe bug for Windows.
> >
> > Giovanni
> >
> > Il lun 19 mar 2018, 13:34 Luigi Pirelli  ha scritto:
> >>
> >> he PR was from Boundless repo, make sense to ask to boundless if they
> >> want to continue to support QGIS porting patches to 3.0?
> >> Luigi Pirelli
> >>
> >>
> >> 
> **
> >> * 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
> >> * Hire me: http://goo.gl/BYRQKg
> >>
> >> 
> **
> >>
> >>
> >> On 19 March 2018 at 11:28, Luigi Pirelli  wrote:
> >> > yes sorry... not yet merged, and the PR have to be aligned to the
> >> > current code
> >> > Luigi Pirelli
> >> >
> >> >
> >> > 
> **
> >> > * 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
> >> > * Hire me: http://goo.gl/BYRQKg
> >> >
> >> > 
> **
> >> >
> >> >
> >> > On 19 March 2018 at 11:22, G. Allegri  wrote:
> >> >> Thanks Luigi,
> >> >> I already tried removing it manually, but it's created again every
> >> >> time.
> >> >> So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
> >> >> currently broken?
> >> >>
> >> >> Giovanni
> >> >>
> >> >> 2018-03-19 11:07 GMT+01:00 Luigi Pirelli :
> >> >>>
> >> >>> you can safetly remove
> >> >>>
> >> >>>
> >> >>> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{
> 4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
> >> >>> and try again
> >> >>>
> >> >>> btw it was fixed since in month in 2-18
> >> >>> https://github.com/qgis/QGIS/pull/5477
> >> >>> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599
> due
> >> >>> Boundless closed the QGIS team and I forgot it
> >> >>>
> >> >>> Luigi Pirelli
> >> >>>
> >> >>>
> >> >>>
> >> >>> 
> **
> >> >>> * 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
> >> >>> * Hire me: http://goo.gl/BYRQKg
> >> >>>
> >> >>>
> >> >>> 
> **
> >> >>>
> >> >>>
> >> >>> On 19 March 2018 at 10:59, G. Allegri  wrote:
> >> >>> > Hi all,
> >> >>> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on
> >> >>> > Windows
> >> >>> > 10.
> >> >>> > I can define a connection to my local PG, using basic
> >> >>> > authentication,
> >> >>> > and I
> >> >>> > can access data from Browser.
> >> >>> > If I try to open the connection from DB Manager I obtain;
> >> >>> >
> >> >>> > Traceback (most recent call last): File
> >> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> model.py",
> >> >>> > line
> >> >>> > 441, in rowCount self._refreshIndex(parent, True) File
> >> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> model.py",
> >> >>> > line
> >> >>> > 490, in _refreshIndex if item.populate(): File
> >> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> model.py",
> >> >>> > line
> >> >>> > 167, in populate if not connection.connect(): File
> >> >>> >
> >> >>> >
> >> >>> > "C:/OSGEO4~1/

Re: [Qgis-user] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-20 Thread Luigi Pirelli
working on that... seems Boundless master repo remained to november
Luigi Pirelli

**
* 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
* Hire me: http://goo.gl/BYRQKg
**


On 19 March 2018 at 14:05, G. Allegri  wrote:
> Well, I don't know if they're inclined to do it but it would nice to know
> how they want to manage it...
>
> This is a severe bug for Windows.
>
> Giovanni
>
> Il lun 19 mar 2018, 13:34 Luigi Pirelli  ha scritto:
>>
>> he PR was from Boundless repo, make sense to ask to boundless if they
>> want to continue to support QGIS porting patches to 3.0?
>> Luigi Pirelli
>>
>>
>> **
>> * 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
>> * Hire me: http://goo.gl/BYRQKg
>>
>> **
>>
>>
>> On 19 March 2018 at 11:28, Luigi Pirelli  wrote:
>> > yes sorry... not yet merged, and the PR have to be aligned to the
>> > current code
>> > Luigi Pirelli
>> >
>> >
>> > **
>> > * 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
>> > * Hire me: http://goo.gl/BYRQKg
>> >
>> > **
>> >
>> >
>> > On 19 March 2018 at 11:22, G. Allegri  wrote:
>> >> Thanks Luigi,
>> >> I already tried removing it manually, but it's created again every
>> >> time.
>> >> So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
>> >> currently broken?
>> >>
>> >> Giovanni
>> >>
>> >> 2018-03-19 11:07 GMT+01:00 Luigi Pirelli :
>> >>>
>> >>> you can safetly remove
>> >>>
>> >>>
>> >>> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
>> >>> and try again
>> >>>
>> >>> btw it was fixed since in month in 2-18
>> >>> https://github.com/qgis/QGIS/pull/5477
>> >>> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
>> >>> Boundless closed the QGIS team and I forgot it
>> >>>
>> >>> Luigi Pirelli
>> >>>
>> >>>
>> >>>
>> >>> **
>> >>> * 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
>> >>> * Hire me: http://goo.gl/BYRQKg
>> >>>
>> >>>
>> >>> **
>> >>>
>> >>>
>> >>> On 19 March 2018 at 10:59, G. Allegri  wrote:
>> >>> > Hi all,
>> >>> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on
>> >>> > Windows
>> >>> > 10.
>> >>> > I can define a connection to my local PG, using basic
>> >>> > authentication,
>> >>> > and I
>> >>> > can access data from Browser.
>> >>> > If I try to open the connection from DB Manager I obtain;
>> >>> >
>> >>> > Traceback (most recent call last): File
>> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> >>> > line
>> >>> > 441, in rowCount self._refreshIndex(parent, True) File
>> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> >>> > line
>> >>> > 490, in _refreshIndex if item.populate(): File
>> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> >>> > line
>> >>> > 167, in populate if not connection.connect(): File
>> >>> >
>> >>> >
>> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>> >>> > line 103, in connect return self.connectToUri(uri) File
>> >>> >
>> >>> >
>> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
>> >>> > line 109, in connectToUri self.db = self.databasesFactory(self, uri)
>> >>> > File
>> >>> >
>> >>> >
>

Re: [Qgis-user] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread G. Allegri
Well, I don't know if they're inclined to do it but it would nice to know
how they want to manage it...

This is a severe bug for Windows.

Giovanni

Il lun 19 mar 2018, 13:34 Luigi Pirelli  ha scritto:

> he PR was from Boundless repo, make sense to ask to boundless if they
> want to continue to support QGIS porting patches to 3.0?
> Luigi Pirelli
>
>
> **
> * 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
> * Hire me: http://goo.gl/BYRQKg
>
> **
>
>
> On 19 March 2018 at 11:28, Luigi Pirelli  wrote:
> > yes sorry... not yet merged, and the PR have to be aligned to the
> current code
> > Luigi Pirelli
> >
> >
> **
> > * 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
> > * Hire me: http://goo.gl/BYRQKg
> >
> **
> >
> >
> > On 19 March 2018 at 11:22, G. Allegri  wrote:
> >> Thanks Luigi,
> >> I already tried removing it manually, but it's created again every time.
> >> So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
> >> currently broken?
> >>
> >> Giovanni
> >>
> >> 2018-03-19 11:07 GMT+01:00 Luigi Pirelli :
> >>>
> >>> you can safetly remove
> >>>
> >>>
> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
> >>> and try again
> >>>
> >>> btw it was fixed since in month in 2-18
> >>> https://github.com/qgis/QGIS/pull/5477
> >>> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
> >>> Boundless closed the QGIS team and I forgot it
> >>>
> >>> Luigi Pirelli
> >>>
> >>>
> >>>
> **
> >>> * 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
> >>> * Hire me: http://goo.gl/BYRQKg
> >>>
> >>>
> **
> >>>
> >>>
> >>> On 19 March 2018 at 10:59, G. Allegri  wrote:
> >>> > Hi all,
> >>> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on
> Windows
> >>> > 10.
> >>> > I can define a connection to my local PG, using basic authentication,
> >>> > and I
> >>> > can access data from Browser.
> >>> > If I try to open the connection from DB Manager I obtain;
> >>> >
> >>> > Traceback (most recent call last): File
> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> >>> > line
> >>> > 441, in rowCount self._refreshIndex(parent, True) File
> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> >>> > line
> >>> > 490, in _refreshIndex if item.populate(): File
> >>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> >>> > line
> >>> > 167, in populate if not connection.connect(): File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> >>> > line 103, in connect return self.connectToUri(uri) File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
> >>> > line 109, in connectToUri self.db = self.databasesFactory(self, uri)
> >>> > File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> >>> > line 70, in databasesFactory return PGDatabase(connection, uri) File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> >>> > line 111, in __init__ Database.__init__(self, connection, uri) File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
> >>> > line 218, in __init__ self.connector = self.connectorsFactory(uri)
> File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> >>> > line 114, in connectorsFactory return PostGisDBConnector(uri) File
> >>> >
> >>> >
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
> >>> > line 128, i

Re: [Qgis-user] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread Luigi Pirelli
he PR was from Boundless repo, make sense to ask to boundless if they
want to continue to support QGIS porting patches to 3.0?
Luigi Pirelli

**
* 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
* Hire me: http://goo.gl/BYRQKg
**


On 19 March 2018 at 11:28, Luigi Pirelli  wrote:
> yes sorry... not yet merged, and the PR have to be aligned to the current code
> Luigi Pirelli
>
> **
> * 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
> * Hire me: http://goo.gl/BYRQKg
> **
>
>
> On 19 March 2018 at 11:22, G. Allegri  wrote:
>> Thanks Luigi,
>> I already tried removing it manually, but it's created again every time.
>> So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
>> currently broken?
>>
>> Giovanni
>>
>> 2018-03-19 11:07 GMT+01:00 Luigi Pirelli :
>>>
>>> you can safetly remove
>>>
>>> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
>>> and try again
>>>
>>> btw it was fixed since in month in 2-18
>>> https://github.com/qgis/QGIS/pull/5477
>>> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
>>> Boundless closed the QGIS team and I forgot it
>>>
>>> Luigi Pirelli
>>>
>>>
>>> **
>>> * 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
>>> * Hire me: http://goo.gl/BYRQKg
>>>
>>> **
>>>
>>>
>>> On 19 March 2018 at 10:59, G. Allegri  wrote:
>>> > Hi all,
>>> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on Windows
>>> > 10.
>>> > I can define a connection to my local PG, using basic authentication,
>>> > and I
>>> > can access data from Browser.
>>> > If I try to open the connection from DB Manager I obtain;
>>> >
>>> > Traceback (most recent call last): File
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>>> > line
>>> > 441, in rowCount self._refreshIndex(parent, True) File
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>>> > line
>>> > 490, in _refreshIndex if item.populate(): File
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>>> > line
>>> > 167, in populate if not connection.connect(): File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>>> > line 103, in connect return self.connectToUri(uri) File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
>>> > line 109, in connectToUri self.db = self.databasesFactory(self, uri)
>>> > File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>>> > line 70, in databasesFactory return PGDatabase(connection, uri) File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>>> > line 111, in __init__ Database.__init__(self, connection, uri) File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
>>> > line 218, in __init__ self.connector = self.connectorsFactory(uri) File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>>> > line 114, in connectorsFactory return PostGisDBConnector(uri) File
>>> >
>>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
>>> > line 128, in __init__ os.remove(sslCAFile) PermissionError: [WinError 5]
>>> > Access denied:
>>> >
>>> > 'C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem'
>>> > I've tried removing and recreating the auth credentials.
>>> > I've tried also running QGIS as administrator.
>>> > Nothing seems to work...
>>> >
>>> > Is it a known bug?
>>> >
>>> > Giovanni
>>> >
>>> > ___
>

Re: [Qgis-user] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread Luigi Pirelli
yes sorry... not yet merged, and the PR have to be aligned to the current code
Luigi Pirelli

**
* 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
* Hire me: http://goo.gl/BYRQKg
**


On 19 March 2018 at 11:22, G. Allegri  wrote:
> Thanks Luigi,
> I already tried removing it manually, but it's created again every time.
> So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
> currently broken?
>
> Giovanni
>
> 2018-03-19 11:07 GMT+01:00 Luigi Pirelli :
>>
>> you can safetly remove
>>
>> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
>> and try again
>>
>> btw it was fixed since in month in 2-18
>> https://github.com/qgis/QGIS/pull/5477
>> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
>> Boundless closed the QGIS team and I forgot it
>>
>> Luigi Pirelli
>>
>>
>> **
>> * 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
>> * Hire me: http://goo.gl/BYRQKg
>>
>> **
>>
>>
>> On 19 March 2018 at 10:59, G. Allegri  wrote:
>> > Hi all,
>> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on Windows
>> > 10.
>> > I can define a connection to my local PG, using basic authentication,
>> > and I
>> > can access data from Browser.
>> > If I try to open the connection from DB Manager I obtain;
>> >
>> > Traceback (most recent call last): File
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> > line
>> > 441, in rowCount self._refreshIndex(parent, True) File
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> > line
>> > 490, in _refreshIndex if item.populate(): File
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
>> > line
>> > 167, in populate if not connection.connect(): File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>> > line 103, in connect return self.connectToUri(uri) File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
>> > line 109, in connectToUri self.db = self.databasesFactory(self, uri)
>> > File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>> > line 70, in databasesFactory return PGDatabase(connection, uri) File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>> > line 111, in __init__ Database.__init__(self, connection, uri) File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
>> > line 218, in __init__ self.connector = self.connectorsFactory(uri) File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
>> > line 114, in connectorsFactory return PostGisDBConnector(uri) File
>> >
>> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
>> > line 128, in __init__ os.remove(sslCAFile) PermissionError: [WinError 5]
>> > Access denied:
>> >
>> > 'C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem'
>> > I've tried removing and recreating the auth credentials.
>> > I've tried also running QGIS as administrator.
>> > Nothing seems to work...
>> >
>> > Is it a known bug?
>> >
>> > Giovanni
>> >
>> > ___
>> > 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] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread G. Allegri
Thanks Luigi,
I already tried removing it manually, but it's created again every time.
So, does this mean that DB Manager for PostGIS on QGIS 3/Windows is
currently broken?

Giovanni

2018-03-19 11:07 GMT+01:00 Luigi Pirelli :

> you can safetly remove
> C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-
> 7fd4ec0e9f7f}.pem
> and try again
>
> btw it was fixed since in month in 2-18 https://github.com/qgis/QGIS/
> pull/5477
> but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
> Boundless closed the QGIS team and I forgot it
>
> Luigi Pirelli
>
> 
> **
> * 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
> * Hire me: http://goo.gl/BYRQKg
> 
> **
>
>
> On 19 March 2018 at 10:59, G. Allegri  wrote:
> > Hi all,
> > I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on Windows
> 10.
> > I can define a connection to my local PG, using basic authentication,
> and I
> > can access data from Browser.
> > If I try to open the connection from DB Manager I obtain;
> >
> > Traceback (most recent call last): File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> line
> > 441, in rowCount self._refreshIndex(parent, True) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> line
> > 490, in _refreshIndex if item.populate(): File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py",
> line
> > 167, in populate if not connection.connect(): File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\postgis\plugin.py",
> > line 103, in connect return self.connectToUri(uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\plugin.py",
> > line 109, in connectToUri self.db = self.databasesFactory(self, uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\postgis\plugin.py",
> > line 70, in databasesFactory return PGDatabase(connection, uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\postgis\plugin.py",
> > line 111, in __init__ Database.__init__(self, connection, uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\plugin.py",
> > line 218, in __init__ self.connector = self.connectorsFactory(uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\postgis\plugin.py",
> > line 114, in connectorsFactory return PostGisDBConnector(uri) File
> > "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_
> plugins\postgis\connector.py",
> > line 128, in __init__ os.remove(sslCAFile) PermissionError: [WinError 5]
> > Access denied:
> > 'C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{
> 4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem'
> > I've tried removing and recreating the auth credentials.
> > I've tried also running QGIS as administrator.
> > Nothing seems to work...
> >
> > Is it a known bug?
> >
> > Giovanni
> >
> > ___
> > 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] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread Luigi Pirelli
you can safetly remove
C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem
and try again

btw it was fixed since in month in 2-18 https://github.com/qgis/QGIS/pull/5477
but port to 3.0 was stopped https://github.com/qgis/QGIS/pull/5599 due
Boundless closed the QGIS team and I forgot it

Luigi Pirelli

**
* 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
* Hire me: http://goo.gl/BYRQKg
**


On 19 March 2018 at 10:59, G. Allegri  wrote:
> Hi all,
> I'm facing the following issue with QGIS 3.1.0 (10044fb1dd) on Windows 10.
> I can define a connection to my local PG, using basic authentication, and I
> can access data from Browser.
> If I try to open the connection from DB Manager I obtain;
>
> Traceback (most recent call last): File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
> 441, in rowCount self._refreshIndex(parent, True) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
> 490, in _refreshIndex if item.populate(): File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
> 167, in populate if not connection.connect(): File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> line 103, in connect return self.connectToUri(uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
> line 109, in connectToUri self.db = self.databasesFactory(self, uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> line 70, in databasesFactory return PGDatabase(connection, uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> line 111, in __init__ Database.__init__(self, connection, uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
> line 218, in __init__ self.connector = self.connectorsFactory(uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
> line 114, in connectorsFactory return PostGisDBConnector(uri) File
> "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
> line 128, in __init__ os.remove(sslCAFile) PermissionError: [WinError 5]
> Access denied:
> 'C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem'
> I've tried removing and recreating the auth credentials.
> I've tried also running QGIS as administrator.
> Nothing seems to work...
>
> Is it a known bug?
>
> Giovanni
>
> ___
> 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] DB Manager cannot connect to PostGIS (error with traceback)

2018-03-19 Thread G. Allegri
Hi all,
I'm facing the following issue with QGIS 3.1.0 (10044fb1dd
) on Windows 10.
I can define a connection to my local PG, using basic authentication, and I
can access data from Browser.
If I try to open the connection from DB Manager I obtain;

Traceback (most recent call last): File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
441, in rowCount self._refreshIndex(parent, True) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
490, in _refreshIndex if item.populate(): File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_model.py", line
167, in populate if not connection.connect(): File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
line 103, in connect return self.connectToUri(uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
line 109, in connectToUri self.db = self.databasesFactory(self, uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
line 70, in databasesFactory return PGDatabase(connection, uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
line 111, in __init__ Database.__init__(self, connection, uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\plugin.py",
line 218, in __init__ self.connector = self.connectorsFactory(uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\plugin.py",
line 114, in connectorsFactory return PostGisDBConnector(uri) File
"C:/OSGEO4~1/apps/qgis-dev/./python/plugins\db_manager\db_plugins\postgis\connector.py",
line 128, in __init__ os.remove(sslCAFile) PermissionError: [WinError 5]
Access denied:
'C:/Users/giohappy/AppData/Local/Temp/tmp_basic_{4703a7e8-5f5a-44ec-b490-7fd4ec0e9f7f}.pem'

I've tried removing and recreating the auth credentials.
I've tried also running QGIS as administrator.
Nothing seems to work...

Is it a known bug?

Giovanni
___
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] DB Manager not showing Spatialite/Geopackage databases on Mac OS X.11

2016-11-14 Thread Olivier Dalang
Hi,

On my setup (QGIS 2.18 Mac OS X.11), the DB Manager doesn't show the
Spatialite/Geopackages files that are listed in the browser. Besides that,
Spatialite/Geopackages work as expected. The problem doesn't occur on my
Windows system.

Am I the only one experiencing this issue ? Any idea were it could come
from ? Should I open a ticket ?

Thanks !!

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

Re: [Qgis-user] DB manager error

2016-10-29 Thread Even Rouault
Le vendredi 28 octobre 2016 21:09:26, vous avez écrit :
> Hi, 
> 
> I'm using QGIS 2.99.0-Master rev. b2587b7 on Ubuntu 16.04 64bits.
> 
> When I tried to open a SQL query on a POSTGIS database I've got the
> following error while trying to open the saved connection to the
> database: 
> 
> 2016-10-28T15:58:35   1   Traceback (most recent call last):
> 
> File 
> "/usr/share/qgis/python/plugins/db_manager/db_model.py", 
line
> 440, in rowCount
> 
>   self._refreshIndex(parent, True)
> 
> File 
> "/usr/share/qgis/python/plugins/db_manager/db_model.py", 
line
> 491, in _refreshIndex
> 
>   if item.populate():
> 
> File 
> "/usr/share/qgis/python/plugins/db_manager/db_model.py", 
line
> 166, in populate
> 
>   if not connection.connect():
> 
> File
> "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py",
> line 99, in connect
> 
>   return self.connectToUri(uri)
> 
> File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
> line 108, in connectToUri
> 
>   self.db = self.databasesFactory(self, uri)
> 
> File
> "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py",
> line 69, in databasesFactory
> 
>   return PGDatabase(connection, uri)
> 
> File
> "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py",
> line 107, in __init__
> 
>   Database.__init__(self, connection, uri)
> 
> File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py",
> line 217, in __init__
> 
>   self.connector = self.connectorsFactory(uri)
> 
> File
> "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py",
> line 110, in connectorsFactory
> 
>   return PostGisDBConnector(uri)
> 
> File
> "/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/connector.py
> ", line 67, in __init__
> 
>   self.connection = 
psycopg2.connect(expandedConnInfo.encode('utf-8'))
> 
> File 
> "/usr/lib/python3/dist-packages/psycopg2/__init__.py", 
line 164,
> in connect
> 
>   conn = _connect(dsn, 
> connection_factory=connection_factory,
> async=async)
> 
>   TypeError: argument 1 must be str, not bytes
> 
> 
> I can load postgis layers from the same connection without problems.
> What can I do?

I see a pull request about that https://github.com/qgis/QGIS/pull/3635, but it 
is still tagged work in progress.

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] DB manager error

2016-10-28 Thread Gustavo Martínez


Hi, 

I'm using QGIS 2.99.0-Master rev. b2587b7 on Ubuntu 16.04 64bits.

When I tried to open a SQL query on a POSTGIS database I've got the following 
error while trying to open the saved connection to the database: 

2016-10-28T15:58:35 1   Traceback (most recent call last):

  File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 440, in rowCount

self._refreshIndex(parent, True)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 491, in 
_refreshIndex

if item.populate():

  File 
"/usr/share/qgis/python/plugins/db_manager/db_model.py", line 166, in populate

if not connection.connect():

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
99, in connect

return self.connectToUri(uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py", line 108, in 
connectToUri

self.db = self.databasesFactory(self, uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
69, in databasesFactory

return PGDatabase(connection, uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
107, in __init__

Database.__init__(self, connection, uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/plugin.py", line 217, in 
__init__

self.connector = self.connectorsFactory(uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/plugin.py", line 
110, in connectorsFactory

return PostGisDBConnector(uri)

  File 
"/usr/share/qgis/python/plugins/db_manager/db_plugins/postgis/connector.py", 
line 67, in __init__

self.connection = 
psycopg2.connect(expandedConnInfo.encode('utf-8'))

  File 
"/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 164, in connect

conn = _connect(dsn, 
connection_factory=connection_factory, async=async)

TypeError: argument 1 must be str, not bytes


I can load postgis layers from the same connection without problems.
What can I do?
Thanks,



Gustavo



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

[Qgis-user] DB Manager SQL window does not open

2016-09-30 Thread Julie Pierson

Hi all,

When I try to open the SQL window in DB Manager, I get this error :
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
I'm using Ubuntu 14.04.

Here's the complete error message :
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'
Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 
194, in runSqlWindow

query = DlgSqlWindow(self.iface, db, self)
  File "/usr/share/qgis/python/plugins/db_manager/dlg_sql_window.py", 
line 73, in __init__

self.editSql.setMarginVisible(True)
AttributeError: 'SqlEdit' object has no attribute 'setMarginVisible'

Version de Python : 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2]
Version de QGIS : 2.14.7-Essen Essen, exported

Does anyone have the same problem ? Is it a known issue, or should I 
open one ?


Thanks !

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

[Qgis-user] DB Manager spatialite query NOT working

2016-04-13 Thread David J. Bakeman

  
  
I am using qgis 2.14.1 on fedora 21 Linux

I've done this successfully in older versions of qgis but it's
not working now and I don't kjnow why.

So I open a spatialite database in DB manager.  I can add tables
with and without geometry just fine.  The problem is when I try
to load a query nothing happens.  I input the query execute it
to make sure it works.  Then select Load as new layer.  Select a
unique key and a geometry column (the geometry is a simple
linestring).  Then press Load now!  Nothing happens!  So I added
messages to db manager code and everything looks OK  but a valid
QgsVectorLayer isn't created?

So I tried in the python console and
QgsVectorLayer("dbname=test.sqlite table=test (geometry)",
"test0", "spatialite") works but QgsVectorLayer("dbname=test.sqlite
table='select * from test' (geometry)",
"test0", "spatialite") Does NOT.  Doing QgsVectorLayer("dbname=test.sqlite table='select *
from test'", "test0",
"spatialite")creates a non geometry table correctly???

Like I said this used to work in older versions of qgis.  Anyone
know what to check next?
  
  

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

Re: [Qgis-user] DB Manager geometry problems

2016-03-21 Thread Chris Buckmaster
Thanks Karl-Magnus – for some reason I thought they already had privileges but 
they didn’t, thanks again!

Chris

From: Karl-Magnus Jönsson [mailto:karl-magnus.jons...@kristianstad.se]
Sent: 21 March 2016 06:27
To: Chris Buckmaster; qgis-user@lists.osgeo.org
Subject: SV: DB Manager geometry problems

Hi Chris

Appears that the user can’t access the view geometry_columns in the public 
schema. The information is accessed from there. Grant select privileges.

Karl-Magnus Jönsson │GIS-utvecklare
Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
Kristianstads kommun
291 80 Kristianstad
Besöksadress: Västra Storgatan 12
Tel 044-13 54 16 │ Mobil: 0733-13 54 16 │karl-magnus.jons...@kristianstad.se
www.kristianstad.se<http://www.kristianstad.se/>

Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Chris Buckmaster
Skickat: den 18 mars 2016 16:34
Till: qgis-user@lists.osgeo.org
Ämne: [Qgis-user] DB Manager geometry problems

Hi

I have several datasets loaded into PostGIS 2.0 with the owner as ‘superuser’ 
that has full permissions. I have then assigned select permissions to some 
other users, but I am not sure if they completely have the access they require 
as the DB Manager doesn’t show the spatial reference, and it says there is no 
entry in geometry_columns (attached are two screenshots which show what I get).

For my superuser connection, the geometry symbol is next to the layer name and 
it has all of the geometry information in the window, but for one of my select 
only users it does not show – do I need to give my select only users permission 
to access other tables in PostGIS? I have noticed that for larger datasets it 
takes quite a bit longer for the datasets to be loaded into PostGIS as well 
which leads me to believe that perhaps they are not accessing the spatial 
indexes or something?

Thanks, Chris

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

Re: [Qgis-user] DB Manager geometry problems

2016-03-20 Thread Karl-Magnus Jönsson
Hi Chris

Appears that the user can’t access the view geometry_columns in the public 
schema. The information is accessed from there. Grant select privileges.

Karl-Magnus Jönsson │GIS-utvecklare
Miljö- och samhällsbyggnadsförvaltningen, avd. Geografisk information
Kristianstads kommun
291 80 Kristianstad
Besöksadress: Västra Storgatan 12
Tel 044-13 54 16 │ Mobil: 0733-13 54 16 │karl-magnus.jons...@kristianstad.se
www.kristianstad.se<http://www.kristianstad.se/>

Från: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] För Chris Buckmaster
Skickat: den 18 mars 2016 16:34
Till: qgis-user@lists.osgeo.org
Ämne: [Qgis-user] DB Manager geometry problems

Hi

I have several datasets loaded into PostGIS 2.0 with the owner as ‘superuser’ 
that has full permissions. I have then assigned select permissions to some 
other users, but I am not sure if they completely have the access they require 
as the DB Manager doesn’t show the spatial reference, and it says there is no 
entry in geometry_columns (attached are two screenshots which show what I get).

For my superuser connection, the geometry symbol is next to the layer name and 
it has all of the geometry information in the window, but for one of my select 
only users it does not show – do I need to give my select only users permission 
to access other tables in PostGIS? I have noticed that for larger datasets it 
takes quite a bit longer for the datasets to be loaded into PostGIS as well 
which leads me to believe that perhaps they are not accessing the spatial 
indexes or something?

Thanks, Chris

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

[Qgis-user] DB Manager geometry problems

2016-03-19 Thread Chris Buckmaster
Hi

I have several datasets loaded into PostGIS 2.0 with the owner as 'superuser' 
that has full permissions. I have then assigned select permissions to some 
other users, but I am not sure if they completely have the access they require 
as the DB Manager doesn't show the spatial reference, and it says there is no 
entry in geometry_columns (attached are two screenshots which show what I get).

For my superuser connection, the geometry symbol is next to the layer name and 
it has all of the geometry information in the window, but for one of my select 
only users it does not show - do I need to give my select only users permission 
to access other tables in PostGIS? I have noticed that for larger datasets it 
takes quite a bit longer for the datasets to be loaded into PostGIS as well 
which leads me to believe that perhaps they are not accessing the spatial 
indexes or something?

Thanks, Chris

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

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-19 Thread David Fawcett
Alexandre,

Thank you very much.  Of course, it was operator error!

I was writing a quick query for a demo and not to solve a real problem, so
I hadn't really thought through the issue with unique results.  Adding
DISTINCT made it work as expected.

A great enhancement to DB Manager would be some sort of error reporting,
even if it was minimal.

Like:
- "db error", The database reported an error with your query.
- "QGIS error", There is something about your result set that prevents QGIS
from adding it to the map.

Even better would be an error about the selected id column not containing
unique values.

With no error message reported, I just assumed that the plugin might not be
completely compatible with the new 2.8 release.  (when really it was my
error...)

Thanks again.  The QGIS integration with PostGIS is really valuable and
powerful.

David.


On Thu, Mar 19, 2015 at 6:18 AM, Alexandre Neto 
wrote:

> Hello David,
>
> Can I assume that you use fires.id as unique integer value column in
> DBManager to load the layer?
>
> Because with your query you will likely get repeated values for fires.id.
> That is, each fires feature will appear as many times as lakes within 1000
> meters.
>
> If that's what you want, you can use row_number() function to create a
> fictional id for your layer. Something like this:
>
> WITH my_query as
> (
> SELECT fires.id, fires.inci_no, fires.descript, fires.geom
> FROM lab.mpls_fires_2014 fires
> INNER JOIN lab.mpls_lakes lakes
> ON ST_DWITHIN(fires.geom, lakes.geom, 1000)
> )
> SELECT
> ROW_NUMBER() OVER() as id,
> my_query.*
> FROM my_query;
>
> But, if I understand your problem, you want to show all fires that
> occurred within 1000 m of a lake. In that case, each fire should only
> appear once. You can use DISTINCT for that:
>
> SELECT *DISTINCT* fires.id, fires.inci_no, fires.descript, fires.geom
> FROM lab.mpls_fires_2014 fires
> INNER JOIN lab.mpls_lakes lakes
> ON ST_DWITHIN(fires.geom, lakes.geom, 1000)
>
> Best regards,
>
> Alexandre Neto
>
>
> Em 19/03/2015 03:25, "David Fawcett"  escreveu:
>
> Thanks for the response Alexandre.
>>
>> Here is the query:
>>
>> SELECT fires.id, fires.inci_no, fires.descript, fires.geom
>> FROM lab.mpls_fires_2014 fires
>> INNER JOIN lab.mpls_lakes lakes
>>   ON ST_DWITHIN(fires.geom, lakes.geom, 1000)
>>
>> When I add ST_GEOMETRYTYPE(fires.geom) to the query, the value is
>> St_MultiPoint for all records.
>>
>> David.
>>
>> On Wed, Mar 18, 2015 at 5:26 PM, Alexandre Neto 
>> wrote:
>>
>>> Can you please show your sql query?
>>>
>>> Notice that if your query result in different geometries, qgis won't be
>>> able to choose a geometry type for the layer. I advice you to Check your
>>> results with St_GeometryType().
>>>
>>> Best regards,
>>>
>>> Alexandre Neto
>>> Em 18/03/2015 18:52, "David Fawcett"  escreveu:
>>>
 I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries.

 The DB Manager plugin is at 0.1.20.

 I can load layers into PostGIS using the DB Manager plugin, and I can
 use the SQL window to execute a spatial query intersecting two tables.
 But, when I check the box to load the query result as a layer, fill out the
 controls, and hit Load Now!, the layer isn't added.

 I get the little black and white 'thinking beachball', but nothing else
 happens.

 Can anyone else confirm this?  If so, I can file an issue.

 David.

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

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

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-19 Thread Alexandre Neto
Hello David,

Can I assume that you use fires.id as unique integer value column in
DBManager to load the layer?

Because with your query you will likely get repeated values for fires.id.
That is, each fires feature will appear as many times as lakes within 1000
meters.

If that's what you want, you can use row_number() function to create a
fictional id for your layer. Something like this:

WITH my_query as
(
SELECT fires.id, fires.inci_no, fires.descript, fires.geom
FROM lab.mpls_fires_2014 fires
INNER JOIN lab.mpls_lakes lakes
ON ST_DWITHIN(fires.geom, lakes.geom, 1000)
)
SELECT
ROW_NUMBER() OVER() as id,
my_query.*
FROM my_query;

But, if I understand your problem, you want to show all fires that
occurred within 1000 m of a lake. In that case, each fire should only
appear once. You can use DISTINCT for that:

SELECT *DISTINCT* fires.id, fires.inci_no, fires.descript, fires.geom
FROM lab.mpls_fires_2014 fires
INNER JOIN lab.mpls_lakes lakes
ON ST_DWITHIN(fires.geom, lakes.geom, 1000)

Best regards,

Alexandre Neto


Em 19/03/2015 03:25, "David Fawcett"  escreveu:

> Thanks for the response Alexandre.
>
> Here is the query:
>
> SELECT fires.id, fires.inci_no, fires.descript, fires.geom
> FROM lab.mpls_fires_2014 fires
> INNER JOIN lab.mpls_lakes lakes
>   ON ST_DWITHIN(fires.geom, lakes.geom, 1000)
>
> When I add ST_GEOMETRYTYPE(fires.geom) to the query, the value is
> St_MultiPoint for all records.
>
> David.
>
> On Wed, Mar 18, 2015 at 5:26 PM, Alexandre Neto 
> wrote:
>
>> Can you please show your sql query?
>>
>> Notice that if your query result in different geometries, qgis won't be
>> able to choose a geometry type for the layer. I advice you to Check your
>> results with St_GeometryType().
>>
>> Best regards,
>>
>> Alexandre Neto
>> Em 18/03/2015 18:52, "David Fawcett"  escreveu:
>>
>>> I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries.
>>>
>>> The DB Manager plugin is at 0.1.20.
>>>
>>> I can load layers into PostGIS using the DB Manager plugin, and I can
>>> use the SQL window to execute a spatial query intersecting two tables.
>>> But, when I check the box to load the query result as a layer, fill out the
>>> controls, and hit Load Now!, the layer isn't added.
>>>
>>> I get the little black and white 'thinking beachball', but nothing else
>>> happens.
>>>
>>> Can anyone else confirm this?  If so, I can file an issue.
>>>
>>> David.
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread David Fawcett
Thanks for the response Alexandre.

Here is the query:

SELECT fires.id, fires.inci_no, fires.descript, fires.geom
FROM lab.mpls_fires_2014 fires
INNER JOIN lab.mpls_lakes lakes
  ON ST_DWITHIN(fires.geom, lakes.geom, 1000)

When I add ST_GEOMETRYTYPE(fires.geom) to the query, the value is
St_MultiPoint for all records.

David.

On Wed, Mar 18, 2015 at 5:26 PM, Alexandre Neto 
wrote:

> Can you please show your sql query?
>
> Notice that if your query result in different geometries, qgis won't be
> able to choose a geometry type for the layer. I advice you to Check your
> results with St_GeometryType().
>
> Best regards,
>
> Alexandre Neto
> Em 18/03/2015 18:52, "David Fawcett"  escreveu:
>
>> I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries.
>>
>> The DB Manager plugin is at 0.1.20.
>>
>> I can load layers into PostGIS using the DB Manager plugin, and I can use
>> the SQL window to execute a spatial query intersecting two tables.  But,
>> when I check the box to load the query result as a layer, fill out the
>> controls, and hit Load Now!, the layer isn't added.
>>
>> I get the little black and white 'thinking beachball', but nothing else
>> happens.
>>
>> Can anyone else confirm this?  If so, I can file an issue.
>>
>> David.
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread Alexandre Neto
Can you please show your sql query?

Notice that if your query result in different geometries, qgis won't be
able to choose a geometry type for the layer. I advice you to Check your
results with St_GeometryType().

Best regards,

Alexandre Neto
Em 18/03/2015 18:52, "David Fawcett"  escreveu:

> I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries.
>
> The DB Manager plugin is at 0.1.20.
>
> I can load layers into PostGIS using the DB Manager plugin, and I can use
> the SQL window to execute a spatial query intersecting two tables.  But,
> when I check the box to load the query result as a layer, fill out the
> controls, and hit Load Now!, the layer isn't added.
>
> I get the little black and white 'thinking beachball', but nothing else
> happens.
>
> Can anyone else confirm this?  If so, I can file an issue.
>
> David.
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] DB Manager in QGIS 2.8

2015-03-18 Thread David Fawcett
I am running QGIS 2.8.1 on OSX 10.9.5 using William's binaries.

The DB Manager plugin is at 0.1.20.

I can load layers into PostGIS using the DB Manager plugin, and I can use
the SQL window to execute a spatial query intersecting two tables.  But,
when I check the box to load the query result as a layer, fill out the
controls, and hit Load Now!, the layer isn't added.

I get the little black and white 'thinking beachball', but nothing else
happens.

Can anyone else confirm this?  If so, I can file an issue.

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

[Qgis-user] DB Manager query time for postgis layer

2014-10-15 Thread AntonioLocandro
Is there a way to know if a query is executing like in PGADMIN? 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/DB-Manager-query-time-for-postgis-layer-tp5167721.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB Manager query no geometry column

2014-09-11 Thread AntonioLocandro
Is there a way to do a query to add a table with no geometry? I am not able
to do so



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/DB-Manager-query-no-geometry-column-tp5161344.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] DB Manager

2014-02-02 Thread Giuseppe Sucameli
Hi Alexandre,

On Sun, Feb 2, 2014 at 11:28 PM, Alexandre Neto wrote:

> I believe that DB manager (or actually the Postgis provider to QGIS) does
> not like some expressions, maybe the CASE WHEN is the problem... I remember
> having problems with the expression WITH foo as (...).
>

the error message says:

> *[ERROR:  function geometrytype(double precision) does not exist*
>

The good news are: You alredy found the workaround.
>

Unfortunately that query is computed internally, into the QGIS provider, so
no one can change it.
Even trying to load a layer by using "SELECT * FROM mytable" as query could
raise such a error.

Regards.


> Alexandre Neto
>
>
> On Sun, Feb 2, 2014 at 10:16 PM, Giuseppe Sucameli 
> wrote:
>
>> Hi André,
>> what QGIS and PostGIS versions are you running?
>> Regards.
>>
>>
>> On Sun, Feb 2, 2014 at 3:59 PM, ALT SHN  wrote:
>>
>>> Hi list,
>>>
>>> I've been struggling with DB Manager, and I hope someone can explain me
>>> what the problem is.
>>>
>>> I am querying a PostGIS table but when I try to load the SELECT results
>>> to map canvas nothing happens! A simple example:
>>>
>>> SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'
>>>
>>> returns thos message in log winfow:
>>>
>>> *Erroneous query: SELECT DISTINCT CASE WHEN
>>> upper(geometrytype("area_ea_ha")) IN
>>> ('POINT','MULTIPOINT','POINTM','MULTIPOINTM') THEN 'POINT' WHEN
>>> upper(geometrytype("area_ea_ha")) IN
>>> ('LINESTRING','MULTILINESTRING','LINESTRINGM','MULTILINESTRINGM') THEN
>>> 'LINESTRING' WHEN upper(geometrytype("area_ea_ha")) IN
>>> ('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM') THEN 'POLYGON' END,
>>> st_srid("area_ea_ha") FROM (SELECT *, geom::geometry FROM FREGUESIAS_2013
>>> where freguesia ILIKE 'a%'*
>>> *) AS "subQuery_0" returned 7 [ERROR:  function geometrytype(double
>>> precision) does not exist*
>>> *LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...*
>>> *^*
>>> *HINT:  No function matches the given name and argument types. You might
>>> need to add explicit type casts.*
>>> *]*
>>>
>>> Now the strange think is that if use this query as a CREATE VIEW, the
>>> view can be added to map canvas! Any hints?
>>>
>>> Thanks in advance,
>>>
>>> André
>>>
>>> --
>>> ---
>>>
>>>
>>> *Sociedade de História Natural*
>>> Departamento de Informação Geográfica
>>> Polígono Industrial do Alto do Amial
>>> Pav.H02 e H06
>>>
>>> i.geograf...@alt-shn.org 
>>> www.shn.pt
>>> www.alt-shn.blogspot.com
>>> Facebook 
>>>
>>> TLM: 964138188
>>>
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>>
>>
>> --
>> Giuseppe Sucameli
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>


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

Re: [Qgis-user] DB Manager

2014-02-02 Thread Alexandre Neto
André,


I believe that DB manager (or actually the Postgis provider to QGIS) does
not like some expressions, maybe the CASE WHEN is the problem... I remember
having problems with the expression WITH foo as (...).

The good news are: You alredy found the workaround.

Alexandre Neto


On Sun, Feb 2, 2014 at 10:16 PM, Giuseppe Sucameli wrote:

> Hi André,
> what QGIS and PostGIS versions are you running?
> Regards.
>
>
> On Sun, Feb 2, 2014 at 3:59 PM, ALT SHN  wrote:
>
>> Hi list,
>>
>> I've been struggling with DB Manager, and I hope someone can explain me
>> what the problem is.
>>
>> I am querying a PostGIS table but when I try to load the SELECT results
>> to map canvas nothing happens! A simple example:
>>
>> SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'
>>
>> returns thos message in log winfow:
>>
>> *Erroneous query: SELECT DISTINCT CASE WHEN
>> upper(geometrytype("area_ea_ha")) IN
>> ('POINT','MULTIPOINT','POINTM','MULTIPOINTM') THEN 'POINT' WHEN
>> upper(geometrytype("area_ea_ha")) IN
>> ('LINESTRING','MULTILINESTRING','LINESTRINGM','MULTILINESTRINGM') THEN
>> 'LINESTRING' WHEN upper(geometrytype("area_ea_ha")) IN
>> ('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM') THEN 'POLYGON' END,
>> st_srid("area_ea_ha") FROM (SELECT *, geom::geometry FROM FREGUESIAS_2013
>> where freguesia ILIKE 'a%'*
>> *) AS "subQuery_0" returned 7 [ERROR:  function geometrytype(double
>> precision) does not exist*
>> *LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...*
>> *^*
>> *HINT:  No function matches the given name and argument types. You might
>> need to add explicit type casts.*
>> *]*
>>
>> Now the strange think is that if use this query as a CREATE VIEW, the
>> view can be added to map canvas! Any hints?
>>
>> Thanks in advance,
>>
>> André
>>
>> --
>> ---
>>
>>
>> *Sociedade de História Natural*
>> Departamento de Informação Geográfica
>> Polígono Industrial do Alto do Amial
>> Pav.H02 e H06
>>
>> i.geograf...@alt-shn.org 
>> www.shn.pt
>> www.alt-shn.blogspot.com
>> Facebook 
>>
>> TLM: 964138188
>>
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
>
> --
> Giuseppe Sucameli
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] DB Manager

2014-02-02 Thread Giuseppe Sucameli
Hi André,
what QGIS and PostGIS versions are you running?
Regards.


On Sun, Feb 2, 2014 at 3:59 PM, ALT SHN  wrote:

> Hi list,
>
> I've been struggling with DB Manager, and I hope someone can explain me
> what the problem is.
>
> I am querying a PostGIS table but when I try to load the SELECT results to
> map canvas nothing happens! A simple example:
>
> SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'
>
> returns thos message in log winfow:
>
> *Erroneous query: SELECT DISTINCT CASE WHEN
> upper(geometrytype("area_ea_ha")) IN
> ('POINT','MULTIPOINT','POINTM','MULTIPOINTM') THEN 'POINT' WHEN
> upper(geometrytype("area_ea_ha")) IN
> ('LINESTRING','MULTILINESTRING','LINESTRINGM','MULTILINESTRINGM') THEN
> 'LINESTRING' WHEN upper(geometrytype("area_ea_ha")) IN
> ('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM') THEN 'POLYGON' END,
> st_srid("area_ea_ha") FROM (SELECT *, geom::geometry FROM FREGUESIAS_2013
> where freguesia ILIKE 'a%'*
> *) AS "subQuery_0" returned 7 [ERROR:  function geometrytype(double
> precision) does not exist*
> *LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...*
> *^*
> *HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.*
> *]*
>
> Now the strange think is that if use this query as a CREATE VIEW, the view
> can be added to map canvas! Any hints?
>
> Thanks in advance,
>
> André
>
> --
> ---
>
>
> *Sociedade de História Natural*
> Departamento de Informação Geográfica
> Polígono Industrial do Alto do Amial
> Pav.H02 e H06
>
> i.geograf...@alt-shn.org 
> www.shn.pt
> www.alt-shn.blogspot.com
> Facebook 
>
> TLM: 964138188
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



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

[Qgis-user] DB Manager

2014-02-02 Thread ALT SHN
Hi list,

I've been struggling with DB Manager, and I hope someone can explain me
what the problem is.

I am querying a PostGIS table but when I try to load the SELECT results to
map canvas nothing happens! A simple example:

SELECT * FROM FREGUESIAS_2013 where freguesia ILIKE 'a%'

returns thos message in log winfow:

*Erroneous query: SELECT DISTINCT CASE WHEN
upper(geometrytype("area_ea_ha")) IN
('POINT','MULTIPOINT','POINTM','MULTIPOINTM') THEN 'POINT' WHEN
upper(geometrytype("area_ea_ha")) IN
('LINESTRING','MULTILINESTRING','LINESTRINGM','MULTILINESTRINGM') THEN
'LINESTRING' WHEN upper(geometrytype("area_ea_ha")) IN
('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM') THEN 'POLYGON' END,
st_srid("area_ea_ha") FROM (SELECT *, geom::geometry FROM FREGUESIAS_2013
where freguesia ILIKE 'a%'*
*) AS "subQuery_0" returned 7 [ERROR:  function geometrytype(double
precision) does not exist*
*LINE 1: SELECT DISTINCT CASE WHEN upper(geometrytype("area_ea_ha")) ...*
*^*
*HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.*
*]*

Now the strange think is that if use this query as a CREATE VIEW, the view
can be added to map canvas! Any hints?

Thanks in advance,

André

-- 
---


*Sociedade de História Natural*
Departamento de Informação Geográfica
Polígono Industrial do Alto do Amial
Pav.H02 e H06

i.geograf...@alt-shn.org 
www.shn.pt
www.alt-shn.blogspot.com
Facebook 

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

Re: [Qgis-user] DB manager don't load postgis tables (not geometric tables)

2013-11-12 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 12/11/2013 14:32, Pietro Rossin ha scritto:
> Hello As I understood db manager should load alphanumeric tables,
> right?
> 
> In my installation of qgis (2.0.1) it doesn't..

Please have a look to the bugtracker: I have reported a similar issue
recently. DB Manager needs some love, sponsors are welcome.
All the best.

- -- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlKCL4QACgkQ/NedwLUzIr7iPACgnog4vgnGNSWA1FTduaiR+CpH
xAkAnAhMBGbDE4G4OHtJW6PHmqjlJClI
=hTxU
-END PGP SIGNATURE-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB manager don't load postgis tables (not geometric tables)

2013-11-12 Thread Pietro Rossin
Hello
As I understood db manager should load alphanumeric tables, right?

In my installation of qgis (2.0.1) it doesn't..
When I try to drag and drop a table (not geometries, they work as expected),
I get an error saying:

Interrogazione errata: SELECT
has_table_privilege('"myschema"."mytable"','DELETE'),has_any_column_privilege('"myschema"."mytable"','UPDATE'),has_column_privilege('"myschema"."mytable"','','UPDATE'),has_table_privilege('"myschema"."mytable"','INSERT'),current_schema()
ha restituito 7 [ERROR:  column "" of relation "mytable" does not exist
]

Impossibile determinare i privilegi di accesso alla tabella
"myschema"."mytable"
Questo è l'errore riportato dal database:
ERROR:  column "" of relation "mytable" does not exist

SQL: SELECT
has_table_privilege('"myschema"."mytable"','DELETE'),has_any_column_privilege('"myschema"."mytable"','UPDATE'),has_column_privilege('"myschema"."mytable"','','UPDATE'),has_table_privilege('"myschema"."mytable"','INSERT'),current_schema()


With all the geometric tables in the same schema there isn't any problem,
why?
Thanks
Pietro



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/DB-manager-don-t-load-postgis-tables-not-geometric-tables-tp5088765.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-24 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 22/10/2013 15:42, Jrgen E. Fischer ha scritto:

> QGIS and the db_manager use separate sessions.  I didn't try, but I doubt that
> you can load temporary layers created by db_manager into qgis.

you can, however, run a query and load its results as a layer in qgis.
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.15 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlJpTykACgkQ/NedwLUzIr4nTgCfZVT9dCUM8jsoTfIrSAVLUWcI
KykAnitFAq77BxcZED7CvNTlx/vsWZ22
=yT12
-END PGP SIGNATURE-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread António M . Rodrigues
Hi Jürgen,

Thanks for that.

I did some testing following your e-mail.
After creating a layer in db_manager, I tried to load it and got an error:

 dbname='testes'(...)key='r_table_catalog'
table="pg_temp_7"."nnn2" sql= is an invalid layer - not loaded

I guess I'll have to think of another way to housekeep my database...

António


2013/10/22 Jürgen E. 

> Hi António,
>
> On Tue, 22. Oct 2013 at 13:29:57 +0100, António M. Rodrigues wrote:
> > As you say, perhaps the best is to contact Giuseppe Sucameli to see
> > whether this could be improved (if of course is an useful feature for
> > other users).
>
> QGIS and the db_manager use separate sessions.  I didn't try, but I doubt
> that
> you can load temporary layers created by db_manager into qgis.
>
>
> Jürgen
>
> --
> Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
> Dipl.-Inf. (FH)   Rheinstraße 13Fax. +49-4931-918175-50
> Software Engineer D-26506 Norden
> http://www.norbit.de
> QGIS PSC member (RM)   IRC: jef on FreeNode
>
> --
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread Jürgen E . Fischer
Hi António,

On Tue, 22. Oct 2013 at 13:29:57 +0100, António M. Rodrigues wrote:
> As you say, perhaps the best is to contact Giuseppe Sucameli to see
> whether this could be improved (if of course is an useful feature for
> other users).

QGIS and the db_manager use separate sessions.  I didn't try, but I doubt that
you can load temporary layers created by db_manager into qgis.


Jürgen

-- 
Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
Dipl.-Inf. (FH)   Rheinstraße 13Fax. +49-4931-918175-50
Software Engineer D-26506 Norden   http://www.norbit.de
QGIS PSC member (RM)   IRC: jef on FreeNode 


-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

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


Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread António M . Rodrigues
For me the advantage is simple: I have a few plpgsql functions which create
tables with variables computed from some quite large tables. I then use
these tables as input to create other result tables (with geometry).

And yes, the advantage is not to deal with multiple deleting in the end of
each session.

As you say, perhaps the best is to contact Giuseppe Sucameli to see whether
this could be improved (if of course is an useful feature for other users).

Thanks,
António



2013/10/22 Andreas Neumann 

> ok - wasn't aware of that.
>
> What is the advantage of using these temp tables? That you do not have
> to deal with deleting the table?
>
> I am not too familiar with the internals of db-manager. Does it
> establish a session? Probably Giuseppe Sucameli can help.
>
> Andreas
>
> Am 22.10.2013 14:10, schrieb António M. Rodrigues:
> > In postgres I can use 'create temporary table...' which will create a new
> > object which only exists in the present session. It can only be stored in
> > special schemas (which can be accessed from layer--> add postgis layer),
> > called pg_tmp_'some integer'.
> >
> > I was just saying it would be nice to be able to browse these objects in
> > db_manager. Of course I can do this in the command line with psql.
> >
> > António
> >
> >
> > 2013/10/22 Andreas Neumann 
> >
> >> What do you mean by "temp tables"?
> >>
> >> There are no "temp tables" in a database. Either it is a table, a view
> >> or a table. All of these can already be opened with DB manager.
> >>
> >> Andreas
> >>
> >> Am 22.10.2013 13:57, schrieb António M. Rodrigues:
> >>> The thing is I have some custom functions which output temp tables. And
> >> it
> >>> would be useful to be able to explore these tables in db-manager.
> >>>
> >>> I guess it shouldn't be too difficult to tweak dbmanager.
> >>> I was looking at the source code for but unfortunately my knowledge of
> >>> pyqgis is not quite there (maybe one day... :--) ).
> >>>
> >>> António
> >>>
> >>>
> >>> 2013/10/22 Andreas Neumann 
> >>>
>  Hi,
> 
>  You can load query results in db-manager.
> 
>  Just create a query in db-manager, select the primary key column and
> the
>  geometry column and load it.
> 
>  Works fine for me.
> 
>  Andreas
> 
>  Am 22.10.2013 13:42, schrieb António M. Rodrigues:
> > Hi,
> >
> > Is there a way to access temporary tables through db-manager?
> >
> > From what I get, this is only possible through layer->add postgis
> layer
> > (also not available in the browser panel).
> >
> > Thanks,
> > António
> >
> >
> >
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
> 
>  ___
>  Qgis-user mailing list
>  Qgis-user@lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/qgis-user
> >>>
> >>
> >>
> >
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread Andreas Neumann
ok - wasn't aware of that.

What is the advantage of using these temp tables? That you do not have
to deal with deleting the table?

I am not too familiar with the internals of db-manager. Does it
establish a session? Probably Giuseppe Sucameli can help.

Andreas

Am 22.10.2013 14:10, schrieb António M. Rodrigues:
> In postgres I can use 'create temporary table...' which will create a new
> object which only exists in the present session. It can only be stored in
> special schemas (which can be accessed from layer--> add postgis layer),
> called pg_tmp_'some integer'.
> 
> I was just saying it would be nice to be able to browse these objects in
> db_manager. Of course I can do this in the command line with psql.
> 
> António
> 
> 
> 2013/10/22 Andreas Neumann 
> 
>> What do you mean by "temp tables"?
>>
>> There are no "temp tables" in a database. Either it is a table, a view
>> or a table. All of these can already be opened with DB manager.
>>
>> Andreas
>>
>> Am 22.10.2013 13:57, schrieb António M. Rodrigues:
>>> The thing is I have some custom functions which output temp tables. And
>> it
>>> would be useful to be able to explore these tables in db-manager.
>>>
>>> I guess it shouldn't be too difficult to tweak dbmanager.
>>> I was looking at the source code for but unfortunately my knowledge of
>>> pyqgis is not quite there (maybe one day... :--) ).
>>>
>>> António
>>>
>>>
>>> 2013/10/22 Andreas Neumann 
>>>
 Hi,

 You can load query results in db-manager.

 Just create a query in db-manager, select the primary key column and the
 geometry column and load it.

 Works fine for me.

 Andreas

 Am 22.10.2013 13:42, schrieb António M. Rodrigues:
> Hi,
>
> Is there a way to access temporary tables through db-manager?
>
> From what I get, this is only possible through layer->add postgis layer
> (also not available in the browser panel).
>
> Thanks,
> António
>
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>

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

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

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread António M . Rodrigues
In postgres I can use 'create temporary table...' which will create a new
object which only exists in the present session. It can only be stored in
special schemas (which can be accessed from layer--> add postgis layer),
called pg_tmp_'some integer'.

I was just saying it would be nice to be able to browse these objects in
db_manager. Of course I can do this in the command line with psql.

António


2013/10/22 Andreas Neumann 

> What do you mean by "temp tables"?
>
> There are no "temp tables" in a database. Either it is a table, a view
> or a table. All of these can already be opened with DB manager.
>
> Andreas
>
> Am 22.10.2013 13:57, schrieb António M. Rodrigues:
> > The thing is I have some custom functions which output temp tables. And
> it
> > would be useful to be able to explore these tables in db-manager.
> >
> > I guess it shouldn't be too difficult to tweak dbmanager.
> > I was looking at the source code for but unfortunately my knowledge of
> > pyqgis is not quite there (maybe one day... :--) ).
> >
> > António
> >
> >
> > 2013/10/22 Andreas Neumann 
> >
> >> Hi,
> >>
> >> You can load query results in db-manager.
> >>
> >> Just create a query in db-manager, select the primary key column and the
> >> geometry column and load it.
> >>
> >> Works fine for me.
> >>
> >> Andreas
> >>
> >> Am 22.10.2013 13:42, schrieb António M. Rodrigues:
> >>> Hi,
> >>>
> >>> Is there a way to access temporary tables through db-manager?
> >>>
> >>> From what I get, this is only possible through layer->add postgis layer
> >>> (also not available in the browser panel).
> >>>
> >>> Thanks,
> >>> António
> >>>
> >>>
> >>>
> >>> ___
> >>> Qgis-user mailing list
> >>> Qgis-user@lists.osgeo.org
> >>> http://lists.osgeo.org/mailman/listinfo/qgis-user
> >>>
> >>
> >> ___
> >> Qgis-user mailing list
> >> Qgis-user@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread Andreas Neumann
What do you mean by "temp tables"?

There are no "temp tables" in a database. Either it is a table, a view
or a table. All of these can already be opened with DB manager.

Andreas

Am 22.10.2013 13:57, schrieb António M. Rodrigues:
> The thing is I have some custom functions which output temp tables. And it
> would be useful to be able to explore these tables in db-manager.
> 
> I guess it shouldn't be too difficult to tweak dbmanager.
> I was looking at the source code for but unfortunately my knowledge of
> pyqgis is not quite there (maybe one day... :--) ).
> 
> António
> 
> 
> 2013/10/22 Andreas Neumann 
> 
>> Hi,
>>
>> You can load query results in db-manager.
>>
>> Just create a query in db-manager, select the primary key column and the
>> geometry column and load it.
>>
>> Works fine for me.
>>
>> Andreas
>>
>> Am 22.10.2013 13:42, schrieb António M. Rodrigues:
>>> Hi,
>>>
>>> Is there a way to access temporary tables through db-manager?
>>>
>>> From what I get, this is only possible through layer->add postgis layer
>>> (also not available in the browser panel).
>>>
>>> Thanks,
>>> António
>>>
>>>
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 

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

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread António M . Rodrigues
The thing is I have some custom functions which output temp tables. And it
would be useful to be able to explore these tables in db-manager.

I guess it shouldn't be too difficult to tweak dbmanager.
I was looking at the source code for but unfortunately my knowledge of
pyqgis is not quite there (maybe one day... :--) ).

António


2013/10/22 Andreas Neumann 

> Hi,
>
> You can load query results in db-manager.
>
> Just create a query in db-manager, select the primary key column and the
> geometry column and load it.
>
> Works fine for me.
>
> Andreas
>
> Am 22.10.2013 13:42, schrieb António M. Rodrigues:
> > Hi,
> >
> > Is there a way to access temporary tables through db-manager?
> >
> > From what I get, this is only possible through layer->add postgis layer
> > (also not available in the browser panel).
> >
> > Thanks,
> > António
> >
> >
> >
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db-manager (temporary tables)

2013-10-22 Thread Andreas Neumann
Hi,

You can load query results in db-manager.

Just create a query in db-manager, select the primary key column and the
geometry column and load it.

Works fine for me.

Andreas

Am 22.10.2013 13:42, schrieb António M. Rodrigues:
> Hi,
> 
> Is there a way to access temporary tables through db-manager?
> 
> From what I get, this is only possible through layer->add postgis layer
> (also not available in the browser panel).
> 
> Thanks,
> António
> 
> 
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 

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

[Qgis-user] db-manager (temporary tables)

2013-10-22 Thread António M . Rodrigues
Hi,

Is there a way to access temporary tables through db-manager?

>From what I get, this is only possible through layer->add postgis layer
(also not available in the browser panel).

Thanks,
António
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] db manager plugin problem loading features from esri personal geodb

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

Il 08/08/2013 16:00, Pietro Rossin ha scritto:
> While using a shp file it runs to the end of loading. But I loose
> the Z dimension...

ok, then it is probably a genuine bug. please open a ticket, with a
minimalistic way of replicating it.
thanks.
- -- 
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.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlIDr2EACgkQ/NedwLUzIr4hQwCeLAbkrUlVrArVCaZ5enenxt2y
85UAoJJBagK5UTZgR4Q5FDrSlUQRJ0aQ
=PGrY
-END PGP SIGNATURE-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] db manager plugin problem loading features from esri personal geodb

2013-08-08 Thread Pietro Rossin
While using a shp file it runs to the end of loading.
But I loose the Z dimension...
Thanks
Pietro


2013/8/8 Pietro Rossin 

> Hi Paolo
> I'm using the dev version in windows 1.9.0 (1.9.0-Master Revisione codice
> QGIS d821bcc)
>
> But I'm getting this error..
> bie
>
>
> 2013/8/7 Paolo Cavallini [via OSGeo.org] <[hidden 
> email]
> >
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Il 07/08/2013 14:53, Pietro Rossin ha scritto:
>>
>> > What can I do??
>>
>> Hi Pietro,
>> this is a known problem (MULTI geoms). It has been fixed on the dev
>> version, please use it.
>> 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.14 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAlICRN4ACgkQ/NedwLUzIr5YPQCdFniyxSyZJyMItuJwY8sk8pQ7
>> Ke4Anipj8vo5IrVD6b6/KlaA65iuEWV1
>> =IcLa
>> -END PGP SIGNATURE-
>> ___
>> Qgis-user mailing list
>> [hidden email] 
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>> --
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://osgeo-org.1560.x6.nabble.com/db-manager-plugin-problem-loading-features-from-esri-personal-geodb-tp5071294p5071296.html
>>  To unsubscribe from db manager plugin problem loading features from esri
>> personal geodb, click here.
>> NAML
>>
>
>
> --
> View this message in context: Re: db manager plugin problem loading
> features from esri personal 
> geodb
>
> Sent from the Quantum GIS - User mailing list 
> archiveat 
> Nabble.com.
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] db manager plugin problem loading features from esri personal geodb

2013-08-08 Thread Pietro Rossin
Hi Paolo
I'm using the dev version in windows 1.9.0 (1.9.0-Master Revisione codice
QGIS d821bcc)

But I'm getting this error..
bie


2013/8/7 Paolo Cavallini [via OSGeo.org] <
ml-node+s1560n5071296...@n6.nabble.com>

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Il 07/08/2013 14:53, Pietro Rossin ha scritto:
>
> > What can I do??
>
> Hi Pietro,
> this is a known problem (MULTI geoms). It has been fixed on the dev
> version, please use it.
> 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.14 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlICRN4ACgkQ/NedwLUzIr5YPQCdFniyxSyZJyMItuJwY8sk8pQ7
> Ke4Anipj8vo5IrVD6b6/KlaA65iuEWV1
> =IcLa
> -END PGP SIGNATURE-
> ___
> Qgis-user mailing list
> [hidden email] 
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.x6.nabble.com/db-manager-plugin-problem-loading-features-from-esri-personal-geodb-tp5071294p5071296.html
>  To unsubscribe from db manager plugin problem loading features from esri
> personal geodb, click 
> here
> .
> NAML
>




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/db-manager-plugin-problem-loading-features-from-esri-personal-geodb-tp5071294p5071496.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] db manager plugin problem loading features from esri personal geodb

2013-08-07 Thread Paolo Cavallini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Il 07/08/2013 14:53, Pietro Rossin ha scritto:

> What can I do??

Hi Pietro,
this is a known problem (MULTI geoms). It has been fixed on the dev
version, please use it.
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.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlICRN4ACgkQ/NedwLUzIr5YPQCdFniyxSyZJyMItuJwY8sk8pQ7
Ke4Anipj8vo5IrVD6b6/KlaA65iuEWV1
=IcLa
-END PGP SIGNATURE-
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] db manager plugin problem loading features from esri personal geodb

2013-08-07 Thread Pietro Rossin
Hello community
I'm using Qgis Master and db manager plugin updated today.
In qgis I can load an esri personal geodb polyline layer correctly
If I try to upload to a postgis schema with dbmanager I get an error after a
while.
I select to create a primary key, to call "geom" the geometry column, I set
the source and targhet SRID (the same) and I tell db manager to create
spatial index.
Dbmanager don't let me select to append data (radio button grayed out)
neither let me select to create single geometries instead of multiple ones.

The error I get is:

Errore nella creazione di elementi da #0 a #0. L'errore della sorgente dati
è: 
Errore PostGIS nell'aggiunta delle geometrie: ERROR:  Geometry type
(MultiLineString) does not match column type (LineString)

Errore nella creazione di elementi da #0 a #0. L'errore della sorgente dati
è: 
Errore PostGIS nell'aggiunta delle geometrie: ERROR:  Geometry type
(MultiLineString) does not match column type (LineString)

.
Stop dopo 1200 errori
Scritti solo 2800 di 4000 elementi.

In pgadminIII I can see that the table is created and approx. 2800 features
are added and I can load them in qgis..

So, dbmanager by default create a linestring geometry column and my data are
multilinestring

If I create a table with a multilinestring geometry column dbmanager don't
let me append data (button grayed)..
If I move to a shp and then to a postgis I can loose field names
So
What can I do??

Thank you all
Pietro



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/db-manager-plugin-problem-loading-features-from-esri-personal-geodb-tp5071294.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB Manager POINTZ error?

2013-05-09 Thread David J. Bakeman

  
  
Using qgis 1.8 on Fedora 18.

I have a spatialite db with pointz values in a
  table.  I can display the table in qgis
without problems.  If I define a query I get results in the
Result view but if I try to Load the query to qgis to
visualize it nothing happens.  No
error message no views?  Just for grins I
  installed Qspatialite and tried the same thing.  Still no
  results but at least there was an error message :<) 
  The error is about aliasing the geometry field correctly
  which didn't help but at least there was some feedback. 
  Then I noticed that in QSpatialite in the Result window I
  could right click on a result and either save to text or
  send to qgis.  When I tried to send it to qgis I got the
  error incorrect Geometry POINTZ!  So I
added casttoxy to my query and it works! :<)

I tried a bunch of
google queries but never got anything on this so is
this fixed in the latest or should a bug be
submitted?

Thanks.

  
  

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


[Qgis-user] DB Manager - setting up a PostGIS connection, building SQL queries

2013-02-04 Thread Max Pyziur
Greetings,

I've been using Q-GIS for under a year. My first system was built on
Fedora 17, Postgresql 9.1.x, PostGIS 1.5.x, and Q-GIS Lisboa (1.8.x). It
was on Dell Inspiron 600m, a machine that was reliable, but somewhat slow.

I've acquired a Dell D630 Latitude laptop w/ a dual-core processor. The
software is a fresh install of Fedora 18; the technology stack starts w/
Postgresql 9.2.2.

Postgresql 9.2.x will not work with  releases of PostGIS prior to 2.0;
Fedora 18 did not ship w/ PostGIS 2.0, but rather 1.5.3. PostGIS
2.0-related RPMs are pending approval for release.

So, it's taken a while to migrate the large amount of spatial data that
I've acquired and built in a short span of time.

Today's success was upgrading the PostGIS data from 1.5.3 to 2.0.
According to the PostGIS documentation this requires a "hard upgrade," and
the postgis_restore.pl script is indispensable for this process.

All data is now visible using Postgresql's psql monitor.

The current set of tasks relate to making Q-GIS connect properly to
PostgreSQL/PostGIS. Loading an old project that functioned correctly on
the F17 Dell Inspiron 600M is not problem. It functions as it should and
(obviously) loads much more quickly.

Using DB Manager to connect to a PostGIS-enabled database is not possible
(so far). I've done the following from the menus:
View -> Add PostGIS layer and have successfully added a new PostGIS
connection. However, that connection is not visible when using DB Manager,
and produces the following error:
An error has occured while executing Python code:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/db_manager/db_manager.py", line 68,
in displayDbPluginErrors
self.statusBar.showMessage( msg, 5000 )
RuntimeError: wrapped C/C++ object of type QStatusBar has been deleted

Python version:
2.7.3 (default, Aug  9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)]


QGIS version:
1.8.0-Lisboa Lisboa, exported

Python path: ['/usr/share/qgis/python', '/home/pyz/.qgis//python',
'/home/pyz/.qgis//python/plugins', '/usr/share/qgis/python/plugins',
'/usr/lib64/python27.zip', '/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib64/python2.7/site-packages/PIL',
'/usr/lib64/python2.7/site-packages/geos',
'/usr/lib64/python2.7/site-packages/gtk-2.0',
'/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode',
'/usr/lib/python2.7/site-packages',
'/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info',
'/usr/share/qgis/python/plugins/fTools/tools',
'/home/pyz/projects/PostGIS/Railroads']


Any help in correcting this would be greatly appreciated.

Much thanks,

Max Pyziur
p...@brama.com
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] DB Manager and Varchar field lengths

2012-09-21 Thread Paolo Cavallini
Il 21/09/2012 16:00, James Stott ha scritto:

> Does anyone know why DB Manager is reporting that my varchar fields are 4 
> characters
> longer than they actually are?
> 
> When I create a table in DB manager (say as 6 length) it reports that it is 
> 10. Then
> if I look at the table in PGAdmin it says 6 length, if I try and enter more 
> data in
> the text field it limits me to 6 characters.
> 
> Should I report a bug or is it just me that sees this behaviour?

confirmed, please open a bug.
thanks.
-- 
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] DB Manager errors loadin shapefile to PostGIS

2012-08-23 Thread G. Allegri
I've just tried to load the corrected version (ERROR2) with shp2pgsql and
it works fine.

giovanni

2012/8/23 G. Allegri 

> I'm obtaining the following errors when I try to load (drag&drop) a
> shapefile do PostGIS.
>
> I'm running PostGIS 1.5 on Postgresql 9.1.
>
> QGis 1.9 on Windows 7 64bit.
>
>
> The first error (ERROR1) I've supposed was an encoding issue and float
> overflow due to the coordinate fields in the DBF.
>
> The DB encoding is UTF-8.
>
> The error happens whichever encoding I choose.
>
>
> 
>
> ERROR1
>
> 
>
> Error 7
>
> Feature write errors:
>
> Creation error for features from #0 to #0. Provider errors was:
>
> PostGIS error while adding features: ERROR: numeric field overflow
>
> DETAIL: A field with precision 19, scale 11 must round to an absolute
> value less than 10^8.
>
> Only 0 of 20 features written
>
> 
>
>
>
> I've opened the DBF with LibOffice to change encoding and format cells to
> lesser decimals.
>
> Now I get ERROR2. Considera that I don't have any reg2011 table on the DB
> when this happens.
>
>
> 
>
> ERROR2
>
> 
>
> Error 7
>
> Feature write errors:
>
> Creation error for features from #0 to #0. Provider errors was:
>
> PostGIS error while adding features: ERROR: new row for relation "reg2011"
> violates check constraint "enforce_geotype_geom"
>
> Only 0 of 20 features written.
>
> 
>
>
> The link to the original test shapefile is [1]
>
>
> giovanni
>
>
>
> [1] http://www.istat.it/it/files/2011/04/reg2011.zip
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB Manager errors loadin shapefile to PostGIS

2012-08-23 Thread G. Allegri
I'm obtaining the following errors when I try to load (drag&drop) a
shapefile do PostGIS.

I'm running PostGIS 1.5 on Postgresql 9.1.

QGis 1.9 on Windows 7 64bit.


The first error (ERROR1) I've supposed was an encoding issue and float
overflow due to the coordinate fields in the DBF.

The DB encoding is UTF-8.

The error happens whichever encoding I choose.




ERROR1



Error 7

Feature write errors:

Creation error for features from #0 to #0. Provider errors was:

PostGIS error while adding features: ERROR: numeric field overflow

DETAIL: A field with precision 19, scale 11 must round to an absolute value
less than 10^8.

Only 0 of 20 features written





I've opened the DBF with LibOffice to change encoding and format cells to
lesser decimals.

Now I get ERROR2. Considera that I don't have any reg2011 table on the DB
when this happens.




ERROR2



Error 7

Feature write errors:

Creation error for features from #0 to #0. Provider errors was:

PostGIS error while adding features: ERROR: new row for relation "reg2011"
violates check constraint "enforce_geotype_geom"

Only 0 of 20 features written.




The link to the original test shapefile is [1]


giovanni



[1] http://www.istat.it/it/files/2011/04/reg2011.zip
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] DB Manager release

2011-09-16 Thread flavio rigolon
2011/9/15 Paolo Cavallini :
> Hi all.
> Thanks to the hard work of Giuseppe Sucameli, the supervision of Martin 
> Dobias, and
> the support of Google for its Summer of Code initiative, DB Manager is now 
> available.
> DBManager's aim is to merge together some QGis DB plugins, e.g. PGManager, 
> SLManager,
> RT_Sql_Layer.

Many many thanks to all of you wich had hardly worked on this fantastic tool.

I've just tried it on Debian Sid (compiling from source) and I'm having fun!

Until now my tests went very well

Thanks a lot again
flavio
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB Manager release

2011-09-15 Thread Paolo Cavallini
Hi all.
Thanks to the hard work of Giuseppe Sucameli, the supervision of Martin Dobias, 
and
the support of Google for its Summer of Code initiative, DB Manager is now 
available.
DBManager's aim is to merge together some QGis DB plugins, e.g. PGManager, 
SLManager,
RT_Sql_Layer.
In this moment it works with both PostgreSQL and SQLite databases and it 
displays the
list of tables, info about the selected table, table data and preview, but also
allows to rename/delete tables through its GUI and run query on the selected
database, so at this stage it replaces at all SLManager.
Thanks to Mauricio De Paulo (mauriciodev), now DB Manager also supports PostGIS 
Rasters!
The last DB Manager version has support to Import Vector Layer feature by 
drag'n'drop
a layer from the QGis browser (or even DB Manager) to a database in the 
DBManager
GUI. The Import Vector Layer feature allows to import/copy any vector layer 
QGis can
load between different datasources, i.e. PostGIS/SpatiaLite databases and OGR 
files.
It's available through the QgsVectorLayerImport class and it has just been 
merged in
master branch.
See [1] for an example of use.
Faunalia is committed to support the development of this tool, and other DB 
plugin
developers are welcome to join and merge their work, it this makes sense, to 
reduce
confusion for users.
Enjoy.

[1] http://www.youtube.com/watch?v=bBe7WctSAXI

-- 
Paolo Cavallini - Faunalia
www.faunalia.eu
See details at: www.faunalia.eu/pc
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user