Re: [QGIS-Developer] Shapefile not correctly shown in some areas.

2024-01-12 Thread Colin Sare-Soar via QGIS-Developer
I loaded the shapefile and found some weird behaviour.
I saw a line of points, with a break (presumably your 'hole') but the same as 
you, I couldn't click on any of them and they disappear.
I cannot see the point numbers or any info. The table is blank.
I can see from the properties that there are 2001 points but nothing else. I 
can see the coordinates of the points by right clicking.
One problem that I have is that all my tooltips have disappeared. A small 
window opens but it is blank, so that doesn't help.

I could see the line in Google Earth but the points disappeared there also, if 
I zoomed in too much.

My system is:

QGIS version
3.34.2-Prizren
QGIS code revision
7d199797fcc
Qt version
5.15.3
Python version
3.10.12
GDAL/OGR version
3.4.1
PROJ version
8.2.1
EPSG Registry database version
v10.041 (2021-12-03)
GEOS version
3.10.2-CAPI-1.16.0
SQLite version
3.37.2
PDAL version
2.3.0
PostgreSQL client version
14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
SpatiaLite version
5.0.1
QWT version
6.1.4
QScintilla2 version
2.11.6
OS version
Linux Mint 21.2

Active Python plugins
grassprovider
2.12.99
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99

Regards
Colin Sare-Soar

> Hello,
> To make things short, I have a device which gathers data in the fields 
> (hundreds of data per second), and gets the position through a GPS (every 
> second).
> Between 2 GPS positions, I triangulate the positions, so the points are 
> aligned.
> Sometimes, the device "writes" the data so it spends some time doing so, and 
> it does not gather anything, so I have a "hole".
> 
> Then, to visualize the data, I create a Shapefile, only with Points.
> 
> In one Shapefile, I had some strange points: points that appear on the map, 
> but are not clickable and disappear when I zoom in too much. I attach the 
> files ; they can be downloaded here, too:   
> https://www.grosfichiers.com/sjNC3yx7Kvi  
> 
> For instance, in the file I join, the position number 1613 and further are 
> problematic. If my viewing area includes the point 1612, I see all the 
> points, well aligned, but I cannot click points 1613 and further.
> If I zoom in, or if I move the area and the point 1612 is out of the area, I 
> see nothing anymore.
> 
> The code to generate the Shapefile has a systematic approach: it takes the 
> points one after the other, and writes their position by incrementing the 
> values. So I suspect there is no bug.
> In a previous test, the same problem occured BEFORE point 1217 : I could only 
> see the first points if the area included point 1217.
> 
> Questions:
> - can anyone try to see my shapefile and confirm the problem?
> - does this bug ring a bell to anyone?
> - what may be the problem?
> 
> Thank you very much!
> My versions are detailled below. I just updated to the LTR to try to solve 
> the problem, but the bug exists with the 3.22.7-Białowieża  and 
> 3.28.14-Firenze versions.
> 
> 
> Aurélie
> 
> 
> Version de QGIS
> 3.28.14-Firenze
> Révision du code
> b09131c512
> Version de Qt
> 5.15.3
> Version de Python
> 3.9.5
> Version de GDAL/OGR
> 3.8.2
> Version de Proj
> 9.3.1
> Version de la base de données du registre EPSG
> v10.098 (2023-11-24)
> Version de GEOS
> 3.12.1-CAPI-1.18.1
> Version de SQLite
> 3.41.1
> Version de PDAL
> 2.6.0
> Version du client PostgreSQL
> unknown
> Version de SpatiaLite
> 5.1.0
> Version de QWT
> 6.1.6
> Version de QScintilla2
> 2.13.4
> Version de l'OS
> Windows 10 Version 2009
> 
> 
> 
> 
> Extensions Python actives
> QGeoloGIS
> 1.9.0
> db_manager
> 0.1.20
> grassprovider
> 2.12.99
> MetaSearch
> 0.3.6
> processing
> 2.12.99
> sagaprovider
> 2.12.99
> 
> 
> === Previously  =
> 
> Version de QGIS
> 3.22.7-Białowieża
> Révision du code
> 5a65627a
> Version de Qt
> 5.15.3
> Version de Python
> 3.9.5
> Version de GDAL/OGR
> 3.4.3
> Version de Proj
> 9.0.0
> Version de la base de données du registre EPSG
> v10.054 (2022-02-13)
> Version de GEOS
> 3.10.2-CAPI-1.16.0
> Version de SQLite
> 3.38.1
> Version de PDAL
> 2.3.0
> Version du client PostgreSQL
> 13.0
> Version de SpatiaLite
> 5.0.1
> Version de QWT
> 6.1.6
> Version de QScintilla2
> 2.13.1
> Version de l'OS
> Windows 10 Version 2009
___
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 Documentation Writer

