[Qgis-user] Editing a Postgis view

2016-11-15 Thread Andrea Peri
Hi,
I'm having some trouble to edit a postgis view using qgis.

The view is a simple:
select list-of-field from table1;

And the table1 is a table with a Primary key on a serial type field.

I add the first record and all was ok. The commit too.
When go to add the second record.
I start to have trouble.
The qgis report my always a constraint violation of the pk.
I try to leave the pk field empty, or try to fill it with a value.
No solution work.

So my question is if is confirmed that qgis (I use the 2.18) version)
is working in editing with a postgis view .

Thx.
A.



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
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] field calculator and query: asking help for faster solution!!!

2016-11-15 Thread Bernd Vogelgesang
Sorry, I still have no idea what your data looks like and what you like to  
achieve.


Cheers
Bernd

Am 15.11.2016, 21:51 Uhr, schrieb Azzurra Lentini  
:




Dear all,
I have an attribute table (associated to a shape file).

One of the field  is a string type field and his name is “DESCRIPTION” ,  
I need this field as an  INT number.
The field “description” is formed by 25 different samples and around 350  
records (so for every sample there are different records with the same  
>description).


SO I create a new field “descriptionINT” and I would like to fill the  
field with 25 numbers (1, 2, 3, 25) associated to the 25 different  
sample and 350 >records.

How I can do?
Till now, I was first selecting the records related to the first sample  
and I was giving the number, for example 1 (with field calculator) to  
all the records >related to the same sample.
But I am doing this one by one.. that means every time a do a new  
selection and I give a new number with field calculator.

Do you know a faster way (query)  to do this ?
​thanks A.L. ​

--Dr. HydrogeologistAZZURRA LENTINI
Expert of evaluation environmental hazards
GIS applicationHaity Mobile Tel: 0050946057393
++
Italy Mobile Tel.: **(39) 338 24 40 676
++
SKYPE azzurrahydro
++
azzurralent...@gmail.com
++
*Par respect pour l'environnement,*

*n'imprimez ce mail qu'en cas d'absolue nécessité*









--
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374___
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] Editing a Postgis view

2016-11-15 Thread Matthias Kuhn
Hi Andrea,

It works here.
Do you have an instead of insert rule written on your view?
It works for me this way (but my views are too complicated for postgres
to create default insert rules by default anyway).
You can also try to alter your view with a default value for the column
in question.

Best regards
Matthias

On 11/16/2016 08:15 AM, Andrea Peri wrote:
> Hi,
> I'm having some trouble to edit a postgis view using qgis.
> 
> The view is a simple:
> select list-of-field from table1;
> 
> And the table1 is a table with a Primary key on a serial type field.
> 
> I add the first record and all was ok. The commit too.
> When go to add the second record.
> I start to have trouble.
> The qgis report my always a constraint violation of the pk.
> I try to leave the pk field empty, or try to fill it with a value.
> No solution work.
> 
> So my question is if is confirmed that qgis (I use the 2.18) version)
> is working in editing with a postgis view .
> 
> Thx.
> A.
> 
> 
> 
___
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] field calculator and query: asking help for faster solution!!!

2016-11-15 Thread Azzurra Lentini
Dear Claas
yes thanks a lot.. it is working.

and thanks to all for the answers.

Azzu

2016-11-15 22:12 GMT+01:00 Claas Leiner :

