Re: [QGIS-Developer] GSoC QGIS 3D Improvement: Week 11 Report

2019-08-14 Thread Nyall Dawson
On Thu, 15 Aug 2019 at 03:56, Ismail Sunni  wrote:

> The billboard changes IF the previous billboard is not a symbol. But IF the 
> previous billboard is a symbol, and I changed the symbol's properties (e.g. 
> color, rotation, shape) the billboard stays the same.
>
> In my latest code (pushed by now), I set the billboard to use an external 
> image (the success-kid.png) if the symbol's color is white (for debugging 
> purpose).
>
> If I set the symbol to white, the billboard uses the success-kid as the 
> billboard (no matter what is the previous billboard as expected).
> If the previous symbol is the success-kid, then I changed the symbol's 
> properties it will change as expected.
> If the previous symbol is not the success-kid, then I changed the symbol's 
> properties,  it won't change the billboard.
>
> When I close QGIS and reopen it, the billboard will show as expected. So, I 
> think it's not an issue in saving and restoring the symbol.

Looking over your branch, I'm almost certain it is.

Try using QgsSymbolLayerUtils::symbolProperties to save to symbol to a
string (see 
https://github.com/qgis/QGIS/blob/master/src/core/callouts/qgscallout.cpp#L237
)

and something like
https://github.com/qgis/QGIS/blob/master/src/core/callouts/qgscallout.cpp#L261
to restore.

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Bug with python macro on project load

2019-08-14 Thread Tim Sutton
Thanks Bo! @Mario can you confirm which behaviour you replicated? The exception 
when calling traceback.print_exception() failed
or my dodgy code simply failing with a nice exception message as Bo 
demonstrated (which is expected behaviour).

Regards

Tim
 

> On 14 Aug 2019, at 20:25, Bo Victor Thomsen  
> wrote:
> 
> Hi Tim !  (Greetings from Denmark :-) 
> 
> On Windows 8.1 64 bit and QGIS 3.8.1 64 bit: 
> 
> I've modified your python code a little bit:
> 
> from qgis.core import QgsProject
> from qgis.utils import iface
> 
> def openProject():
> layers = QgsProject.instance().mapLayersByName('kommune')
> layer = layers[0]
> iface.showAttributeTable(layer)
> 
> 
> def saveProject():
> pass
> 
> def closeProject():
> pass
> 
> It works after enabling macro's. (You'll have to change the layer name back 
> to your original layer name)
> 
> -- 
> Med venlig hilsen / Kind regards
> 
> Bo Victor Thomsen
> 
> 
> 
> 
> Den 14-08-2019 kl. 17:21 skrev Tim Sutton:
>> Hi
>> 
>> Oh thanks for the feedback!
>> 
>> Regards
>> 
>> Tim
>> 
>>> On 14 Aug 2019, at 13:27, Mario Baranzini >> > wrote:
>>> 
>>> Hi Tim, 
>>> I have exactly the same error with QGIS 3.8.0 on Archlinux.
>>> 
>>> Cheers
>>> 
>>> On Wed, 14 Aug 2019 at 10:13, Tim Sutton >> > wrote:
>>> Hi All
>>> 
>>> I am running into a bug on macOS using QGIS 3.8 using the project load 
>>> python hook [1] and was curious:
>>> 
>>> 1) Can anybody replicate this on other operating systems
>>> 2) Does the macro run *after* layers have been loaded in the project or 
>>> before?  Former seems more logical to me but you should never assume to 
>>> much eh? :-)
>>> 
>>> Thanks
>>> 
>>> Tim
>>> 
>>> 
>>> 
>>> [1] https://github.com/qgis/QGIS/issues/31235 
>>> 
>>> —
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Tim Sutton
>>> 
>>> Co-founder: Kartoza
>>> Ex Project chair: QGIS.org 
>>> 
>>> Visit http://kartoza.com  to find out about open 
>>> source:
>>> 
>>> Desktop GIS programming services
>>> Geospatial web development
>>> GIS Training
>>> Consulting Services
>>> 
>>> Skype: timlinux 
>>> IRC: timlinux on #qgis at freenode.net 
>>> 
>>> I'd love to connect. Here's my calendar link 
>>>  to make finding time easy.
>>> 
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org 
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> 
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>>> 
>>> 
>>> -- 
>>> Mario Baranzini
>>> ma...@opengis.ch  
>>> +41 (0)78 733 01 59 
>>>  
>> —
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Tim Sutton
>> 
>> Co-founder: Kartoza
>> Ex Project chair: QGIS.org 
>> 
>> Visit http://kartoza.com  to find out about open source:
>> 
>> Desktop GIS programming services
>> Geospatial web development
>> GIS Training
>> Consulting Services
>> 
>> Skype: timlinux 
>> IRC: timlinux on #qgis at freenode.net 
>> 
>> I'd love to connect. Here's my calendar link  
>> to make finding time easy.
>> 
>> 
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Bug with python macro on project load