2024-01-12 Thread Andrea Giudiceandrea via QGIS-Developer

Il 12/01/2024 17:51, Selma Vidimlic via QGIS-Developer ha scritto:

This week, I dedicated some time to investigating older issues, 
attempting to determine whether they still need to remain open. During 
this process, I came across the issue titled Add a check box in the 
sublayer selection dialog to control whether system and internal tables 
should be shown 
, it seems like 
a small change (in documentation), but I'm having trouble finding the 
"sublayer selection dialog." If someone could explain what that means 
and how I can access it, I would appreciate it.


Hi Selma,
the "Show system and internal tables" checkbox is visible in the "Select 
Items to Add" dialog windows displayed when the vector dataset contains 
multiple layers, e.g. when adding a GeoPackage layer.


Best regards.

Andrea___
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 Documentation Writer

2024-01-12 Thread Selma Vidimlic via QGIS-Developer
Hello all,
Here is the report for this week.

Open pull requests:
Raster image symbol 
MS SQL Server connection details
 - this PR fixes
three issues:

   - #6443 
   - #6644 
   - #3063 

Style database  -
still open and it needs some fixes after review
Raster identify results
 - also still open,
but requires some bigger changes in the Working with raster chapter


This week, I dedicated some time to investigating older issues, attempting
to determine whether they still need to remain open. During this process, I
came across the issue titled Add a check box in the sublayer selection
dialog to control whether system and internal tables should be shown
, it seems like a
small change (in documentation), but I'm having trouble finding the
"sublayer selection dialog." If someone could explain what that means and
how I can access it, I would appreciate it.

Have a nice weekend,
Selma.


On Fri, 5 Jan 2024 at 17:19, Selma Vidimlic  wrote:

> Hello all and happy new year,
>
> Documentation writer report:
>
> Merged pull requests:
>
>- https://github.com/qgis/QGIS-Documentation/pull/8713
>- https://github.com/qgis/QGIS-Documentation/pull/8721
>- https://github.com/qgis/QGIS-Documentation/pull/8723
>
> Open pull requests:
>
>- https://github.com/qgis/QGIS-Documentation/pull/8764
>- https://github.com/qgis/QGIS-Documentation/pull/8765
>
> Working on:
>
>- https://github.com/qgis/QGIS-Documentation/issues/7545
>- Georeferencer chapter
>
> Have a nice weekend,
> Selma.
>
> On Fri, 15 Dec 2023 at 16:51, Selma Vidimlic  wrote:
>
>> Hello all,
>>
>> Here is the report for this week:
>>
>> Merged pull requests:
>>
>>- https://github.com/qgis/QGIS-Documentation/pull/8701
>>- https://github.com/qgis/QGIS-Documentation/pull/8702
>>- https://github.com/qgis/QGIS-Documentation/pull/8708
>>
>> Open pull requests:
>>
>>- https://github.com/qgis/QGIS-Documentation/pull/8713
>>
>> Still working on:
>>
>>- https://github.com/qgis/QGIS-Documentation/issues/7568
>>- https://github.com/qgis/QGIS-Documentation/issues/7545
>>
>>
>> Have a great weekend,
>> Selma.
>>
>>
>> On Fri, 8 Dec 2023 at 17:19, Selma Vidimlic  wrote:
>>
>>> Hello all,
>>>
>>> Merged pull requests from this week:
>>>
>>>- 3D Tiles Chapter
>>> with two
>>>commits from this week:
>>>
>>>
>>>1. fixes after review and update opening_data file
>>>
>>> 
>>>2. cross references
>>>
>>> 
>>>
>>>
>>>- Identify tool update
>>>
>>>
>>> Open pull requests from this week:
>>>
>>>- Topology checker update
>>>
>>>- Auto-open options for exported layout
>>>
>>>
>>> Regards,
>>> Selma.
>>>
>>> On Fri, 24 Nov 2023 at 19:48, Selma Vidimlic  wrote:
>>>
 Hi all,

 Merged PR from this week:

