simplipy icon indicating copy to clipboard operation
simplipy copied to clipboard

Error: Parent's children is not in children parents

Open jcarax opened this issue 9 years ago • 4 comments

I would like to simplify the following Shapefile but end up with an error. Any thoughts / advice?

Thanks you! Julian

`Simplipy 0.52 Log: Algorithm: douglas Parameters: epsilon = 0.5 Constraints: prevent_shape_removal = False repair_intersections = True simplify_shared_edges = True expandcontract = None simplify_non_shared_edges = True prevent_shape_removal_min_points = 3 use_topology_snap_precision = 0.5

use_topology = True

Start simplify fill chain db simplify features Progress = Start Progress = Repairing intersectionsIteration 1 AVERAGE = 0.00 Progress = Done! return wkbs chain error: geomidx=7, chain=29937 Traceback (most recent call last):

File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\simplipy.py", line 770, in doWork wkb = cdb.to_wkb(key) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1310, in to_wkb geom = self._build_geometry(i) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1182, in _build_geometry subgeom = self._build_geometry(j) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1191, in _build_geometry subgeom = self._build_geometry(j) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1200, in _build_geometry points_data_list = self._build_retrieve_chain_points(geom_idx) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1296, in _build_retrieve_chain_points raise Exception("Inconsistency: Parent's children is not in children parents".format(gtype)) Exception: Inconsistency: Parent's children is not in children parents

Error simplifying:Thread job finished! Simplification Stats: Total features = 1 / 1621 (0.06%) Total size (KB) = 153.041 / 86361.466 (0.18%) Total time = 334 seconds

Inconsistency: Parent's children is not in children parents

Traceback (most recent call last): File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\simplipy.py", line 770, in doWork wkb = cdb.to_wkb(key) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1310, in to_wkb geom = self._build_geometry(i) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1182, in _build_geometry subgeom = self._build_geometry(j) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1191, in _build_geometry subgeom = self._build_geometry(j) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1200, in _build_geometry points_data_list = self._build_retrieve_chain_points(geom_idx) File "C:/Users/Julian Carax/.qgis2/python/plugins\simplipy\afcsimplifier\simplifier.py", line 1296, in _build_retrieve_chain_points raise Exception("Inconsistency: Parent's children is not in children parents".format(gtype)) Exception: Inconsistency: Parent's children is not in children parents`

Version: QGis 2.6.12 (Win64)

jcarax avatar Oct 05 '16 11:10 jcarax

Hi Julian, thanks for reporting this.

There's a bug related to 'infer topology' which is causing this issue. I'm already working on a fix which requires re-doing a big part of the code, so it may take a while to finish.

I will make sure this shapefile can be simplified in the next simplipy version

Thanks!

albertferras avatar Oct 07 '16 11:10 albertferras

Hi Albert,

thanks for your time. Sounds great! Do you already have a timeline?

Thanks Julian

jcarax avatar Oct 12 '16 07:10 jcarax

HI @jcarax and sorry for the late reply. I've recently moved to a new flat and barely had time to do anything in the last months :)

I continued with my work 1 week ago, so I expect that if I don't have any big problems I will have the next version in 1~2 months (need to do a big refactor of a core part)

Thanks

albertferras avatar Jan 06 '17 09:01 albertferras

Hi,

Basically +1 for also having this error, and interestingly it's a very similar shapefile I'm discovering the issue with. Still Canada, but it's the "gcsd000b11a_e" rather than the "gsfa..." example above.

Same error, but it creates 135 shapes out of >5000 before throwing the "Parent's children is not in children parents" error.

This was repeatable on both Win10 and Ubuntu with QGIS, python2.7

Thanks,

whelks-chance avatar Aug 30 '17 14:08 whelks-chance