[QGIS-Developer] Difference between QgsVectorFileWriter and QgsOgrProvider when creating gpkg?

2020-10-16 Thread Nyall Dawson
Hi list,

After watching Tim's recent screencast where extracting nodes to a
geopackage took forever, I've tracked down a strange thing, which I
can't explain!

We have two different ways of creating a Geopackage in QGIS:

1. Via QgsVectorFileWriter, which is the generic class for creation of
disk based vector files
2. Via QgsVectorLayerExporter, which uses the standard vector data
providers to allow creation of new layers for any provider. (Used by
Processing in the screencast when Tim selected the "save to
geopackage" option)

That's fine, both classes exist for a reason.

But I've just discovered that using QgsVectorFileWriter to save a
layer to a GPKG is MUCH MUCH faster than QgsVectorLayerExporter, and
I'm at a loss to explain why.

The main difference I see when profiling comes down to the speed of
the call to OGRGeoPackageTableLayer::ICreateFeature.

Via QgsVectorLayerExporter, I can see that the sqllite3_step call used
by ICreateFeature spends a huge amount of time in rtreeUpdate. I don't
see ANY call to rtreeUpdate from the sqlite3_step call made by
ICreateFeature when QgsVectorFileWriter is used to create the
geopackage.

But I can't explain this. In both cases the resultant gpkg has a
spatial index. Does anyone know why one of the methods is so much
slower than the other? (And ultimately, can we fix
QgsVectorLayerExporter so it uses the same fast approach!)

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

[QGIS-Developer] Several notes from Building QGIS for Windows

2020-10-16 Thread C Hamilton
I just tried building QGIS for the first time on Windows using the
instruction from here.
https://github.com/qgis/QGIS/blob/master/INSTALL.md#4142-compiling-qgis-with-msvc

I was able to successfully build it, but needed to make some modifications
from the instructions.

1. I can download this installer, but it ultimately fails.
Download the free (as in free beer) Community installer
https://download.microsoft.com/download/D/2/3/D23F4D0F-BA2D-4600-8725-6CCECEA05196/vs_community_ENU.exe

I had to log into a Microsoft account, locate the installer and then
download that package from there.

2. This command fails
git clone git://github.com/qgis/QGIS.git

it was resolved by
git clone https://github.com/qgis/QGIS.git

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] GPKG and FID -- can we fix this mess?

2020-10-16 Thread uclaros
Given two layers, A and B, there are two cases of merge:
- B is inserted into A: A features keep their fid values, B features get a
new one on insert.
- A and B are inserted into C: Both A and B features get new fids on insert.

This is at least what I expect from an autogenerated, not null, unique
field.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
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] Help with QgsProcessingParameter

2020-10-16 Thread Niccolò Marchi
Hi Devs,
I’m contributing to the FUSION/LDV plugin and I have a couple of newbie 
questions related to the I/O parameters in Python.


1. SELECT MULTIPLE INPUTS
I’m not a Pythonist (I can read it and only make copy-paste-wise 
modifications). Unfortunately, there's one thing I don't understand of the 
logic related to the input of multiple files: there should be the way to create 
a .txt file with a list in case more than one is selected...but I haven't been 
able to make it work. You can find an example in xyz2dtm :



self.addParameter(QgsProcessingParameterMultipleLayers(self.INPUT,

   self.tr('XYZ files'),

   QgsProcessing.TypeFile))

and then calling:

fileList = fusionUtils.layersToFile('xyzDataFiles.txt', self, parameters, 
self.INPUT, context)



arguments.append(fileList)



When trying this with other files (.las, .laz), the txt file is created but it 
remains empty. This could be quite a big thing for users instead of working on 
mega files or file-by-file, but I have no idea ho to deal with it.


2. GENERAL OUTPUT NAME WITHOUT EXTENSION
There are some tools (e.g. TreeSeg) that require just a general “file name” 
that will be applied to many different outputs.
If I set just a simple name (e.g. "test_output") it doesn’t run the algo and 
returns an error such as “invalid name”.
In order to “fix” this, the user has to enter any kind of extension (i.e. 
"test_output.csv" and FUSION will strip it out using the basename for all the 
exports it provides.


Any suggestion or best practice about dealing with such cases?

Thanks in advance as usual,

Nic
___
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] QGIS crash in Settings menu if NOT in english