- Vector tiles update


 Open PR:

- 3d tiles  -
so, here I need to additionally describe properties (symbology, 3d view,
elevation menu), also the second section now is called *Scene, *but
I believe this will be changed. I'm looking forward to your feedback
(review).

 Still working on:

- geometry expressions


 Have a nice weekend,
 Selma.

 On Fri, 17 Nov 2023 at 17:15, Selma Vidimlic  wrote:

> Hello everyone,
>
> This week (and last week at the OSGeo meeting Vienna) I was working on
> documentation for 3D Tiles in QGIS. I used blog posts from Lutra 
> Consulting
> and North Road websites as the main source for the documentation, also I
> followed video tutorials and Martin Dobias explained 3D tiles to me while
> we were in Vienna. I'm planning to create a draft version in my GitHub
> repository (I will send you a link) so you can check it out. This is my
> first time creating a whole new chapter for documentation so I'm trying to

[QGIS-Developer] Shapefile not correctly shown in some areas

2024-01-12 Thread BastaPrint





Hello, 
To make things short, I have a device which gathers data in the fields 
(hundreds of data per second), and gets the position through a GPS (every 
second). 

Between 2 GPS positions, I triangulate the positions, so the points are 
aligned. 

Sometimes, the device "writes" the data so it spends some time doing so, and it 
does not gather anything, so I have a "hole". 



Then, to visualize the data, I create a Shapefile, only with Points. 



In one Shapefile, I had some strange points: points that appear on the map, but 
are not clickable and disappear when I zoom in too much. I attach the files ; 
they can be downloaded here, too: https://www.grosfichiers.com/sjNC3yx7Kvi 


For instance, in the file I join, the position number 1613 and further are 
problematic. If my viewing area includes the point 1612, I see all the points, 
well aligned, but I cannot click points 1613 and further. 

If I zoom in, or if I move the area and the point 1612 is out of the area, I 
see nothing anymore. 

The code to generate the Shapefile has a systematic approach: it takes the 
points one after the other, and writes their position by incrementing the 
values. So I suspect there is no bug. 
In a previous test, the same problem occured BEFORE point 1217 : I could only 
see the first points if the area included point 1217. 


Questions: 
- can anyone try to see my shapefile and confirm the problem? 

- does this bug ring a bell to anyone? 
- what may be the problem? 



Thank you very much! 

My versions are detailled below. I just updated to the LTR to try to solve the 
problem, but the bug exists with the 3.22.7-Białowieża and 3.28.14-Firenze 
versions. 




Aurélie 






Version de QGIS 
3.28.14-Firenze 
Révision du code
b09131c512 

Version de Qt   
5.15.3 

Version de Python   
3.9.5 

Version de GDAL/OGR 
3.8.2 

Version de Proj 
9.3.1 

Version de la base de données du registre EPSG  
v10.098 (2023-11-24) 

Version de GEOS 
3.12.1-CAPI-1.18.1 

Version de SQLite   
3.41.1 

Version de PDAL 
2.6.0 

Version du client PostgreSQL
unknown 

Version de SpatiaLite   
5.1.0 

Version de QWT  
6.1.6 

Version de QScintilla2  
2.13.4 

Version de l'OS 
Windows 10 Version 2009 






Extensions Python actives 

QGeoloGIS   
1.9.0 

db_manager  
0.1.20 

grassprovider   
2.12.99 

MetaSearch  
0.3.6 

processing  
2.12.99 

sagaprovider
2.12.99 




=== Previously = 




Version de QGIS 
3.22.7-Białowieża   
Révision du code
5a65627a 

Version de Qt   
5.15.3 

Version de Python   
3.9.5 

Version de GDAL/OGR 
3.4.3 

Version de Proj 
9.0.0 

Version de la base de données du registre EPSG  
v10.054 (2022-02-13) 

Version de GEOS 
3.10.2-CAPI-1.16.0 

Version de SQLite   
3.38.1 

Version de PDAL 
2.3.0 

Version du client PostgreSQL
13.0 

Version de SpatiaLite   
5.0.1 

Version de QWT  
6.1.6 

Version de QScintilla2  
2.13.1 

Version de l'OS 
Windows 10 Version 2009 































20240110-153600.prj
Description: Binary data


20240110-153600.cpg
Description: Binary data


