Tuesday, 17 April 2018

shapefile - "Phantom" features showing up in QGIS?


I am using QGIS 2.4 on Windows 8.1. I have a project in which I have been digitizing from OpenMaps. Last night I was doing some more digitizing, saved, and closed the program. When I opened it this morning, my layers (.shp) were not projected properly, even though they were when I saved and exited. I closed, and re-opened, and they were projected properly (so weird thing #1). However, when I went to go back to digitizing, I noticed that I have some features of a layer showing up that do not exist anymore (I deleted them yesterday). These features show up only at certain zoom levels, and are not selectable. Screenshots attached.


Any idea what this means?


enter image description here


enter image description here


"Phantom" features, in the "Brush" layer. The first image is what it SHOULD look like, and the second image is what I see when I zoom out. This is happening in other layers as well.



Answer



The "Phantom" feature likely is an invalid one, you should try to make valid it. To fix the feature you can:



  1. use the Check Geometry tool (Vector->Geometry tools->Check Geometry Validity). This allows you to find invalid geometries. In this case you have to fix the feature manually by editing it.



enter image description here



  1. use the Processing LWGEOM plugin: Plugins->Manage and Install plugins and searching for "lwgeom". The plugin has to be configured from Processing->Options->Provider->LWGEOM algorithms and setting the Path to liblwgeom library. The lwgeom library may be installed from OSGeo4W installer. In Windows it is named liblwgeom.dll (liblwgeom.so for Linux). Once configured run the Make Valid algorithm by the Processing Toolbox in order to valid your layer.


enter image description here


There would be also the Topology checker plugin (Vector->Topology Checker), but the tools mentioned above should be enough to track and fix the problem.


The problem with the CRS is odd, you could try to fix the layer before and maybe the problem will disappear. Hope this helps.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...