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

2024-01-13 Thread BastaPrint

Thanks a lot Andrea, you found the reason! 
The extent was wrong, and if I calculate & write it correctly, the file works. 
(Basically, I calculated it on the GPS points themselves, and not on the 
interpolated points, and it makes a difference because I interpolate points 
"before any GPS info" or "after the last GPS point"). 





To answer to other suggestions: 
- indeed, writing the file again from QGIS saves the new file in the right 
format 
- the .dbf file was not fautly. I had the same symptoms with or without it, so 
I did not mention it / send it. 

- I write the shapefiles "by hand", using the ESRI norm, playing around with 
the Little Endian and Big Endian formats (why did they make it so complex?). 



Thanks again ! 
Aurélie 


- Mail original -

De: "Andrea Giudiceandrea via QGIS-Developer"  
À: qgis-developer@lists.osgeo.org 
Envoyé: Samedi 13 Janvier 2024 11:47:33 
Objet: Re: [QGIS-Developer] Shapefile not correctly shown in some areas 

Hi all, 


> Colin Sare-Soar colin.saresoar at terrashape.co.uk 
> Fri Jan 12 19:21:21 PST 2024 
> I cannot see the point numbers or any info. The table is blank. 

This is due to the fact the the .dbf sidecar file which stores the 
fields names and values has not been provided or has not been created at 
all. 


> Il 12/01/2024 17:11, Aurélie Tisson (BastaPrint) via QGIS-Developer 
ha scritto: 
> 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. 

It looks like this issue is due to the fact that the extent stored in 
the .shp and in the .shx files is incorrect. 

As you can see in the Layer Properties / Information dialog window, the 
extent stored for such layer is: 

645765.5000,6860847. : 
645766.3750,6860852. 


The points with Feature ID from 0 to 34 and from 1613 to 2000 are 
outside such extent. 

As suggested by Richard, just exporting the layer in a new ESRI 
Shapefile layer will write the right extent in the .shp and .shx files 
and the issue will not occur using the new layer. 

While I guess there is an issue in the code used to create the ESRI 
Shapefile layer, which not correctly updates the extent of the created 
layer, I also see some issue in QGIS itself and or in the GDAL/OGR library: 

- QGIS should be less strict and also display the features outside the 
stored extent and or warn the user about the incorrect extent 
- the "Updade extent" functionality in the Layer Properties / Source 
dialog window seems not working, at least for ESRI Shapefile layers 
- the "Repair Shapefile" processing algorithm (based on GDAL/OGR 
functionality) doesn't repair the incorrect extent stored in the .shx file. 

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 
___
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] Shapefile not shown correctly in some areas

2024-01-13 Thread Colin Sare-Soar via QGIS-Developer
Thanks Andrea for clearing the shapefile question up.
I also write my own shapefiles programatically but haven't fallen foul of this 
particular item.
Regarding my post on this subject, I mentioned that I had no tooltips on any of 
the toolbar icons. I have searched the documantation but can't find any mention 
of tooltips. Do they go by another name in QGIS?
I tried the Settings/Interface customization menu item to see if there was a 
setting in there but the window just freezes. I cannot scroll down or click on 
anything.
I have only noticed this in the latest version that I have.

My system:

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


>  > Colin Sare-Soar colin.saresoar at terrashape.co.uk
>  > Fri Jan 12 19:21:21 PST 2024
>  > I cannot see the point numbers or any info. The table is blank.
> 
> This is due to the fact the the .dbf sidecar file which stores the
> fields names and values has not been provided or has not been created at
> all.
> 
> 
>  > Il 12/01/2024 17:11, Aurélie Tisson (BastaPrint) via QGIS-Developer
> ha scritto:
> > 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.
> 
> It looks like this issue is due to the fact that the extent stored in
> the .shp and in the .shx files is incorrect.
> 
> As you can see in the Layer Properties / Information dialog window, the
> extent stored for such layer is:
> 
> 645765.5000,6860847. :
> 645766.3750,6860852.
> 
> The points with Feature ID from 0 to 34 and from 1613 to 2000 are
> outside such extent.
> 
> As suggested by Richard, just exporting the layer in a new ESRI
> Shapefile layer will write the right extent in the .shp and .shx files
> and the issue will not occur using the new layer.
> 
> While I guess there is an issue in the code used to create the ESRI
> Shapefile layer, which not correctly updates the extent of the created
> layer, I also see some issue in QGIS itself and or in the GDAL/OGR library:
> 
> - QGIS should be less strict and also display the features outside the
> stored extent and or warn the user about the incorrect extent
> - the "Updade extent" functionality in the Layer Properties / Source
> dialog window seems not working, at least for ESRI Shapefile layers
> - the "Repair Shapefile" processing algorithm (based on GDAL/OGR
> functionality) doesn't repair the incorrect extent stored in the .shx file.
> 
> 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
___
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] Shapefile not correctly shown in some areas

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

Hi Aurélie,

I can reproduce your findings.

I'm not an expert on shapefile format, but how do you create the shapefile?

Is it possible that the shx file is not in line anymore with the shp/dbf file?
If I'm correct the shx is the shape-index file, probably used by QGIS or other 
tools to quickly find points within a bbox etc.
See: 
https://gis.stackexchange.com/questions/294868/explaining-difference-between-shx-and-shp-files-of-shapefile

I think your shp and shx file are not in line with each other anymore.

As a test, I exported your shapefile in QGIS to another shp file, and THAT copy 
works fine.

So I think you have to dive into your shp file creation software, and make sure 
it also update the shx OR (re)create the shx after creating shp and dbf

Regards & hth,

Richard Duivenvoorde

On 1/12/24 17:11, Aurélie Tisson (BastaPrint) via QGIS-Developer wrote:

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


___
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] Shapefile not correctly shown in some areas

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

Hi all,


> Colin Sare-Soar colin.saresoar at terrashape.co.uk
> Fri Jan 12 19:21:21 PST 2024
> I cannot see the point numbers or any info. The table is blank.

This is due to the fact the the .dbf sidecar file which stores the 
fields names and values has not been provided or has not been created at 
all.



> Il 12/01/2024 17:11, Aurélie Tisson (BastaPrint) via QGIS-Developer 
ha scritto:
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.


It looks like this issue is due to the fact that the extent stored in 
the .shp and in the .shx files is incorrect.


As you can see in the Layer Properties / Information dialog window, the 
extent stored for such layer is:


645765.5000,6860847. :
645766.3750,6860852.

The points with Feature ID from 0 to 34 and from 1613 to 2000 are 
outside such extent.


As suggested by Richard, just exporting the layer in a new ESRI 
Shapefile layer will write the right extent in the .shp and .shx files 
and the issue will not occur using the new layer.


While I guess there is an issue in the code used to create the ESRI 
Shapefile layer, which not correctly updates the extent of the created 
layer, I also see some issue in QGIS itself and or in the GDAL/OGR library:


- QGIS should be less strict and also display the features outside the 
stored extent and or warn the user about the incorrect extent
- the "Updade extent" functionality in the Layer Properties / Source 
dialog window seems not working, at least for ESRI Shapefile layers
- the "Repair Shapefile" processing algorithm (based on GDAL/OGR 
functionality) doesn't repair the incorrect extent stored in the .shx file.


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