Re: [Qgis-user] minidump after running script

2017-10-20 Per discussione Nyall Dawson
On 20 October 2017 at 18:30, Luigi Pirelli  wrote:
> probably the problem is the facto that you use:
> https://qgis.org/api/2.18/classQgsFeature.html#ab0a934a1b173ce5ad8d13363c20ef3c8
> without cloning geometry... and then you remove the layer => the
> geometry pointer is no more valid.
>
> try to do
> geom = QgsGeometry( feature.geometry() )
> or better
> geom = QgsGeometry( feature.constGeometry() )


Just for future reference - this applies to 2.x only. In 3.0 it's safe
to use the original code and you don't need to make these copies.

Nyall


> Luigi Pirelli
>
> **
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * 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
> **
>
>
> On 20 October 2017 at 10:08, Reginald  
> wrote:
>> Hi,
>>
>> I am trying to make a report by using a script.
>> The script looks as follows:
>>
>> from qgis.PyQt.QtCore import *
>> from qgis.PyQt.QtGui import *
>> from qgis.PyQt.QtWidgets import *
>> import processing
>> # selectiepolygoon layer contains one multipolygone
>> layer=None
>> for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
>> if lyr.name() == "selectiepolygoon":
>> layer = lyr
>> break
>>
>> # Get the first feature from the layer
>> feature = layer.getFeatures().next()
>> # fetch geometry
>> geom = feature.geometry()
>> # remove selectiepolygoon from legend
>> my_id = layer.id()
>> QgsMapLayerRegistry.instance().removeMapLayers(my_id)
>>
>> layers = iface.legendInterface().layers()
>>
>> for layer in layers:
>> layerType = layer.type()
>> if layerType == QgsMapLayer.VectorLayer:
>> for feature in layer.getFeatures():
>> if feature.geometry().intersects(geom):
>> attr =feature.attributes()
>> for att in attr:
>> print (att.value)
>>
>> When I run this script in my project it terminates with a minidump.
>> I suspect that the geom is empty at some point?
>> Any idea what is wrong with this script?
>>
>> Regards,
>>
>>
>>
>> --
>> 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
> ___
> 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] Rule based style - categorize- label

2017-10-20 Per discussione Lene Fischer
Thanks!
This worked fine - Almost done my job.



Lene Fischer
Associate Professor

University of Copenhagen
Department of Geoscience and Natural Resource Management
Forest and Landscape College
Nødebovej 77a
3480 Fredensborg
Denmark


MOB +45 40115084
l...@ign.ku.dk-Original Message-
From: Richard Duivenvoorde [mailto:rdmaili...@duif.net] 
Sent: 20. oktober 2017 12:35
To: Lene Fischer; Alexandre Neto; qgis-user
Subject: Re: [Qgis-user] Rule based style - categorize- label


tldr; FIRST create a categorized styling, then 'change' it to rules.

If you do a catagorized styling on the same data, you get indeed only the 
values. There it would maybe nice to show (somewhere) the attribute name also 
on which you categorize?

I think the rationale was that it would be nice to show some rule info in the 
Label of the style?

BUT: if you first use categorized styling (with the good labels), then go back 
to your styling dialog and select Rule-based, QGIS will 'morph'
the categories to styles BUT KEEP THE NICE LABELS \o/

Regards,

Richard Duivenvoorde

On 20-10-17 12:25, Lene Fischer wrote:
> OK - L- Then just hard work…. 72 elements * 3. Hope I´m spelling 
> correct ;-)
> 
> Regards
> 
>  
> 
>  
> 
> *Lene Fischer*
> 
> Lektor
> 
>  
> 
> *Københavns Universitet*
> 
> Institut for Geovidenskab og Naturforvaltning
> 
>  
> 
> SKOVSKOLEN
> 
> Nødebovej 77a
> 
> 3480 Fredensborg
> 
>  
> 
> DIR 40115084
> 
> _...@ign.ku.dk_ 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> *From:*Alexandre Neto [mailto:senhor.n...@gmail.com]
> *Sent:* 20. oktober 2017 12:02
> *To:* Lene Fischer; qgis-user
> *Subject:* Re: [Qgis-user] Rule based style - categorize- label
> 
>  
> 
> Hello Lene,
> 
>  
> 
> I am not sure you can avoid the manual editing task, unless you run a 
> python script.
> 
>  
> 
> Alexandre Neto
> 
>  
> 
> Lene Fischer > escreveu no dia 
> sexta, 20/10/2017 às 10:53:
> 
> Hi,
> 
> I´m trying to organize data in groups by making a rule based
> styling. In the style I create a rule and then categorize. All fine.
> 
> But my problem is the label. Initially the label looks fine when I
> click Classify. But when I click OK the rule is viewed in the label
> field, and I have to do a typing manually :-O
> 
>  
> 
> I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to
> show the problem.
> 
>  
> 
> Any suggestion.
> 
>  
> 
> Regards
> 
>  
> 
>  
> 
> *Lene Fischer*
> 
> Associate Professor
> 
>  
> 
> *University of Copenhagen*
> 
> Department of Geoscience and Natural Resource Management
> 
> Forest and Landscape College
> 
> Nødebovej 77a
> 
> 3480 Fredensborg
> 
> Denmark
> 
>  
> 
>  
> 
> MOB +45 40115084 
> 
> l...@ign.ku.dk 
> 
>  
> 
>  
> 
>  
> 
> ___
> 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
> 
> --
> 
> Alexandre Neto
> 
> -
> 
> @AlexNetoGeo
> 
> http://sigsemgrilhetas.wordpress.com
> 
> http://gisunchained.wordpress.com
> 
> 
> 
> ___
> 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-it-user] Sondaggio per il nuovo logo minimal QGIS Italia

