Opened 7 years ago

Closed 7 years ago

#4027 closed enhancement (fixed)

OGR shapefile driver, update layer extent on modifcation

Reported by: silyko Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

When a shapefile is opened in update mode with the OGR driver and geometries are modified, the extents of modified layers might come out wrong, e.g. when "moving" a point on the boundary of the previous extent or simply "moving" the entire layer. As clarified by Even Roault, this is due to the fact that the "old" extent is still stored and the new extent will be the minimal bounding box of "old" and "new" extents. Of course it can be costly to recalculate the extent of the entire layer on every modification, but perhaps there could be an explicit method to force this? (Which Qgis-devs could then call on edited layers, since extents of manually edited layers in Qgis also come out wrong.)

Change History (1)

comment:1 Changed 7 years ago by Even Rouault

Milestone: 1.9.0
Resolution: fixed
Status: newclosed

Fixed in trunk.

r22130 Shapefile driver: add special SQL command 'RECOMPUTE EXTENT ON layer_name' to force recomputation of the layer extent. Usefull when updating or deleting features (#4027)

r22131 Test RECOMPUTE EXTENT ON (#4027)

Note: See TracTickets for help on using tickets.