20240110-153600.shp
Description: Binary data


20240110-153600.shx
Description: Binary data
___
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] Strange Mysql (spatial) behaviour: no points visible

2024-01-12 Thread Richard Duivenvoorde via QGIS-Developer

Hi Devs,

I was contacted by a company who after upgrading their db and QGIS did NOT see 
the points anymore.

Note that 'all worked' when they used QGIS 3.10 (and an older mysql db)
After a MySQL database upgrade, QGIS 3.10 was not able to connect anymore 
(apparently TLS issues), so they have to use 3.28 or higher.

A small export loaded in my local db was OK in QGIS.

So in a online meeting, sharing their screen I tried:

- opening the db with ogrinfo: all data is visible (POINT(.)) showing 
correct coords and attributes
- loading the table (25000 records) in QGIS: data: EPSG:31370 project 
EPSG:31370 :
- attribute table shows all records
- mapcanvas empty!
- able to 'zoom to' records (Belgium), but NO points visible/selectable
- creating a tiny table with only id and geom column of 3 records: mapcanvas 
emtpy
- export the loaded (but invisible) layer to a geopackage: points AND 
attributes VISIBLE!
- loading the data in dbeaver: all data is shown in the spatial tab

There was an encoding issue when exporting to gpkg, but we tried to create a 
smaller table (very few columns): nothing.

Anybody familiar with QGIS and Mysql has an idea what this not showing of any 
point/geom could be?

Any hint appreciated, I plan to try to get a connection to the db myself, but 
hoping I just miss something obvious...

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] Changing attributes of a newly created feature in Python form init code

2024-01-12 Thread WhereGroup

It kinda was...

I have custom widgets on another tab of the form for letting the user 
set up some things and I calculate values for attributes from that. So 
it is not solvable with default values. Very good idea though, I wish it 
would have been such an easy solution :))


When I posted also did not realise that it is not just about newly added 
features but different for:


a) A newly added feature
b) A feature was added but not yet committed to the data source
c) An existing feature

In the end I solved it by looking at the feature ID differently:

```
    feature_id = feature.id()
    if feature_id == -9223372036854775808:
    # this feature was newly added in this "form session"
    edit_buffer = layer.editBuffer()
    added_feats = edit_buffer.addedFeatures()
    # get the id of the most recently added feature in the edit buffer
    feature_id = min(list(added_feats.keys()))
    # otherwise we are looking at an existing feature, committed or not
    ... # layer.changeAttributeValue(feature_id, ...)
```

This works fine even if multiple forms are opened at the same time and 
OK is pressed on them in a random order.


I wonder if there is a named constant(?) or enum for that 
-9223372036854775808 (-2**63) somewhere. It is used by any new feature 
at that point in time.
https://github.com/qgis/QGIS/blob/a3413a9a9365fbd52ba6b0e2a6b9e55acc634cd4/tests/src/python/test_qgsvectorlayereditbuffer.py#L470 
says "ID is NULL (-9223372036854775808)" but I bet there is a better way 
in PyQt of saying "minimal INT64 value" instead of pasting the full 
value into the code like I did?


Many thanks to Stefanos and Frank for their thoughts!
I had cross-posted to 
https://gis.stackexchange.com/questions/474014/changing-attributes-of-a-newly-created-feature-in-python-form-init-code 
and the user Matt gave me pointers into the right direction.


Feels super ugly and probably not the intended way to do this kind of 
thing but WORKSFORME, done ;)


Cheers, Hannes

On 10.01.24 21:06, Stefanos Natsis via QGIS-Developer wrote:

Hi Hannes

This looks like an XY problem case!

If your actual goal is to:
> Any pointers on how to properly update a new feature's attribute 
fields,

> that exist on a layer but are not shown the user with the QGIS' widgets
> in the attribute form?

then you simply need to set a Default Value for the field widget but 
not add it to the drag and drop form designer. :)


If you really want to do this using form init code, you cannot do it 
using the form's feature object as it is actually copied 
by QgsAttributeForm before being saved to the layer.
You could connect to QgsAttributeForm::featureSaved() signal instead, 
that emits the actual feature, but apparently the my_form_open 
function is called twice: once when the form is loaded and once after 
OK is clicked (bug??), so that would create the connection twice!
To avoid this you could connect to QgsAttributeForm::featureSaved() 
only after OK is clicked!


Best
Stefanos


___
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