2017-10-20 Per discussione Totò Fiandaca
Salva a tutti,
Come da precedenti mail,
ho aperto una chiamata, per le proposte sul nuovo logo, che è terminata
oggi.

Le proposte sono riassunte qui [1], sono sei e sono tutte rispondenti alle
specifiche [2] .

Ho creato un sondaggio, siete tutti invitati a votare qui

[3],
sarà fatto un post sulla pagina Facebook di *QGIS Italia
* [4] dove si inviterà a iscriversi a
questa ML per poter partecipare al voto.

questa chiamata al voto durerà fino a venerdì 27/10/2017 ore 12:00

Alla fine del sondaggio e definito il logo, saranno prodotte le
configurazioni del nuovo logo (green, black e white; 128, 64 e 32 px) e
saranno messe a disposizione di tutti in un repository;
quindi saranno sostituiti i loghi nella pagina facebook e nel sito
http://qgis.it/

Saluti

[0] https://github.com/pigreco/logo_QGIS_3ITA
[1] https://github.com/pigreco/logo_QGIS_3ITA/wiki/Proposte
[2] https://github.com/pigreco/logo_QGIS_3ITA/wiki
[3] https://docs.google.com/forms/d/e/1FAIpQLSfATZsCO15Pfm_3YESmwLCzPoMjFV-
djDTSTgTmeNgdAOOO4A/viewform
[4] https://www.facebook.com/qgis.it/

-- 
*Ing. Salvatore Fiandaca*
*mobile*.:+39 327.493.8955
*m*: *pigrecoinfin...@gmail.com *
*C.F*.: FNDSVT71E29Z103G
*P.IVA*: 06597870820
*blog:*
* https://pigrecoinfinito.wordpress.com/
 FB: Co-admin
- https://www.facebook.com/qgis.it/ **
 *
*FB: moderatore - **https://www.facebook.com/groups/GisItalia/
**
 *
*TW:  **https://twitter.com/totofiandaca
*

43°51'0.54"N  10°34'27.62"E - EPSG:4326

“Se la conoscenza deve essere aperta a tutti,
perchè mai limitarne l’accesso?”
R. Stallman

Questo documento, allegati inclusi, contiene informazioni di proprietà di
FIANDACA SALVATORE e deve essere utilizzato esclusivamente dal destinatario
in relazione alle finalità per le quali è stato ricevuto. E' vietata
qualsiasi forma di riproduzione o divulgazione senza l'esplicito consenso
di FIANDACA SALVATORE. Qualora fosse stato ricevuto per errore si prega di
informare tempestivamente il mittente e distruggere la copia in proprio
possesso.
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


[Qgis-user] running qgis Docker container on Mac?

2017-10-20 Per discussione Lynnes, Christopher S. (GSFC-5860)
Has anyone gotten the latest qgis/qgis Docker container to work on Mac?

I'm on a MacBook Air running 10.11.6. I am running Docker  17.09.0-ce.  I have 
been trying to get QGIS installed on my machine (without having to muck around 
with my Qt dirs), so I tried the containerized route.  I downloaded qgis/qgis 
from hub.docker.com.  When I run it, though, I get an immediate exit:

> > docker run qgis/qgis
> > /bin/sh: 1: /root/QGIS/.ci/travis/linux/docker-build-test.sh: not found
> > echo $?
> > 127

Inspecting the container, I see the offending command:
> "Cmd": [
> "/bin/sh",
> "-c",
> "/root/QGIS/.ci/travis/linux/docker-build-test.sh"
> ],

Then looking at the QGIS master branch’s Dockerfile, 
https://issues.qgis.org/projects/qgis/repository/revisions/master/entry/.docker/Dockerfile

I see it again at the bottom.  

I tried submitting a bug report, but it was rejected as not being a QGIS 
problem.

Any suggestions on how to proceed?
—
Christopher Lynnes   NASA/GSFC301-614-5185
""Perfection is achieved, not when there is nothing more to add, but when there 
is nothing left to take away.”  A. de St. Exupery



___
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] NTV2 Grid Shits

2017-10-20 Per discussione Andre Joost

Am 20.10.2017 um 14:31 schrieb Tyler Veinot:

Anyone knowledge in using grid shift files (gsb) with QGIS?
I have a local CRS NAD27 Double Stereographic Imperial that I need to
transform to NAD83 CSRS 2010 Epoch. I have the CRS properly defined using
the provincial description


Can you add your custom CRS? Maybe you have +datum=nad27 which uses the 
main nadcon transformation file. use +ellps=clrk66 
+nadgrids=/path/to/your/file


 but QGIS using its Clark 1866 to GRS80

transformation puts the points a little off from the NTV2 coordinate
transformation software we have. I have the GSB used (even though it says
ATS77 the provincial geomatics guys tell me it shits NAD27 and ATS77 into
CSRS 2010 NAD83). I followed some directions on putting the file in a
specific folder and restarted QGIS set the settings to always ask for grid
shift file for transformations yet I do not see the one I put in there in
my list to pick from.


Can you explain where that setting should be?



I also tried to install a plugin for NTV2 transformations but cannot
activate it. When I go to Activate Additional Providers in my Processing
Toolbox where NTv2 Datum Transformations resides I get the "Specified Path
does not exist: C:\PROGA~1\QGIS~1.18\bin" error that I have not yet managed
to resolve. To my understanding has something to do with GRASS plugins and
past versions of QGIS.