2019-08-14 Thread Bo Victor Thomsen

Hi Tim !  (Greetings from Denmark :-)

On Windows 8.1 64 bit and QGIS 3.8.1 64 bit:

I've modified your python code a little bit:

from qgis.core import QgsProject
from qgis.utils import iface

def openProject():
    layers = QgsProject.instance().mapLayersByName('kommune')
    layer = layers[0]
    iface.showAttributeTable(layer)


def saveProject():
    pass

def closeProject():
    pass

It works after enabling macro's. (You'll have to change the layer name 
back to your original layer name)


--
Med venlig hilsen / Kind regards

Bo Victor Thomsen



Den 14-08-2019 kl. 17:21 skrev Tim Sutton:

Hi

Oh thanks for the feedback!

Regards

Tim

On 14 Aug 2019, at 13:27, Mario Baranzini > wrote:


Hi Tim,
I have exactly the same error with QGIS 3.8.0 on Archlinux.

Cheers

On Wed, 14 Aug 2019 at 10:13, Tim Sutton > wrote:


Hi All

I am running into a bug on macOS using QGIS 3.8 using the project
load python hook [1] and was curious:

1) Can anybody replicate this on other operating systems
2) Does the macro run *after* layers have been loaded in the
project or before?  Former seems more logical to me but you
should never assume to much eh? :-)

Thanks

Tim



[1] https://github.com/qgis/QGIS/issues/31235
—









*Tim Sutton*

*Co-founder:*Kartoza
*Ex Project chair:*QGIS.org 

Visit http://kartoza.com  to find out about
open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux
*IRC:*timlinux on #qgis at freenode.net 

I'd love to connect. Here's my calendar link
 to make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org

List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Mario Baranzini
ma...@opengis.ch 
+41 (0)78 733 01 59 
http://www.opengis.ch 


—








*Tim Sutton*

*Co-founder:*Kartoza
*Ex Project chair:*QGIS.org 

Visit http://kartoza.com  to find out about open 
source:


Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

*Skype*: timlinux
*IRC:*timlinux on #qgis at freenode.net 

I'd love to connect. Here's my calendar link 
 to make finding time easy.



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] GSoC QGIS 3D Improvement: Week 11 Report

2019-08-14 Thread Ismail Sunni
Hi Nyall,

Thanks for the reply!

More and more your work is revealing that we'll eventually need to
> tackle this issue head on, and implement proper opacity support in the
> 3d renderer. Everything else is going to be just a hack which won't
> work in all circumstances. I'd suggest not spending much more time on
> this issue given this (current) inherent limitation.


Sure.

I looked over your branch, and it seems the issue is in saving and
> restoring the symbol, not the retrieval of the symbol from the button.
> Is that correct?


The billboard changes IF the previous billboard is not a symbol. But IF the
previous billboard is a symbol, and I changed the symbol's properties (e.g.
color, rotation, shape) the billboard stays the same.

In my latest code (pushed by now), I set the billboard to use an external
image (the success-kid.png) if the symbol's color is white (for debugging
purpose).

If I set the symbol to white, the billboard uses the success-kid as the
billboard (no matter what is the previous billboard as expected).
If the previous symbol is the* success-kid, *then I changed the symbol's
properties it will change as expected.
If the previous symbol is not the *success-kid*, then I changed the
symbol's properties,  it won't change the billboard.

When I close QGIS and reopen it, the billboard will show as expected. So, I
think it's not an issue in saving and restoring the symbol.

Previously, I thought the problem is the changed signal from the button or
the saving and restoring, but it seems it is something else.

Best regards.

On Wed, Aug 14, 2019 at 1:18 AM Nyall Dawson  wrote:

