[Qgis-developer] Re : Problem when using spatial index

Junior delazj at gmail.com
Thu Jan 22 00:18:42 PST 2015


Hi,
Then fix the layer with duplicate nodes. As stated here [1], it can be done with the tool in vector menu > Geometry tools > Simplify geometry (setting the tolerance to 0)

[1] http://docs.qgis.org/2.2/en/docs/user_manual/plugins/plugins_ftools.html

Envoyé depuis mon HTC

----- Reply message -----
De : "Nejia Ben Nasr" <nejia.bennasr at spaceyes3d.com>
Pour : "'Junior Delaz'" <delazj at gmail.com>
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 16:11

To inderstant the source of problem, if it’s caused by invalid geometry I do this:-          I load only a shapefile containing geometry with duplicate nodes and I remove file .qix, here the problem appear: the spatial index is atomically created and I can’t see all feature when I zoom or navigate in the map. -          I have another shapefile containing some rows without geometry, I load only it in Qgis and I create a spatial index, here there is no problem   De : Junior Delaz [mailto:delazj at gmail.com] 
Envoyé : mercredi 21 janvier 2015 14:57
À : Nejia Ben Nasr
Objet : Re: [Qgis-developer] Problem when using spatial index I assume duplicate nodes invalidate geometry but I don't think such thing can create the current bug. OGR/GEOS guru?
But if I understand your second sentence, you have a shapefile containing some rows without geometry. Right? So, what do u mean by "I don't have a problem with this file"? Is it another file or the file on which you're creating the spatial index? 
You should :
- open a new project and add only the problematic file 
- or delete from your current project the file with empty geometry (if it's not the one you're creating spatial index on)
to see how it reacts when zooming in/out ...
2015-01-21 14:26 GMT+01:00 Nejia Ben Nasr <nejia.bennasr at spaceyes3d.com>:The  problem appears with vector layers that contain geometries that containing duplicate node(s), it’s considered as an invalid geometry ?When I select all features from the bounding box of the vector layer, lines of features that has a null geometry are not selected in the attribute table (I don’t have a problem with this shapefile). Thanks,NejiaDe : Junior [mailto:delazj at gmail.com] 
Envoyé : mercredi 21 janvier 2015 13:47
À : Nejia Ben Nasr
Cc : 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index

weird, it worked for others. 
And if you spatially select all your features, are all the lines in the attribute table being selected?
You haven't answered about checking geometry validity...

Envoyé depuis mon HTC
----- Reply message -----
De : "Nejia Ben Nasr" <nejia.bennasr at spaceyes3d.com>
Pour : "'Junior'" <delazj at gmail.com>
Cc : "'qgis-developer'" <qgis-developer at lists.osgeo.org>
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:30
Yes, even if I delete the .qix before saving !! Thanks,Nejia De : Junior [mailto:delazj at gmail.com] 
Envoyé : mercredi 21 janvier 2015 13:23
À : Nejia Ben Nasr
Cc : 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
And if you delete the .qix before saving? And then recreate it...

Envoyé depuis mon HTC
----- Reply message -----
De : "Nejia Ben Nasr" <nejia.bennasr at spaceyes3d.com>
Pour : "'Junior Delaz'" <delazj at gmail.com>
Cc : "'qgis-developer'" <qgis-developer at lists.osgeo.org>
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:14
I already tried to save to anther shapefile and edit it (add, modify, remove features …) the .qix was automatically created and I get the same problem Thanks,Nejia De : Junior Delaz [mailto:delazj at gmail.com] 
Envoyé : mercredi 21 janvier 2015 12:21
À : Nejia Ben Nasr
Cc : qgis-developer
Objet : Re: [Qgis-developer] Problem when using spatial index Some users [1] have already encountered this issue and i understood that it may be related to non correspondance between the number of rows in the .dbf file and number of geometry (some rows had no geometry). A simple "Save As.." to another shapefile has solved the problem.
[1] http://georezo.net/forum/viewtopic.php?id=95143 (in french, sorry )
2015-01-21 9:16 GMT+01:00 Nejia Ben Nasr <nejia.bennasr at spaceyes3d.com>:Hi, Do you think that this problem is often caused by geometry problems? Thanks,Nejia De : Junior [mailto:delazj at gmail.com] 
Envoyé : mardi 20 janvier 2015 13:41
À : Nejia Ben Nasr; 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
Hi,
Nejia, what about the validity of the geometry of your features? You can check with the tool in Vector menu > Geometry tools > check geometry validity

Envoyé depuis mon HTC
----- Reply message -----
De : "Nejia Ben Nasr" <nejia.bennasr at spaceyes3d.com>
Pour : "'qgis-developer'" <qgis-developer at lists.osgeo.org>
Objet : [Qgis-developer] Problem when using spatial index
Date : mar., janv. 20, 2015 13:03
I use QGIS 2.6.1 De : qgis-developer-bounces at lists.osgeo.org [mailto:qgis-developer-bounces at lists.osgeo.org] De la part de Nejia Ben Nasr
Envoyé : mardi 20 janvier 2015 09:39
À : qgis-developer
Objet : [Qgis-developer] Problem when using spatial index
Hi all, I load a shapefile, then I create a spatial index to maximize speed of zoom and navigate in the map.The problem is: when I zoom to any area feature appear and other doesn’t.And it seems To me that the spatial index is automatically created even when I delete the .qix file  Best regards,Nejia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150122/096c7b49/attachment-0001.html>


More information about the Qgis-developer mailing list