You can workaround that GRASS error by creating that folder, or changing 
the folder entry for GRASS 7 to an existing folder.
But to use your grid in the plugin, you would need some python code 
around it, like the other grids have in 
C:\Users\\.qgis2\python\plugins\ntv2_transformations

Without that processing would not know about your grid.

HTH,
André Joost


___
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-it-user] problema installazione QGIS (osgeo4w 32 bit) Windows 10

2017-10-20 Per discussione Gabriela Osaci Costache
Grazie mille, Totò!
Farò come dici sul portatile con Bitdefender. E' strano il comportamento, 
perché fino ad ieri sera facevo quasi ogni giorno un aggiornamento di QGIS e 
funzionava tutto.
Ma c'è anche il portatile (infatti un tablet di 8,9'') senza Bitdefender e su 
questo osgeo4w non riesce a scaricare tutto, dunque non si installa il 
programma :-( 
Grazie mille,Gabriela

  Da: Totò 
 A: qgis-it-user@lists.osgeo.org 
 Inviato: Venerdì 20 Ottobre 2017 19:08
 Oggetto: Re: [QGIS-it-user] problema installazione QGIS (osgeo4w 32 bit) 
Windows 10
   
Gabriela Osaci Costache wrote
> Capita soltanto a me?

Ciao,
io uso OSGeo4W64 in win 10 64 bit, mai avuto problemi!!!
è fondamentale disattivare antivirus (usiamo lo stesso ;-) ) cioè disattiva
firewall prima dell'installazione oppure, successivamente, devi creare delle
regole sui firewall che ti permettano di avviare gli eseguibili.

saluti



-
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


   ___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] problema installazione QGIS (osgeo4w 32 bit) Windows 10

2017-10-20 Per discussione Totò
Gabriela Osaci Costache wrote
> Capita soltanto a me?

Ciao,
io uso OSGeo4W64 in win 10 64 bit, mai avuto problemi!!!
è fondamentale disattivare antivirus (usiamo lo stesso ;-) ) cioè disattiva
firewall prima dell'installazione oppure, successivamente, devi creare delle
regole sui firewall che ti permettano di avviare gli eseguibili.

saluti



-
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] Qgis3 - il tridimensionale e rendering

2017-10-20 Per discussione Totò
skampus wrote
> ciao a tutt@,
> 
> mi potreste aiutare con la traduzione delle seguenti stringhe appena
> inserite nella 2.99 e relative al 3D?
> 
> Altitude Clamping
> Altitude Binding
> 
> grazie mille
> 
> s.

Forse ti sarà di aiuto se conosci le varie opzioni:
Altitude Clamping: opzioni possibili (absolute, Relative, Terrain)
Altitude Binding: opzioni possibili (Vertex, Centroid)





-
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [QGIS-it-user] Qgis3 - il tridimensionale e rendering

2017-10-20 Per discussione skampus
ciao a tutt@,

mi potreste aiutare con la traduzione delle seguenti stringhe appena
inserite nella 2.99 e relative al 3D?

Altitude Clamping
Altitude Binding

grazie mille

s.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


[Qgis-user] NTV2 Grid Shits

2017-10-20 Per discussione Tyler Veinot
Anyone knowledge in using grid shift files (gsb) with QGIS?
I have a local CRS NAD27 Double Stereographic Imperial that I need to
transform to NAD83 CSRS 2010 Epoch. I have the CRS properly defined using
the provincial description but QGIS using its Clark 1866 to GRS80
transformation puts the points a little off from the NTV2 coordinate
transformation software we have. I have the GSB used (even though it says
ATS77 the provincial geomatics guys tell me it shits NAD27 and ATS77 into
CSRS 2010 NAD83). I followed some directions on putting the file in a
specific folder and restarted QGIS set the settings to always ask for grid
shift file for transformations yet I do not see the one I put in there in
my list to pick from.
I also tried to install a plugin for NTV2 transformations but cannot
activate it. When I go to Activate Additional Providers in my Processing
Toolbox where NTv2 Datum Transformations resides I get the "Specified Path
does not exist: C:\PROGA~1\QGIS~1.18\bin" error that I have not yet managed
to resolve. To my understanding has something to do with GRASS plugins and
past versions of QGIS.
Anyway; I have the GSB, how do I get QGIS to use it?
Thanks
Tyler
___
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] lineaments extraction with QGIS

2017-10-20 Per discussione Fernando M. Roxo da Motta
On Fri, 20 Oct 2017 10:08:58 +0200, jean Lukusa 
wrote:


> hello every one ! would you  give me guidelines  about how to extract
> lineaments  using QGIS through satellites  images.

  Hi,

  Perhaps you can get some hint from this page:

Construction of geological cross sections in QGIS
http://www.geokincern.com/?p=1452



  Roxo

-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
  ( Usuário Linux registrado #39505 )   | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
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] Rule based style - categorize- label

2017-10-20 Per discussione Lene Fischer
Hi,
I´m trying to organize data in groups by making a rule based styling. In the 
style I create a rule and then categorize. All fine.
But my problem is the label. Initially the label looks fine when I click 
Classify. But when I click OK the rule is viewed in the label field, and I have 
to do a typing manually :-O

I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to shoe the 
problem.

Any suggestion.

Regards


Lene Fischer
Associate Professor