> On Mon, 12 Aug 2019 at 06:54, Ismail Sunni  wrote:
> >
> > Dear QGIS developers,
> >
> > Here is my 11th-week report for my GSoC Project[4]. You can also check
> the project wiki page [2]. Comments and suggestions are welcome :)
> >
> > GSoC QGIS 3D Improvement Week 11 Report
> >
> > Period: 5 August 2019 - 11 August 2019
> >
> > Report
> > 1. What did I complete this week?
> >- Fixing transparency for the billboard to make it smoother on the
> edge. It looks better than the previous result, but still not as smooth as
> I expected
>
> More and more your work is revealing that we'll eventually need to
> tackle this issue head on, and implement proper opacity support in the
> 3d renderer. Everything else is going to be just a hack which won't
> work in all circumstances. I'd suggest not spending much more time on
> this issue given this (current) inherent limitation.
>
> > 2. What am I going to achieve for next week?
> >- Solve using a symbol from QgsSymbolButton
>
> I looked over your branch, and it seems the issue is in saving and
> restoring the symbol, not the retrieval of the symbol from the button.
> Is that correct?
>
> Nyall
>


-- 
Ismail Sunni
ismailsunni.wordpress.com
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Bug with python macro on project load

2019-08-14 Thread Tim Sutton
Hi

Oh thanks for the feedback!

Regards

Tim

> On 14 Aug 2019, at 13:27, Mario Baranzini  wrote:
> 
> Hi Tim, 
> I have exactly the same error with QGIS 3.8.0 on Archlinux.
> 
> Cheers
> 
> On Wed, 14 Aug 2019 at 10:13, Tim Sutton  > wrote:
> Hi All
> 
> I am running into a bug on macOS using QGIS 3.8 using the project load python 
> hook [1] and was curious:
> 
> 1) Can anybody replicate this on other operating systems
> 2) Does the macro run *after* layers have been loaded in the project or 
> before?  Former seems more logical to me but you should never assume to much 
> eh? :-)
> 
> Thanks
> 
> Tim
> 
> 
> 
> [1] https://github.com/qgis/QGIS/issues/31235 
> 
> —
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Tim Sutton
> 
> Co-founder: Kartoza
> Ex Project chair: QGIS.org 
> 
> Visit http://kartoza.com  to find out about open source:
> 
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
> 
> Skype: timlinux 
> IRC: timlinux on #qgis at freenode.net 
> 
> I'd love to connect. Here's my calendar link  
> to make finding time easy.
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> 
> -- 
> Mario Baranzini
> ma...@opengis.ch  
> +41 (0)78 733 01 59 
>  
—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Copy Exact coordinates of a Vertex

2019-08-14 Thread C Hamilton
I received a request for "Lat Lon Tools" to support snapping for the
purpose of copying exact coordinates of a vertex or the location where two
geometries intersect, to the clipboard. That second part might be much more
difficult.

What is your opinion on this? Is it something that should be supported and
if so what would be the proper method for implementing this? What part of
the QGIS API should I be looking at?

Thanks for any guidance on this,

Calvin
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Bug with python macro on project load

2019-08-14 Thread Mario Baranzini
Hi Tim,
I have exactly the same error with QGIS 3.8.0 on Archlinux.

Cheers

On Wed, 14 Aug 2019 at 10:13, Tim Sutton  wrote:

> Hi All
>
> I am running into a bug on macOS using QGIS 3.8 using the project load
> python hook [1] and was curious:
>
> 1) Can anybody replicate this on other operating systems
> 2) Does the macro run *after* layers have been loaded in the project or
> before?  Former seems more logical to me but you should never assume to
> much eh? :-)
>
> Thanks
>
> Tim
>
>
>
> [1] https://github.com/qgis/QGIS/issues/31235
> —
>
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Ex Project chair:* QGIS.org
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
> I'd love to connect. Here's my calendar link
>  to make finding time easy.
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Mario Baranzini
ma...@opengis.ch
+41 (0)78 733 01 59 <+41787330159>
[image: http://www.opengis.ch] 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1631] PAT - Precision Agriculture Tools approval notification.

2019-08-14 Thread noreply

Plugin PAT - Precision Agriculture Tools approval by cratcliff.
The plugin version "[1631] PAT - Precision Agriculture Tools 0.3.1" is now 
approved
Link: http://plugins.qgis.org/plugins/pat/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Plugin [1631] PAT - Precision Agriculture Tools approval notification.

2019-08-14 Thread noreply

Plugin PAT - Precision Agriculture Tools approval by cratcliff.
The plugin version "[1631] PAT - Precision Agriculture Tools 0.3.0" is now 
approved
Link: http://plugins.qgis.org/plugins/pat/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Bug with python macro on project load

2019-08-14 Thread Tim Sutton
Hi All

I am running into a bug on macOS using QGIS 3.8 using the project load python 
hook [1] and was curious:

1) Can anybody replicate this on other operating systems
2) Does the macro run *after* layers have been loaded in the project or before? 
 Former seems more logical to me but you should never assume to much eh? :-)

Thanks

Tim



[1] https://github.com/qgis/QGIS/issues/31235
—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer