Bug report #15419

Geometry displays incorrectly

Added by Evgeniy Z over 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:High
Assignee:Even Rouault
Category:Symbology
Affected QGIS version:2.16.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23347

Description

Hello.
QGIS 2.12, 2.16.
Some of geometry (Polygons) such as from shapefiles displayed incorrectly. I am talking about polygons with rings inside. This polygons display as filled polygons without rings.
In most cases, if you do not check it in advance, you can miss the fact that inside of those rings there might be an object. Also you can miss fact that inside of polygon there might not be some area. If I use "Geometry checker" or "Topology checker" I can see that some geometries are incorrect. But for large projects doing this on a regular basis is extremely unconfortable.
In other GIS when I add shapefile with incorrect geometries (from QGIS point of view) to project it displays all objects correctly or I can see what needs to be.

In attachments demonstrate situation when inside polygon deleted ring and formed other polygon.

qgis_fill_polygon.PNG - Incorrect polygon with ring inside in QGIS looks like filled polygon (46.2 KB) Evgeniy Z, 2016-08-10 09:50 AM

qgis_polygon_checked.PNG - Incorrect polygon with ring inside in QGIS identified by Topology Checker (77 KB) Evgeniy Z, 2016-08-10 09:50 AM

ArcView_polygon_correctly.PNG - Polygon with ring inside in ArcView looks correctly (13 KB) Evgeniy Z, 2016-08-10 09:50 AM

incorrect_shape.zip - Shapefile with incorrect polygon (1.4 KB) Evgeniy Z, 2016-08-10 09:50 AM

Associated revisions

Revision 89326395
Added by Even Rouault about 3 years ago

QgsSymbol::renderFeature(): render larger parts of multipolygon first

When drawing an invalid multipolygon, that has a part inside another one,
there is a chance we draw first the smaller part and then the larger part,
making it invisible.
Change the drawing order to start with larger parts.

Fixes #15419

History

#1 Updated by Even Rouault about 3 years ago

  • Assignee set to Even Rouault

#2 Updated by Even Rouault about 3 years ago

  • Status changed from Open to Closed

#3 Updated by Even Rouault about 3 years ago

  • Resolution set to fixed/implemented
  • Target version set to Version 3.0
  • Category set to Symbology

Backport to master_2 is not practical at all.

Also available in: Atom PDF