2020-10-16 Thread Richard Duivenvoorde

On 10/16/20 4:50 PM, Alessandro Pasotti wrote:
> Confirmed.
> 
> Can you please file a ticket and assign it to me?

There you go:

https://github.com/qgis/QGIS/issues/39430

have fun ;-)

Regards,

Richard Duivenvoorde
___
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] QGIS crash in Settings menu if NOT in english

2020-10-16 Thread Andreas Neumann

Yes - I have the same crash - I thought that I messed up my
self-compiled version - but apparently not. 


Whenever I switch to German, and then open the Settings menu: --> crash.


For switching back to English, I have to do it in an older version that
doesn't crash. 

Thanks for reporting this issue! 

Andreas 


On 2020-10-16 16:44, Richard Duivenvoorde wrote:


Hi List,

Can others maybe confirm my crash (I asked Raymond, he can not :-) )... ?

I'm on today's master on Debian Testing.

QGIS version
3.15.0-Master
QGIS code revision
b3066af303
Compiled against Qt
5.14.2
Running against Qt
5.14.2
Compiled against GDAL/OGR
3.1.3
Running against GDAL/OGR
3.1.3
Compiled against GEOS
3.8.1-CAPI-1.13.3
Running against GEOS
3.8.1-CAPI-1.13.3
Compiled against SQLite
3.33.0
Running against SQLite
3.33.0
PostgreSQL Client Version
13.0 (Debian 13.0-3)
SpatiaLite Version
5.0.0
QWT Version
6.1.4
QScintilla2 Version
2.11.5
Compiled against PROJ
7.1.1
Running against PROJ
Rel. 7.1.1, September 1st, 2020
OS Version
Debian GNU/Linux bullseye/sid
This copy of QGIS writes debugging output.

When I start QGIS from command line with another language:

qgis --lang de
(also when I change the language via the settings)

And go to Settings/Options, QGIS crashes

So I'm unable to open the Options dialog... both in a fresh profile and 
profiles-path

with:

Fatal: ASSERT failure in QgsOptions::checkPageWidgetNameMap(): 
"QgisApp::optionsPagesMap() is outdated, please update. Missing Advanced", file 
../src/app/options/qgsoptions.cpp, line 1272
QGIS died on signal -1[New LWP 289405]
[New LWP 289406]
[New LWP 289407]
[New LWP 289408]
[New LWP 289411]
[New LWP 289412]
[New LWP 289413]
[New LWP 289414]
[New LWP 289415]
[New LWP 289417]
[New LWP 289423]
[New LWP 289427]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
27../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
[Current thread is 1 (Thread 0x7f01b29e3f80 (LWP 289397))]
#0  0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
#1  0x55e9bd482277 in qgisCrash(int) (signal=-1) at ../src/app/main.cpp:349
status = 32765
pidstr = 
"--pid=289397\000\000\000\000\220\350t\311\351U\000\000\200\253\255\303\001\177\000"
gdbpid = 289516
exename = 
"/home/richard/bin/qgis_/master/debug/bin/qgis\000\000\000\"\000\000\000\000\000\000\000\200\253\255\303\001\177\000\000\240\350t\311\351U\000\000\000\001\000\000\000\000\000\000?\000\000\000\000\000\000\000\220\350t\311\351U\000\000@\002\000\000\000\000\000\000\026m\232\303\001\177\000\000$\000\000\000\071\000\000\000n\000\000\000|",
 '\000' , 