University of Copenhagen
Department of Geoscience and Natural Resource Management
Forest and Landscape College
Nødebovej 77a
3480 Fredensborg
Denmark


MOB +45 40115084
l...@ign.ku.dk



___
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] Rule based style - categorize- label

2017-10-20 Per discussione Richard Duivenvoorde
On 20-10-17 12:46, DelazJ wrote:
> Hi Lene,
> May be you could file a feature request (won't help you yet :( ). Given
> that this classification is an automated process (based on equality), it
> may be possible to return a valid label that is different from the class
> rule (and i guess it'll be helpful for legend).

IF you do, maybe then make it optional, with a checkbox 'use only value
as Label' or so?
Because I think seeing the full rule can also be very informative?

Regards,

Richard Duivenvoorde
___
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] Rule based style - categorize- label

2017-10-20 Per discussione DelazJ
Hi Lene,
May be you could file a feature request (won't help you yet :( ). Given
that this classification is an automated process (based on equality), it
may be possible to return a valid label that is different from the class
rule (and i guess it'll be helpful for legend).

Regards,
Harrissou

2017-10-20 12:25 GMT+02:00 Lene Fischer :

> OK - L - Then just hard work…. 72 elements * 3. Hope I´m spelling correct
> ;-)
>
> Regards
>
>
>
>
>
> *Lene Fischer*
>
> Lektor
>
>
>
> *Københavns Universitet*
>
> Institut for Geovidenskab og Naturforvaltning
>
>
>
> SKOVSKOLEN
>
> Nødebovej 77a
>
> 3480 Fredensborg
>
>
>
> DIR 40115084
>
> *l...@ign.ku.dk* 
>
>
>
>
>
>
>
>
>
> *From:* Alexandre Neto [mailto:senhor.n...@gmail.com]
> *Sent:* 20. oktober 2017 12:02
> *To:* Lene Fischer; qgis-user
> *Subject:* Re: [Qgis-user] Rule based style - categorize- label
>
>
>
> Hello Lene,
>
>
>
> I am not sure you can avoid the manual editing task, unless you run a
> python script.
>
>
>
> Alexandre Neto
>
>
>
> Lene Fischer  escreveu no dia sexta, 20/10/2017 às 10:53:
>
> Hi,
>
> I´m trying to organize data in groups by making a rule based styling. In
> the style I create a rule and then categorize. All fine.
>
> But my problem is the label. Initially the label looks fine when I click
> Classify. But when I click OK the rule is viewed in the label field, and I
> have to do a typing manually :-O
>
>
>
> I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to show
> the problem.
>
>
>
> Any suggestion.
>
>
>
> Regards
>
>
>
>
>
> *Lene Fischer*
>
> Associate Professor
>
>
>
> *University of Copenhagen*
>
> Department of Geoscience and Natural Resource Management
>
> Forest and Landscape College
>
> Nødebovej 77a
>
> 3480 Fredensborg
>
> Denmark
>
>
>
>
>
> MOB +45 40115084 <+45%2040%2011%2050%2084>
>
> l...@ign.ku.dk
>
>
>
>
>
>
>
> ___
> 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
>
> --
>
> Alexandre Neto
>
> -
>
> @AlexNetoGeo
>
> http://sigsemgrilhetas.wordpress.com
>
> http://gisunchained.wordpress.com
>
> ___
> 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] Rule based style - categorize- label

2017-10-20 Per discussione Alexandre Neto
Ah! great hint!

Richard Duivenvoorde  escreveu no dia sexta,
20/10/2017 às 11:35:

>
> tldr; FIRST create a categorized styling, then 'change' it to rules.
>
> If you do a catagorized styling on the same data, you get indeed only
> the values. There it would maybe nice to show (somewhere) the attribute
> name also on which you categorize?
>
> I think the rationale was that it would be nice to show some rule info
> in the Label of the style?
>
> BUT: if you first use categorized styling (with the good labels), then
> go back to your styling dialog and select Rule-based, QGIS will 'morph'
> the categories to styles BUT KEEP THE NICE LABELS \o/
>
> Regards,
>
> Richard Duivenvoorde
>
> On 20-10-17 12:25, Lene Fischer wrote:
> > OK - L- Then just hard work…. 72 elements * 3. Hope I´m spelling correct
> ;-)
> >
> > Regards
> >
> >
> >
> >
> >
> > *Lene Fischer*
> >
> > Lektor
> >
> >
> >
> > *Københavns Universitet*
> >
> > Institut for Geovidenskab og Naturforvaltning
> >
> >
> >
> > SKOVSKOLEN
> >
> > Nødebovej 77a
> >
> > 3480 Fredensborg
> >
> >
> >
> > DIR 40115084
> >
> > _...@ign.ku.dk_ 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *From:*Alexandre Neto [mailto:senhor.n...@gmail.com]
> > *Sent:* 20. oktober 2017 12:02
> > *To:* Lene Fischer; qgis-user
> > *Subject:* Re: [Qgis-user] Rule based style - categorize- label
> >
> >
> >
> > Hello Lene,
> >
> >
> >
> > I am not sure you can avoid the manual editing task, unless you run a
> > python script.
> >
> >
> >
> > Alexandre Neto
> >
> >
> >
> > Lene Fischer > escreveu no dia
> > sexta, 20/10/2017 às 10:53:
> >
> > Hi,
> >
> > I´m trying to organize data in groups by making a rule based
> > styling. In the style I create a rule and then categorize. All fine.
> >
> > But my problem is the label. Initially the label looks fine when I
> > click Classify. But when I click OK the rule is viewed in the label
> > field, and I have to do a typing manually :-O
> >
> >
> >
> > I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to
> > show the problem.
> >
> >
> >
> > Any suggestion.
> >
> >
> >
> > Regards
> >
> >
> >
> >
> >
> > *Lene Fischer*
> >
> > Associate Professor
> >
> >
> >
> > *University of Copenhagen*
> >
> > Department of Geoscience and Natural Resource Management
> >
> > Forest and Landscape College
> >
> > Nødebovej 77a
> >
> > 3480 Fredensborg
> >
> > Denmark
> >
> >
> >
> >
> >
> > MOB +45 40115084 <+45%2040%2011%2050%2084>
> 
> >
> > l...@ign.ku.dk 
> >
> >
> >
> >
> >
> >
> >
> > ___
> > 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
> >
> > --
> >
> > Alexandre Neto
> >
> > -
> >
> > @AlexNetoGeo
> >
> > http://sigsemgrilhetas.wordpress.com
> >
> > http://gisunchained.wordpress.com
> >
> >
> >
> > ___
> > 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
> >
>
> --
Alexandre Neto
-
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.com
___
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] Rule based style - categorize- label

