## Bug report #2224

### reshape tool doesn't work with a particular vector layer (shape, postgis, spatialite)

Status: | Closed | ||
---|---|---|---|

Priority: | Low | ||

Assignee: | Marco Hugentobler | ||

Category: | Digitising | ||

Affected QGIS version: | Regression?: | No | |

Operating System: | All | Easy fix?: | No |

Pull Request or Patch supplied: | Resolution: | fixed | |

Crashes QGIS or corrupts data: | Copied to github as #: | 12284 |

**Description**

Tested on shapes, postgis and spatialite on qgis trunk compiled today (ubuntu 9.04). As vector layer to reproduce the problem you can use the layer "regions" you can find in the spatialite sample dataset.

It does not happens will all the polygons in this layer, but it happens with the majority of them.

The console returns:

Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 54 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. Warning 1: Geometry of polygon of fid 59 cannot be translated to Simple Geometry. All polygons will be contained in a multipolygon. bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 bufferOriginalPrecision failed (TopologyException: depth mismatch at 347584 5.01011e+06), trying with reduced precision recomputing with precision scale factor = 1e+06 Scaler: offsetX,Y: 0,0 scaleFactor: 1e+06 [[ReScaler]]: offsetX,Y: 0,0 scaleFactor: 1e+06 Segmentation fault

### History

#### #1 Updated by Jürgen Fischer about 12 years ago

dc97c261 (SVN r12387) should fix the crash, but reshaping still doesn't work for the example.

#### #2 Updated by Giovanni Manghi about 12 years ago

true, reshaping doesn't work... at least in all the polygons that, before the fix, crashed qgis when using the tool...

**New description:**

Tested on shapes, postgis and spatialite on qgis trunk compiled today (ubuntu 9.04). As vector layer to reproduce the problem you can use the layer "*regions*" you can find in the spatialite sample dataset.

Reshape tool works with a few of the polygons in this layer, but does nothing with the majority of them.

#### #3 Updated by Marco Hugentobler about 12 years ago

Looks like a geos problem to me.

Please provide a link to the testdata.

#### #4 Updated by Giovanni Manghi about 12 years ago

http://www.gaia-gis.it/spatialite/test-2.3.sqlite.gz

I used the "regions" layer (also as shape and as postgis vector).

#### #5 Updated by Marco Hugentobler about 12 years ago

**Resolution**set to*fixed***Status**changed from*Open*to*Closed*

This should be fixed in 0d2607ed (SVN r12596)