>
> You can do ist with:
>
> --
> case
> when “DESCRIPTION” = 'sample1' then 1
> when “DESCRIPTION” = 'sample2' then 2
> ...
> when “DESCRIPTION” = 'sample25' then 25
> end
> --
> Claas
>
>
> Am 15.11.2016 um 21:51 schrieb Azzurra Lentini:
>
>> Dear all,
>>
>> I have an attribute table (associated to a shape file).
>>
>> One of the field  is a string type field and his name is “DESCRIPTION” ,
>> I need this field as an  INT number.
>>
>> The field “description” is formed by 25 different samples and around 350
>> records (so for every sample there are different records with the same
>> description).
>>
>> SO I create a new field “descriptionINT” and I would like to fill the
>> field with 25 numbers (1, 2, 3, 25) associated to the 25 different
>> sample and 350 records.
>>
>> How I can do?
>>
>> Till now, I was first selecting the records related to the first sample
>> and I was giving the number, for example 1 (with field calculator) to
>> all the records related to the same sample.
>>
>> But I am doing this one by one.. that means every time a do a new
>> selection and I give a new number with field calculator.
>>
>> Do you know a faster way (query)  to do this ?
>>
>>
>> ​thanks A.L. ​
>>
>> --
>> Dr. Hydrogeologist
>> AZZURRA LENTINI
>> Expert of evaluation environmental hazards
>> GIS application
>> Haity Mobile Tel: 0050946057393
>> ++
>> Italy Mobile Tel.: **(39) 338 24 40 676
>> ++
>> SKYPE azzurrahydro
>> ++
>> azzurralent...@gmail.com 
>> ++
>> *Par respect pour l'environnement,*
>>
>> *n'imprimez ce mail qu'en cas d'absolue nécessité*
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> 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
>>
>>
>
> --
> -
> GKG-Kassel - Dr.-Ing. Claas Leiner
> QGIS-Support und mehr
>
> Geodatenservice, Kartenwerkstatt &
> GIS-Schule Kassel
>
> Wilhelmshöher Allee 304 E
> 34131 Kassel
> Tel. 0561/56013445
> claas.lei...@gkg-kassel.de
> 
> http://www.gkg-kassel.de
> 
> Unterstützen Sie QGIS
> QGIS-DE e.V. | http://qgis.de
> QGIS Projekt | http://qgis.org/de/site/
> ___
> 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




-- 
Dr. Hydrogeologist
AZZURRA LENTINI
Expert of evaluation environmental hazards
GIS application
Haity Mobile Tel: 0050946057393
++
Italy Mobile Tel.: **(39) 338 24 40 676
++
SKYPE azzurrahydro
++
azzurralent...@gmail.com
++
*Par respect pour l'environnement,*

*n'imprimez ce mail qu'en cas d'absolue nécessité*
___
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] different buffer for the same field

2016-11-15 Thread Azzurra Lentini
Dear all,

I have a shape file with a field called “type”.  In the “type”  field I
have 4 kinds of samples ( 19 records).

See in the attachment.

The 4 samples are: normal fault, inverse fault, overthrust, syncline.

I would like to create a buffer with different distance for each sample
(the best it would be to obtain a shape with 5 different buffer distances).

For example  the buffer distance for the sample “ normal fault” is 30 m,
for the “inverse fault “ is 20 m, for the “overthrust” is 50 m and for the
“syncline” is 20 m.



How I can do this kind of buffer??



Thanks A.L.



-- 
Dr. Hydrogeologist
AZZURRA LENTINI
Expert of evaluation environmental hazards
GIS application
Haity Mobile Tel: 0050946057393
++
Italy Mobile Tel.: **(39) 338 24 40 676
++
SKYPE azzurrahydro
++
azzurralent...@gmail.com
++
*Par respect pour l'environnement,*

*n'imprimez ce mail qu'en cas d'absolue nécessité*


typeOfFaults.pdf
Description: Adobe PDF document
___
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] MapInfo to QGIS style generator ; error message

2016-11-15 Thread dandrigo
Good morning,

I'm working on windows 10 with mapinfo 16, qgis 2.16.3.

I tried to use the usefull following plugin called "MapInfo to QGIS style
generator":

https://github.com/NathanW2/MapInfo-to-QGIS-style-generator/wiki/Using-MapInfo-to-QGIS-style-generator.

But when i launch this following command via osgeo4w shell :

python mapinfoToQgis.py F:\temp\commerces.TAB F:\temp\out.qml -c
ID_SYMBOLOGIE --UseMapInfo

An error message appears. I send you the attachment showing the error
message.


 

Could you throw light for me regarding the meaning of the error message and
could youhow to help me in order to find a solution?

In advance, thank you very much.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/MapInfo-to-QGIS-style-generator-error-message-tp5295947.html
Sent from the Quantum GIS - User mailing list archive at Nabble.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] Points from lines Raster parameter

2016-11-15 Thread G. Allegri
I was looking into the "Generate points (pixel centroids) along line"
Processing (QGIS) algorithm., and the similar one for polygons.
Both require a raster input. Digging into the code I can't understand wats'
the purpose of that param. it seems it's used only to reproject from pixel
to map space. Why?

Giovanni

[1]
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PointsFromLines.py
___
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-it-user] compilazione attributi in base a regole e direzione flussi

2016-11-15 Thread ugi
Buongiorno a tutti

avrei un quesito se qualcuno può aiutarmi, dovrei compilare in modo
automatico o quasi alcuni campi, di tratte sostiuite con nuove geometrie.

Ho una rete formata da due layer, uno di punti e uno di linee, ogni
geometria lineare all'estremità tocca una geometria puntuale.

Nei due layer esistono due campi STA (che vorrebe significare start
partenza) e END (fine) con codici numerici, questi codici servirebbero o
sarebbero serviti in passato a fare analisi di rete. Ovvero esite un campo
numerico che identifica la partenza e la fine e segue la direzione della
linea. Ovvero avremo un nodo di partenza che avrà un campo STA vuoto e un
campo END. La linea che parte da quel punto avra il campo STA che prende il
numero del campo END del nodo e avrà un campo END con nuovo numero, il nodo
successivo prenderà il campo END dalla linea e lo avrà come campo STA e
avanti così.  In caso che più linee si vanno ad unire in un unico punto,
allora il campo END per tutte le linee sarà uguale e il campo STA del punto
di intersezione dovrà avere quel valore di END.

Nello scrrenshot ho etichettato i campi STA in nero e END in rosso .
 
 


Vorrei evitare di compilare tutto manualmente visto il numero degli elementi
da modificare e purtroppo di questo campo i committenti non vogliono
rinunciare.

Lo sò è un bel casino, se qualcuno sà come affrontare il problema, posso
allegare gli shape.

Grazie
Ugi



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/compilazione-attributi-in-base-a-regole-e-direzione-flussi-tp5295827.html
Sent from the QGIS Italian User mailing list archive at Nabble.com.
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] compilazione attributi in base a regole e direzione flussi

2016-11-15 Thread Marco Grisolia
Ciao,
ammetto di non aver capito il problema: devi aggiornare campi già
esistenti o riempire i campi di tratte nuove con lo stesso criterio
adottato per tratte vecchie? La descrizione che hai fatto mi ha un po'
confuso, ma credo che si possa risolvere scorrendo i due layer e
andando ad annidare un po' di cicli if.
Per favore potresti allegare gli shape di partenza (anche in parte,
giusto per avere un'idea) e un esempio di shape di arrivo (dove fai
vedere quale sia il risultato che si vuole ottenere partendo dagli
shape di partenza)? Grazie.
Marco