2017-10-20 Per discussione Richard Duivenvoorde

tldr; FIRST create a categorized styling, then 'change' it to rules.

If you do a catagorized styling on the same data, you get indeed only
the values. There it would maybe nice to show (somewhere) the attribute
name also on which you categorize?

I think the rationale was that it would be nice to show some rule info
in the Label of the style?

BUT: if you first use categorized styling (with the good labels), then
go back to your styling dialog and select Rule-based, QGIS will 'morph'
the categories to styles BUT KEEP THE NICE LABELS \o/

Regards,

Richard Duivenvoorde

On 20-10-17 12:25, Lene Fischer wrote:
> OK - L- Then just hard work…. 72 elements * 3. Hope I´m spelling correct ;-)
> 
> Regards
> 
>  
> 
>  
> 
> *Lene Fischer*
> 
> Lektor
> 
>  
> 
> *Københavns Universitet*
> 
> Institut for Geovidenskab og Naturforvaltning
> 
>  
> 
> SKOVSKOLEN
> 
> Nødebovej 77a
> 
> 3480 Fredensborg
> 
>  
> 
> DIR 40115084
> 
> _...@ign.ku.dk_ 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> *From:*Alexandre Neto [mailto:senhor.n...@gmail.com]
> *Sent:* 20. oktober 2017 12:02
> *To:* Lene Fischer; qgis-user
> *Subject:* Re: [Qgis-user] Rule based style - categorize- label
> 
>  
> 
> Hello Lene,
> 
>  
> 
> I am not sure you can avoid the manual editing task, unless you run a
> python script.
> 
>  
> 
> Alexandre Neto
> 
>  
> 
> Lene Fischer > escreveu no dia
> sexta, 20/10/2017 às 10:53:
> 
> Hi,
> 
> I´m trying to organize data in groups by making a rule based
> styling. In the style I create a rule and then categorize. All fine.
> 
> But my problem is the label. Initially the label looks fine when I
> click Classify. But when I click OK the rule is viewed in the label
> field, and I have to do a typing manually :-O
> 
>  
> 
> I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to
> show the problem.
> 
>  
> 
> Any suggestion.
> 
>  
> 
> Regards
> 
>  
> 
>  
> 
> *Lene Fischer*
> 
> Associate Professor
> 
>  
> 
> *University of Copenhagen*
> 
> Department of Geoscience and Natural Resource Management
> 
> Forest and Landscape College
> 
> Nødebovej 77a
> 
> 3480 Fredensborg
> 
> Denmark
> 
>  
> 
>  
> 
> MOB +45 40115084 
> 
> l...@ign.ku.dk 
> 
>  
> 
>  
> 
>  
> 
> ___
> 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
> 
> -- 
> 
> Alexandre Neto
> 
> -
> 
> @AlexNetoGeo
> 
> http://sigsemgrilhetas.wordpress.com
> 
> http://gisunchained.wordpress.com
> 
> 
> 
> ___
> 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] Rule based style - categorize- label

2017-10-20 Per discussione Lene Fischer
OK - ☹ - Then just hard work…. 72 elements * 3. Hope I´m spelling correct ;-)
Regards


Lene Fischer
Lektor

Københavns Universitet
Institut for Geovidenskab og Naturforvaltning

SKOVSKOLEN
Nødebovej 77a
3480 Fredensborg

DIR 40115084
l...@ign.ku.dk




From: Alexandre Neto [mailto:senhor.n...@gmail.com]
Sent: 20. oktober 2017 12:02
To: Lene Fischer; qgis-user
Subject: Re: [Qgis-user] Rule based style - categorize- label

Hello Lene,

I am not sure you can avoid the manual editing task, unless you run a python 
script.

Alexandre Neto

Lene Fischer > escreveu no dia sexta, 
20/10/2017 às 10:53:
Hi,
I´m trying to organize data in groups by making a rule based styling. In the 
style I create a rule and then categorize. All fine.
But my problem is the label. Initially the label looks fine when I click 
Classify. But when I click OK the rule is viewed in the label field, and I have 
to do a typing manually :-O

I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to show the 
problem.

Any suggestion.

Regards


Lene Fischer
Associate Professor

University of Copenhagen
Department of Geoscience and Natural Resource Management
Forest and Landscape College
Nødebovej 77a
3480 Fredensborg
Denmark