"\b\000\000\000\000\000\000\000\350\000\000\000\000\000\000\000\240\350t\311\351U\000\000?\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\234\313\a\306\001\177\000\000\265\000\000\000\000\000\000\000\000"...
len = 45
#2  0x55e9bd482850 in myMessageOutput(QtMsgType, QMessageLogContext const&, 
QString const&) (type=QtFatalMsg, msg=...) at ../src/app/main.cpp:444
#3  0x7f01c60697d8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7f01c60698f9 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x7f01c6037b38 in QMessageLogger::fatal(char const*, ...) const () at 
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x7f01c6036ffc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x7f01c92a011f in QgsOptions::checkPageWidgetNameMap() 
(this=0x55e9c710e650) at ../src/app/options/qgsoptions.cpp:1272
title = {static null = {}, d = 0x55e9c91abc00}
currentPage = 0x55e9c96052d0
item = 0x55e9c95f56d0
idx = 20
pageNames = {d = 0x55e9c974e230}
#8  0x7f01c929bb81 in QgsOptions::QgsOptions(QWidget*, QFlags, 
QList const&) (this=0x55e9c710e650, parent=0x55e9c0c0, 
fl=..., optionsFactories=...) at ../src/app/options/qgsoptions.cpp:1250
svgPathList = {> = {> = {}, {p = {static 
shared_null = {ref = {atomic = {_q_value = {> = {static _S_alignment = 4, _M_i = -1}, }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x55e9c90f9dd0}, d = 0x55e9c90f9dd0}}, }
red = 255
defSnapUnits = QgsTolerance::Pixels
sysVarsMap = {d = 0x55e9bf2792a0}
localizedPaths = {> = {> = {}, {p = {static shared_null 
= {ref = {atomic = {_q_value = {> = {static _S_alignment = 4, _M_i = -1}, }}}, alloc = 
0, begin = 0, end = 0, array = {0x0}}, d = 0x7f01c632c3b0 }, d = 0x7f01c632c3b0 }}, 
}
authcfg = {static null = {}, d = 0x55e9bfde2e10}
zoomedOutResampling = {static null = {}, d = 0x55e9c0f8cf60}
defaultProjectFileFormat = QgsProject::FileFormat::Qgz
tempLayoutFont = {static staticMetaObject = {d = {superdata = {direct = 0x0}, 
stringdata = 0x7f01c6abaec0, data = 0x7f01c6abab40, static_metacall = 0x0, 
relatedMetaObjects = 0x0, extradata = 0x0}}, d = 

Re: [QGIS-Developer] QGIS crash in Settings menu if NOT in english

2020-10-16 Thread Alessandro Pasotti
Confirmed.

Can you please file a ticket and assign it to me?

On Fri, Oct 16, 2020 at 4:44 PM Richard Duivenvoorde
 wrote:
>
> Hi List,
>
> Can others maybe confirm my crash (I asked Raymond, he can not :-) )... ?
>
> I'm on today's master on Debian Testing.
>
> QGIS version
> 3.15.0-Master
> QGIS code revision
> b3066af303
> Compiled against Qt
> 5.14.2
> Running against Qt
> 5.14.2
> Compiled against GDAL/OGR
> 3.1.3
> Running against GDAL/OGR
> 3.1.3
> Compiled against GEOS
> 3.8.1-CAPI-1.13.3
> Running against GEOS
> 3.8.1-CAPI-1.13.3
> Compiled against SQLite
> 3.33.0
> Running against SQLite
> 3.33.0
> PostgreSQL Client Version
> 13.0 (Debian 13.0-3)
> SpatiaLite Version
> 5.0.0
> QWT Version
> 6.1.4
> QScintilla2 Version
> 2.11.5
> Compiled against PROJ
> 7.1.1
> Running against PROJ
> Rel. 7.1.1, September 1st, 2020
> OS Version
> Debian GNU/Linux bullseye/sid
> This copy of QGIS writes debugging output.
>
>
> When I start QGIS from command line with another language:
>
> qgis --lang de
> (also when I change the language via the settings)
>
> And go to Settings/Options, QGIS crashes
>
> So I'm unable to open the Options dialog... both in a fresh profile and 
> profiles-path
>
> with:
>
> Fatal: ASSERT failure in QgsOptions::checkPageWidgetNameMap(): 
> "QgisApp::optionsPagesMap() is outdated, please update. Missing Advanced", 
> file ../src/app/options/qgsoptions.cpp, line 1272
> QGIS died on signal -1[New LWP 289405]
> [New LWP 289406]
> [New LWP 289407]
> [New LWP 289408]
> [New LWP 289411]
> [New LWP 289412]
> [New LWP 289413]
> [New LWP 289414]
> [New LWP 289415]
> [New LWP 289417]
> [New LWP 289423]
> [New LWP 289427]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> 0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
> options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
> 27  ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
> [Current thread is 1 (Thread 0x7f01b29e3f80 (LWP 289397))]
> #0  0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
> options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
> #1  0x55e9bd482277 in qgisCrash(int) (signal=-1) at 
> ../src/app/main.cpp:349
> status = 32765
> pidstr = 
> "--pid=289397\000\000\000\000\220\350t\311\351U\000\000\200\253\255\303\001\177\000"
> gdbpid = 289516
> exename = 
> "/home/richard/bin/qgis_/master/debug/bin/qgis\000\000\000\"\000\000\000\000\000\000\000\200\253\255\303\001\177\000\000\240\350t\311\351U\000\000\000\001\000\000\000\000\000\000?\000\000\000\000\000\000\000\220\350t\311\351U\000\000@\002\000\000\000\000\000\000\026m\232\303\001\177\000\000$\000\000\000\071\000\000\000n\000\000\000|",
>  '\000' , 
> "\b\000\000\000\000\000\000\000\350\000\000\000\000\000\000\000\240\350t\311\351U\000\000?\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\234\313\a\306\001\177\000\000\265\000\000\000\000\000\000\000\000"...
> len = 45
> #2  0x55e9bd482850 in myMessageOutput(QtMsgType, QMessageLogContext 
> const&, QString const&) (type=QtFatalMsg, msg=...) at ../src/app/main.cpp:444
> #3  0x7f01c60697d8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> #4  0x7f01c60698f9 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> #5  0x7f01c6037b38 in QMessageLogger::fatal(char const*, ...) const () at 
> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> #6  0x7f01c6036ffc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
> #7  0x7f01c92a011f in QgsOptions::checkPageWidgetNameMap() 
> (this=0x55e9c710e650) at ../src/app/options/qgsoptions.cpp:1272
> title = {static null = {}, d = 0x55e9c91abc00}
> currentPage = 0x55e9c96052d0
> item = 0x55e9c95f56d0
> idx = 20
> pageNames = {d = 0x55e9c974e230}
> #8  0x7f01c929bb81 in QgsOptions::QgsOptions(QWidget*, 
> QFlags, QList const&) 
> (this=0x55e9c710e650, parent=0x55e9c0c0, fl=..., optionsFactories=...) at 
> ../src/app/options/qgsoptions.cpp:1250
> svgPathList = {> = {> = 
> {}, {p = {static shared_null = {ref = {atomic = {_q_value = 
> {> = {static _S_alignment = 4, _M_i = -1},  fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 
> 0x55e9c90f9dd0}, d = 0x55e9c90f9dd0}}, }
> red = 255
> defSnapUnits = QgsTolerance::Pixels
> sysVarsMap = {d = 0x55e9bf2792a0}
> localizedPaths = {> = {> 
> = {}, {p = {static shared_null = {ref = {atomic = {_q_value = 
> {> = {static _S_alignment = 4, _M_i = -1},  fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f01c632c3b0 
> }, d = 0x7f01c632c3b0 }},  data fields>}
> authcfg = {static null = {}, d = 0x55e9bfde2e10}
> zoomedOutResampling = {static null = {}, d = 
> 0x55e9c0f8cf60}
> defaultProjectFileFormat = QgsProject::FileFormat::Qgz
> tempLayoutFont = 

[QGIS-Developer] QGIS crash in Settings menu if NOT in english

2020-10-16 Thread Richard Duivenvoorde
Hi List,

Can others maybe confirm my crash (I asked Raymond, he can not :-) )... ?

I'm on today's master on Debian Testing.

QGIS version
3.15.0-Master
QGIS code revision
b3066af303
Compiled against Qt
5.14.2
Running against Qt
5.14.2
Compiled against GDAL/OGR
3.1.3
Running against GDAL/OGR
3.1.3
Compiled against GEOS
3.8.1-CAPI-1.13.3
Running against GEOS
3.8.1-CAPI-1.13.3
Compiled against SQLite
3.33.0
Running against SQLite
3.33.0
PostgreSQL Client Version
13.0 (Debian 13.0-3)
SpatiaLite Version
5.0.0
QWT Version
6.1.4
QScintilla2 Version
2.11.5
Compiled against PROJ
7.1.1
Running against PROJ
Rel. 7.1.1, September 1st, 2020
OS Version
Debian GNU/Linux bullseye/sid
This copy of QGIS writes debugging output.


When I start QGIS from command line with another language:

qgis --lang de
(also when I change the language via the settings)

And go to Settings/Options, QGIS crashes

So I'm unable to open the Options dialog... both in a fresh profile and 
profiles-path

with:

Fatal: ASSERT failure in QgsOptions::checkPageWidgetNameMap(): 
"QgisApp::optionsPagesMap() is outdated, please update. Missing Advanced", file 
../src/app/options/qgsoptions.cpp, line 1272
QGIS died on signal -1[New LWP 289405]
[New LWP 289406]
[New LWP 289407]
[New LWP 289408]
[New LWP 289411]
[New LWP 289412]
[New LWP 289413]
[New LWP 289414]
[New LWP 289415]
[New LWP 289417]
[New LWP 289423]
[New LWP 289427]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
27  ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
[Current thread is 1 (Thread 0x7f01b29e3f80 (LWP 289397))]
#0  0x7f01c39e72c7 in __GI___wait4 (pid=289516, stat_loc=0x7ffd4c3f88e4, 
options=0, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:27
#1  0x55e9bd482277 in qgisCrash(int) (signal=-1) at ../src/app/main.cpp:349
status = 32765
pidstr = 
"--pid=289397\000\000\000\000\220\350t\311\351U\000\000\200\253\255\303\001\177\000"
gdbpid = 289516
exename = 
"/home/richard/bin/qgis_/master/debug/bin/qgis\000\000\000\"\000\000\000\000\000\000\000\200\253\255\303\001\177\000\000\240\350t\311\351U\000\000\000\001\000\000\000\000\000\000?\000\000\000\000\000\000\000\220\350t\311\351U\000\000@\002\000\000\000\000\000\000\026m\232\303\001\177\000\000$\000\000\000\071\000\000\000n\000\000\000|",
 '\000' , 
"\b\000\000\000\000\000\000\000\350\000\000\000\000\000\000\000\240\350t\311\351U\000\000?\000\000\000\000\000\000\000\377\377\377\377\000\000\000\000\377\377\377\377\000\000\000\000\234\313\a\306\001\177\000\000\265\000\000\000\000\000\000\000\000"...
len = 45
#2  0x55e9bd482850 in myMessageOutput(QtMsgType, QMessageLogContext const&, 
QString const&) (type=QtFatalMsg, msg=...) at ../src/app/main.cpp:444
#3  0x7f01c60697d8 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7f01c60698f9 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x7f01c6037b38 in QMessageLogger::fatal(char const*, ...) const () at 
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x7f01c6036ffc in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x7f01c92a011f in QgsOptions::checkPageWidgetNameMap() 
(this=0x55e9c710e650) at ../src/app/options/qgsoptions.cpp:1272
title = {static null = {}, d = 0x55e9c91abc00}
currentPage = 0x55e9c96052d0
item = 0x55e9c95f56d0
idx = 20
pageNames = {d = 0x55e9c974e230}
#8  0x7f01c929bb81 in QgsOptions::QgsOptions(QWidget*, 
QFlags, QList const&) 
(this=0x55e9c710e650, parent=0x55e9c0c0, fl=..., optionsFactories=...) at 
../src/app/options/qgsoptions.cpp:1250
svgPathList = {> = {> = 
{}, {p = {static shared_null = {ref = {atomic = {_q_value = 
{> = {static _S_alignment = 4, _M_i = -1}, }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x55e9c90f9dd0}, 
d = 0x55e9c90f9dd0}}, }
red = 255
defSnapUnits = QgsTolerance::Pixels
sysVarsMap = {d = 0x55e9bf2792a0}
localizedPaths = {> = {> = 
{}, {p = {static shared_null = {ref = {atomic = {_q_value = 
{> = {static _S_alignment = 4, _M_i = -1}, }}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x7f01c632c3b0 
}, d = 0x7f01c632c3b0 }}, }
authcfg = {static null = {}, d = 0x55e9bfde2e10}
zoomedOutResampling = {static null = {}, d = 
0x55e9c0f8cf60}
defaultProjectFileFormat = QgsProject::FileFormat::Qgz
tempLayoutFont = {static staticMetaObject = {d = {superdata = {direct = 
0x0}, stringdata = 0x7f01c6abaec0, data = 0x7f01c6abab40, static_metacall = 
0x0, relatedMetaObjects = 0x0, extradata = 0x0}}, d = {d = 0x55e9c9129220}, 
resolve_mask = 1}
joinStyleSetting = QgsGeometry::JoinStyleRound
locatorLayout = 0x55e9c91a85c0
identifyValue = 2
pluginsPathList = {> = {> = 
{}, {p = 

Re: [QGIS-Developer] [Qgis-psc] Phasing out 32-bit support in QGIS for

2020-10-16 Thread Jürgen E . Fischer
Hi Nyall,

On Fri, 16. Oct 2020 at 10:19:58 +1000, Nyall Dawson wrote:
> > tl;dr QGIS will drop 32-bit support on Windows after the QGIS 3.16 release
> > when we update our Qt dependencies to Qt 5.15.
 
> Am I right in interpreting that this means the Windows packaging
> improvements won't land till after 3.16 is released?

It looks like it.  I'm in the middle of the osgeo4w reboot, but I'm not sure if
I'll make it before the release.  Even if I do, there will be only very
limited time for testing, if any - so it's probably better to do the next
release as is and switch after (and drop 32bit completely for everything).


Jürgen

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


signature.asc
Description: PGP signature
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/
___
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] refresh conditional formatting full row after feature attribut update

2020-10-16 Thread Häfliger Guido
Hello

If I start the edit session manually and edit the attribute, the conditional 
formatting full row rule are applied immediately, even before saving.

It seems like the refresh of the conditional formatting full row rule ignore 
the first or last feature-id of the modified features if the attributes are 
modified by python code.

I tried to find an API-method which forces the refresh of the conditional 
formatting row rules but I didn't find anything which works

Best regards
Guido


-Ursprüngliche Nachricht-
Von: Nyall Dawson [mailto:nyall.daw...@gmail.com] 
Gesendet: Freitag, 16. Oktober 2020 02:21
An: Häfliger Guido
Cc: qgis-developer@lists.osgeo.org
Betreff: Re: [QGIS-Developer] refresh conditional formatting full row after 
feature attribut update

On Thu, 15 Oct 2020 at 19:41, Häfliger Guido
 wrote:
>
> Hi
>
>
>
> I execute the following code:
>
>
>
> selected_feature = layer.selectedFeatures()
>
> layer.startEditing()
>
> for feature in selected_feature:
>
> feature["focus"] = 1
>
> layer.updateFeature(feature)
>
>
>
> layer.commitChanges()
>
>
>
> The update of the values works  fine, the opened attribute table shows the 
> new attribute values but the conditional formatting in the attribute table 
> (full row) is not applied to the updated features if only one feature is 
> selected. If selected_features contains several features, the conditional 
> formatting works except for the first selected feature, so it is not correct.
>
>
>
> The refresh of conditional formatting works perfectly if the conditional 
> formatting is field based (rule un field focus). The full row conditional 
> formatting is only applied correctly if I close and reopen the attribute 
> table. Is this a bug in full row based conditional formatting

Sounds like a bug to me -- can you reproduce if you make changes from
the QGIS interface itself and without the python code?

Nyall



or do I have to use another method to update the attributes? Exist a
workaround to force the refresh of conditional formatting full row
rules on a opened attribute table?
>
>
>
> Thanks for your help in advance
>
> Guido
>
> 
>
>
> Dipl. Ing. ETH Guido Häfliger
> EDV/GIS-Spezialist
> Tel. ++41 41 462 97 60
> guido.haefli...@vogelwarte.ch
> www.vogelwarte.ch
>
> Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz
>
> Station ornithologique suisse | Seerose 1 | CH-6204 Sempach | Suisse
> Stazione ornitologica svizzera | Seerose 1 | CH-6204 Sempach | Svizzera
> Swiss Ornithological Institute | Seerose 1 | CH-6204 Sempach | Switzerland
>
>
>
> ___
> 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] GPKG and FID -- can we fix this mess?

2020-10-16 Thread Nyall Dawson
On Fri, 16 Oct 2020 at 01:48, Matthias Kuhn  wrote:
>
> If there is a managed database where there has been a conscious decision to 
> have an integer id column (postgres case) and workflows are built around 
> this: filling the id on insert, building foreign keys against it etc, that 
> works just fine.
>
> But if GeoPackage is used as a generic dataformat (typical Shapefile 
> replacement), requirements are different and workflows less managed. E.g. The 
> "simple" case of merging two datasets already poses the question what to do 
> with the two colliding fid attributes. Delete the original fid columns and 
> regenerate one. Or preserve both and generate a new one (leading to fid, 
> fid_1 and fid_2).

I agree with Matthias here -- a table from a full enterprise level
database like Postgres or SQL server naturally lends itself to
stricter constraints on the features. Geopackage is not an enterprise
level database solution, so we should be forgiving here and just let
users do their work without imposing artificial constraints on them.


>
> If we look at the fid attribute as part of the data (where we have foreign 
> keys pointing two etc) we want it to be preserved.
> If we look at it as a purely internal technical id (for RTree management etc) 
> we don't care for it and can just regenerate and forget about it.
>
> It looks as if we need to keep it as a technical id.
> I like the idea to transparently generate it in addFeature.
> I would also prefer to hide it away from the user and only leave it available 
> through $id. This would make it clear to users that it's for internal use and 
> no one would expect it to be preserved after a merge operation. For backwards 
> compatibility there could be a provider flag to re-enable it.

I don't think we should do that -- having them show in some
circumstances and not others will be confusing.

I'm ok with exposing it, but just being tolerant and automatically
handling constraint violations for the users.

Nyall



> I hope that makes sense.


>
> Matthias
___
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] GPKG and FID -- can we fix this mess?

2020-10-16 Thread Matthias Kuhn
On Thu, Oct 15, 2020 at 8:11 PM uclaros  wrote:

> Wouldn't making the fid field read only and generated once upon insert
> solve
> the issues?
> Still, it will uniquely identify the feature for its lifetime in the
> dataset.
>
> This helps to avoid collisions but doesn't solve the "do we preserve the
fids on merge" question.
___
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] GPKG and FID -- can we fix this mess?

2020-10-16 Thread Matthias Kuhn
On Thu, Oct 15, 2020 at 7:23 PM Even Rouault 
wrote:

> On jeudi 15 octobre 2020 17:48:30 CEST Matthias Kuhn wrote:
> > If there is a managed database where there has been a conscious decision
> to
> > have an integer id column (postgres case) and workflows are built around
> > this: filling the id on insert, building foreign keys against it etc,
> that
> > works just fine.
> >
> > But if GeoPackage is used as a generic dataformat (typical Shapefile
> > replacement), requirements are different and workflows less managed. E.g.
> > The "simple" case of merging two datasets already poses the question what
> > to do with the two colliding fid attributes. Delete the original fid
> > columns and regenerate one. Or preserve both and generate a new one
> > (leading to fid, fid_1 and fid_2).
> >
> > If we look at the fid attribute as part of the data (where we have
> foreign
> > keys pointing two etc) we want it to be preserved.
> > If we look at it as a purely internal technical id (for RTree management
> > etc) we don't care for it and can just regenerate and forget about it.
> >
> > It looks as if we need to keep it as a technical id.
> > I like the idea to transparently generate it in addFeature.
> > I would also prefer to hide it away from the user and only leave it
> > available through $id. This would make it clear to users that it's for
> > internal use and no one would expect it to be preserved after a merge
> > operation. For backwards compatibility there could be a provider flag to
> > re-enable it.
> > I hope that makes sense.
>
> As I like playing devil's advocate :-), one issue I can think of is : how
> can
> you know when you open a GeoPackage, possibly created by another software,
> if
> the integer primary key column is a technical one (that could perhaps be
> hidden), or a "real" one part of the data and intended to be user visible
> ? So
> we would need some user feedback...


Correct, QGIS can't know. I as a user have better chances. I was trying to
propose to pass this as a parameter to the data provider (as an option in
the add layer dialog). This is not necessarily easy to implement.

Or maybe more simply, for pure QGIS
> workflows, we could decide for a new value for the fid column name when we
> create a GPKG table, like "hidden_fid", and when opening such GeoPackage,
> decide to not expose it as a field. That could solve issues for GPKG
> created
> from now by QGIS, while still providing some backward compatibility. And
> people wanting to still have a visible fid, and ready to deal with
> possible
> annoyances, could overload this "hidden_fid" value with another value.
>

This sounds like a simple while powerful solution.

Matthias


> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.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