Il 15 novembre 2016 12:34, ugi  ha scritto:
> Buongiorno a tutti
>
> avrei un quesito se qualcuno può aiutarmi, dovrei compilare in modo
> automatico o quasi alcuni campi, di tratte sostiuite con nuove geometrie.
>
> Ho una rete formata da due layer, uno di punti e uno di linee, ogni
> geometria lineare all'estremità tocca una geometria puntuale.
>
> Nei due layer esistono due campi STA (che vorrebe significare start
> partenza) e END (fine) con codici numerici, questi codici servirebbero o
> sarebbero serviti in passato a fare analisi di rete. Ovvero esite un campo
> numerico che identifica la partenza e la fine e segue la direzione della
> linea. Ovvero avremo un nodo di partenza che avrà un campo STA vuoto e un
> campo END. La linea che parte da quel punto avra il campo STA che prende il
> numero del campo END del nodo e avrà un campo END con nuovo numero, il nodo
> successivo prenderà il campo END dalla linea e lo avrà come campo STA e
> avanti così.  In caso che più linee si vanno ad unire in un unico punto,
> allora il campo END per tutte le linee sarà uguale e il campo STA del punto
> di intersezione dovrà avere quel valore di END.
>
> Nello scrrenshot ho etichettato i campi STA in nero e END in rosso .
> 
> 
>
>
> Vorrei evitare di compilare tutto manualmente visto il numero degli elementi
> da modificare e purtroppo di questo campo i committenti non vogliono
> rinunciare.
>
> Lo sò è un bel casino, se qualcuno sà come affrontare il problema, posso
> allegare gli shape.
>
> Grazie
> Ugi
>
>
>
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/compilazione-attributi-in-base-a-regole-e-direzione-flussi-tp5295827.html
> Sent from the QGIS Italian User mailing list archive at Nabble.com.
> ___
> QGIS-it-user mailing list
> QGIS-it-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-it-user
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] compilazione attributi in base a regole e direzione flussi

2016-11-15 Thread Giuliano Curti
On 11/15/16, ugi  wrote:
> Buongiorno a tutti

buongiorno,

> ..
> Nei due layer esistono due campi STA (che vorrebe significare start
> partenza) e END (fine) con codici numerici, questi codici servirebbero o
> sarebbero serviti in passato a fare analisi di rete.

vuoi costruire una lista linkata di geometrie, ok?

> .
> Vorrei evitare di compilare tutto manualmente visto il numero degli elementi
> da modificare e purtroppo di questo campo i committenti non vogliono
> rinunciare.

in modo automatico, cioè con strumenti nativi di QGIS non saprei (e
certo vale la pena di approfondire), ma con un piccolo script python
non dovrebbe essere difficile testare le estremità di inizio e di fine
della polyline con le altre e registrare le linee interessate;
forse dovrai avere cura di trattare il senso di percorrenza delle
linee e/o anche intersezioni a più di due linee;


> Grazie
> Ugi

ciao,
giuliano
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] MapInfo to QGIS style generator ; error message

2016-11-15 Thread Nicolas Cadieux
Hi,

I have not used this in a while now but the first step, if I remember is to 
export the object style from the .tab into a new field.  
This is done in Mapinfo.  Have you done this step?

Nicolas


> Le 15 nov. 2016 à 19:37, dandrigo [via OSGeo.org] 
>  a écrit :
> 
> Good morning, 
> 
> I'm working on windows 10 with mapinfo 16, qgis 2.16.3. 
> 
> I tried to use the usefull following plugin called "MapInfo to QGIS style 
> generator": 
> 
> https://github.com/NathanW2/MapInfo-to-QGIS-style-generator/wiki/Using-MapInfo-to-QGIS-style-generator.
>  
> 
> But when i launch this following command via osgeo4w shell : 
> 
> python mapinfoToQgis.py F:\temp\commerces.TAB F:\temp\out.qml -c 
> ID_SYMBOLOGIE --UseMapInfo 
> 
> An error message appears. I send you the attachment showing the error 
> message. 
> 
> 
> 
> Could you throw light for me regarding the meaning of the error message and 
> could youhow to help me in order to find a solution? 
> 
> In advance, thank you very much. 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://osgeo-org.1560.x6.nabble.com/MapInfo-to-QGIS-style-generator-error-message-tp5295947.html
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User, click here.
> NAML




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/MapInfo-to-QGIS-style-generator-error-message-tp5295947p5295949.html
Sent from the Quantum GIS - User mailing list archive at Nabble.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