MOB +45 40115084
l...@ign.ku.dk



___
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
--
Alexandre Neto
-
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.com
___
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] Filter syntax for date fields

2017-10-20 Per discussione Alexandre Neto
Hi,

Vector Layer filtering SQL syntax is limited to the data provider. If you
are using a shapefile, then the provider is GDAL and you are limited to
this operands:


http://www.gdal.org/ogr_sql.html

If you used Geopackage or Spatialite or PostGIS you would probably have
more datetime specific operands that might work with your field.

Alexandre Neto

A sex, 20/10/2017, 03:30, Patrick Dunford 
escreveu:

> I have a shapefile table with 300,000 records of polygons that I want
> to filter for display on the map canvas. I want to use the field called
> "date" which is defined as a Qdate in the fields list in the
> shapefile's properties.
>
> The question is how to put in the filter string in the correct syntax
> to give me for example all the records that are for the calendar year
> of 1984.
>
> For example
>  year("date") = 1984
> will not work because it doesn't accept the year function from the list
> of functions that are available in other expression editors which allow
> a function list to be used.
>
> In a previous version of this table I had it was actually quite easy
> because the dates were input as a string and the like operator could be
> used. It seems with a date that is actually defined as a date field
> there is no obvious or easy way to input a range of dates (how do you
> put in a date constant) or use a function that will extract part of a
> date from a date field.
>
> ___
> 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

-- 
Alexandre Neto
-
@AlexNetoGeo
http://sigsemgrilhetas.wordpress.com
http://gisunchained.wordpress.com
___
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] Shortest path alorithm

2017-10-20 Per discussione Pat Hin

Hello

 

ok, thank you.

I will have a deeper look at it and come back with questions

if they will arise.

 

thank you

 

pat

 

Gesendet: Freitag, 20. Oktober 2017 um 11:42 Uhr
Von: "Alexander Bruy" 
An: "Pat Hin" 
Cc: "qgis-userlists.osgeo.org" 
Betreff: Re: [Qgis-user] Shortest path alorithm

Hi Pat,

there is a network analysis library in QGIS which provides shortest
path calcluation. Also you can use GDAL GNM, PgRouting, NetworkX
and many other tools.

2017-10-20 12:06 GMT+03:00 Pat Hin :
> Hello,
>
> i am going to implement in my own script the "shortest path algorithm
> (Dijkstra)".
> I have seen there are some plugins etc. already available but before jumping
> deeper
> in and re-develop something:
> Are there already some known packages by which i could "hand over" some
> link_id
> (minimum two, one for start and one for end) and which calculates the
> shortest path for?
>
> Thank you
> pat
>
> ___
> 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



--
Alexander Bruy



___
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] Rule based style - categorize- label

2017-10-20 Per discussione Lene Fischer
Hi,
I´m trying to organize data in groups by making a rule based styling. In the 
style I create a rule and then categorize. All fine.
But my problem is the label. Initially the label looks fine when I click 
Classify. But when I click OK the rule is viewed in the label field, and I have 
to do a typing manually :-O

I´ve made a small video https://www.screencast.com/t/Gwwd8S9l6 to show the 
problem.

Any suggestion.

Regards


Lene Fischer
Associate Professor

University of Copenhagen
Department of Geoscience and Natural Resource Management
Forest and Landscape College
Nødebovej 77a
3480 Fredensborg
Denmark


MOB +45 40115084
l...@ign.ku.dk



___
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] Shortest path alorithm

2017-10-20 Per discussione Alexander Bruy
Hi Pat,

there is a network analysis library in QGIS which provides shortest
path calcluation. Also you can use GDAL GNM, PgRouting, NetworkX
and many other tools.

2017-10-20 12:06 GMT+03:00 Pat Hin :
> Hello,
>
> i am going to implement in my own script the "shortest path algorithm
> (Dijkstra)".
> I have seen there are some plugins etc. already available but before jumping
> deeper
> in and re-develop something:
> Are there already some known packages by which i could "hand over" some
> link_id
> (minimum two, one for start and one for end) and which calculates the
> shortest path for?
>
> Thank you
> pat
>
> ___
> 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



-- 
Alexander Bruy
___
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] Filter syntax for date fields

2017-10-20 Per discussione Patrick Dunford
Probaly as a workaround right now it looks like for my scenario the
simplest q option is to extract the date into separate y/m/d fields
stored as integers and run the filter against these. 

On Fri, 2017-10-20 at 10:25 +0200, Luigi Pirelli wrote:
> This could be related with a similar proble reported in
> https://issues.qgis.org/issues/16657 assigned to 3ndis (Denis) that
> will work on that (master and 2.18) on November during bugfix period.
> The parse is done QDateTime and is hard to match the exact QDateTime
> format. If it match, than the value is correctly used, otherwise the
> current time is used.
> 
> probably we need a more general way to parte datetime shared with
> editor delegate and functions.
> 
> you can do a workaround adding your custom function that instruct
> QDate to parse only Y
> 
> Luigi Pirelli
> 
> *
> *
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT
> com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirel
> li
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> * https://www.packtpub.com/big-data-and-business-intelligence/masteri
> ng-qgis-second-edition
> *
> *
> 
> 
> On 20 October 2017 at 04:30, Patrick Dunford  > wrote:
> > I have a shapefile table with 300,000 records of polygons that I
> > want
> > to filter for display on the map canvas. I want to use the field
> > called
> > "date" which is defined as a Qdate in the fields list in the
> > shapefile's properties.
> > 
> > The question is how to put in the filter string in the correct
> > syntax
> > to give me for example all the records that are for the calendar
> > year
> > of 1984.
> > 
> > For example
> >  year("date") = 1984
> > will not work because it doesn't accept the year function from the
> > list
> > of functions that are available in other expression editors which
> > allow
> > a function list to be used.
> > 
> > In a previous version of this table I had it was actually quite
> > easy
> > because the dates were input as a string and the like operator
> > could be
> > used. It seems with a date that is actually defined as a date field
> > there is no obvious or easy way to input a range of dates (how do
> > you
> > put in a date constant) or use a function that will extract part of
> > a
> > date from a date field.
> > 
> > ___
> > 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] minidump after running script

2017-10-20 Per discussione Reginald
thanks for this solution.
My script now looks like this and works :-)

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
import processing

layer=None
for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
if lyr.name() == "selectiepolygoon":
layer = lyr
break

# Get the first feature from the layer
feature = layer.getFeatures().next()
# fetch geometry
geom = QgsGeometry(feature.constGeometry())
#request = QgsFeatureRequest()
#request.setFilterRect(geom)
my_id = layer.id()
QgsMapLayerRegistry.instance().removeMapLayers(my_id)

layers = iface.legendInterface().layers()

for layer in layers:
layerType = layer.type()
if layerType == QgsMapLayer.VectorLayer:
for feature in layer.getFeatures():
if feature.geometry().intersects(geom):
attrs = feature.attributes()
for att in attrs:
print (str(att))



--
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] Can't find the "Geometry Checker Plugin"

2017-10-20 Per discussione DelazJ
Hello to you too,
You need to enable it in the Plugin Manager as it's a Core plugin.

Regards,
Harrissou

2017-10-20 10:27 GMT+02:00 Elstermann, Mike :

> https://docs.qgis.org/2.14/en/docs/user_manual/plugins/
> plugins_geometry_checker.html
>
> http://plugins.qgis.org/plugins/plugins.xml
>
>
>
> Can‘ find it, where is it?
>
>
>
> THX!, mikeE.
>
>
>
>
>
> ___
> 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] minidump after running script

2017-10-20 Per discussione Luigi Pirelli
probably the problem is the facto that you use:
https://qgis.org/api/2.18/classQgsFeature.html#ab0a934a1b173ce5ad8d13363c20ef3c8
without cloning geometry... and then you remove the layer => the
geometry pointer is no more valid.

try to do
geom = QgsGeometry( feature.geometry() )
or better
geom = QgsGeometry( feature.constGeometry() )
Luigi Pirelli

**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* 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
**


On 20 October 2017 at 10:08, Reginald  wrote:
> Hi,
>
> I am trying to make a report by using a script.
> The script looks as follows:
>
> from qgis.PyQt.QtCore import *
> from qgis.PyQt.QtGui import *
> from qgis.PyQt.QtWidgets import *
> import processing
> # selectiepolygoon layer contains one multipolygone
> layer=None
> for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
> if lyr.name() == "selectiepolygoon":
> layer = lyr
> break
>
> # Get the first feature from the layer
> feature = layer.getFeatures().next()
> # fetch geometry
> geom = feature.geometry()
> # remove selectiepolygoon from legend
> my_id = layer.id()
> QgsMapLayerRegistry.instance().removeMapLayers(my_id)
>
> layers = iface.legendInterface().layers()
>
> for layer in layers:
> layerType = layer.type()
> if layerType == QgsMapLayer.VectorLayer:
> for feature in layer.getFeatures():
> if feature.geometry().intersects(geom):
> attr =feature.attributes()
> for att in attr:
> print (att.value)
>
> When I run this script in my project it terminates with a minidump.
> I suspect that the geom is empty at some point?
> Any idea what is wrong with this script?
>
> Regards,
>
>
>
> --
> 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
___
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] lineaments extraction with QGIS

2017-10-20 Per discussione Hernán De Angelis
Jean,

As far as I understand there is no specific tool for this in QGIS. You
could try to edge detection with the GRASS module i.zc and see what results
you get, which might require interpretation and manual digitization. More
advanced or automatized processing will fall within the realm of pattern
recognition, and will require the application of algorithms (there are
examples the remote sensing literature for this).

Good luck!

/H.


On Fri, Oct 20, 2017 at 10:08 AM, jean Lukusa  wrote:

> hello every one ! would you  give me guidelines  about how to extract
> lineaments  using QGIS through satellites  images.
> ___
> 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] Can't find the "Geometry Checker Plugin"

2017-10-20 Per discussione Elstermann, Mike
https://docs.qgis.org/2.14/en/docs/user_manual/plugins/plugins_geometry_checker.html
http://plugins.qgis.org/plugins/plugins.xml

Can' find it, where is it?

THX!, mikeE.


___
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] Filter syntax for date fields

2017-10-20 Per discussione Luigi Pirelli
This could be related with a similar proble reported in
https://issues.qgis.org/issues/16657 assigned to 3ndis (Denis) that
will work on that (master and 2.18) on November during bugfix period.
The parse is done QDateTime and is hard to match the exact QDateTime
format. If it match, than the value is correctly used, otherwise the
current time is used.

probably we need a more general way to parte datetime shared with
editor delegate and functions.

you can do a workaround adding your custom function that instruct
QDate to parse only Y

Luigi Pirelli

**
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* 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
**


On 20 October 2017 at 04:30, Patrick Dunford  wrote:
> I have a shapefile table with 300,000 records of polygons that I want
> to filter for display on the map canvas. I want to use the field called
> "date" which is defined as a Qdate in the fields list in the
> shapefile's properties.
>
> The question is how to put in the filter string in the correct syntax
> to give me for example all the records that are for the calendar year
> of 1984.
>
> For example
>  year("date") = 1984
> will not work because it doesn't accept the year function from the list
> of functions that are available in other expression editors which allow
> a function list to be used.
>
> In a previous version of this table I had it was actually quite easy
> because the dates were input as a string and the like operator could be
> used. It seems with a date that is actually defined as a date field
> there is no obvious or easy way to input a range of dates (how do you
> put in a date constant) or use a function that will extract part of a
> date from a date field.
>
> ___
> 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] lineaments extraction with QGIS

2017-10-20 Per discussione jean Lukusa
hello every one ! would you  give me guidelines  about how to extract
lineaments  using QGIS through satellites  images.
___
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] minidump after running script

2017-10-20 Per discussione Reginald
Hi,

I am trying to make a report by using a script.
The script looks as follows:

from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
import processing
# selectiepolygoon layer contains one multipolygone
layer=None
for lyr in QgsMapLayerRegistry.instance().mapLayers().values():
if lyr.name() == "selectiepolygoon":
layer = lyr
break

# Get the first feature from the layer
feature = layer.getFeatures().next()
# fetch geometry
geom = feature.geometry()
# remove selectiepolygoon from legend
my_id = layer.id()
QgsMapLayerRegistry.instance().removeMapLayers(my_id)

layers = iface.legendInterface().layers()

for layer in layers:
layerType = layer.type()
if layerType == QgsMapLayer.VectorLayer:
for feature in layer.getFeatures():
if feature.geometry().intersects(geom):
attr =feature.attributes()
for att in attr:
print (att.value)

When I run this script in my project it terminates with a minidump.
I suspect that the geom is empty at some point?
Any idea what is wrong with this script?

Regards,



--
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] Select QGSFeature with given ID

2017-10-20 Per discussione Pat Hin
Hello Etienne,

 

wonderful. 

A lot of great tipps at least to review own code.

I have seen it before and the method .setSubsetOfAttributes has

saved me minutes of calculation times :)

 

pat

 

Gesendet: Freitag, 20. Oktober 2017 um 08:39 Uhr
Von: "Etienne Trimaille" 
An: "Pat Hin" 
Cc: rich...@duif.net, "qgis-userlists.osgeo.org" 
Betreff: Re: [Qgis-user] Select QGSFeature with given ID


Have a look at this good blog post from Nyall with QgsFeatureRequest:
http://nyalldawson.net/2016/10/speeding-up-your-pyqgis-scripts/


 
2017-10-20 8:21 GMT+02:00 Pat Hin :




Hello

 

many thanks.

 

the method ".setFilterExpression" has been the one i am looking for :)

 

Many thanks :)

 

Pat

 

Gesendet: Donnerstag, 19. Oktober 2017 um 20:39 Uhr
Von: "Richard Duivenvoorde" 
An: "Pat Hin" , "Luigi Pirelli" 
Cc: "qgis-userlists.osgeo.org" 
Betreff: Re: [Qgis-user] Select QGSFeature with given ID

On 19-10-17 18:27, Pat Hin wrote:
> Thank you
>  
> i have done it but struggeld. but wil have a second try

Did you found

http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/

already?

http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#iterating-over-a-subset-of-features

Regards,

Richard Duivenvoorde





___
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] Select QGSFeature with given ID

2017-10-20 Per discussione Etienne Trimaille
Have a look at this good blog post from Nyall with QgsFeatureRequest:
http://nyalldawson.net/2016/10/speeding-up-your-pyqgis-scripts/

2017-10-20 8:21 GMT+02:00 Pat Hin :

> Hello
>
> many thanks.
>
> the method ".setFilterExpression" has been the one i am looking for :)
>
> Many thanks :)
>
> Pat
>
> *Gesendet:* Donnerstag, 19. Oktober 2017 um 20:39 Uhr
> *Von:* "Richard Duivenvoorde" 
> *An:* "Pat Hin" , "Luigi Pirelli" 
> *Cc:* "qgis-userlists.osgeo.org" 
> *Betreff:* Re: [Qgis-user] Select QGSFeature with given ID
> On 19-10-17 18:27, Pat Hin wrote:
> > Thank you
> >
> > i have done it but struggeld. but wil have a second try
>
> Did you found
>
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/
>
> already?
>
> http://docs.qgis.org/testing/en/docs/pyqgis_developer_
> cookbook/vector.html#iterating-over-a-subset-of-features
>
> Regards,
>
> Richard Duivenvoorde
>
> ___
> 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] Select QGSFeature with given ID

2017-10-20 Per discussione Pat Hin
Hello

 

many thanks.

 

the method ".setFilterExpression" has been the one i am looking for :)

 

Many thanks :)

 

Pat

 

Gesendet: Donnerstag, 19. Oktober 2017 um 20:39 Uhr
Von: "Richard Duivenvoorde" 
An: "Pat Hin" , "Luigi Pirelli" 
Cc: "qgis-userlists.osgeo.org" 
Betreff: Re: [Qgis-user] Select QGSFeature with given ID

On 19-10-17 18:27, Pat Hin wrote:
> Thank you
>  
> i have done it but struggeld. but wil have a second try

Did you found

http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/

already?

http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#iterating-over-a-subset-of-features

Regards,

Richard Duivenvoorde


___
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