#707 closed defect (fixed)
extent() wrong for newly created layers
Reported by: | browlingson | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Digitising | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | Linux |
Platform Version: | Awaiting user input: | no |
Description
Quite simply, when you create a new vector layer it seems the extents are wrong. Here's the full details:
Start qgis, load any old vector/raster layer just to get some well-defined view, then do Layer... 'New Vector Layer'. Give it an attribute and a name to save. The layer will be saved in a shapefile in a directory with that name.
Right click the layer in the legend and 'allow editing'. Use the 'Capture Point' tool to make some points and fill in the attribute value.
Right click the layer in the legend and go 'Properties', metadata tab shows extent, and the minx and miny are wrong - (0,0).
Deselect 'Allow Editing', and OK the 'save' dialog. Metadata tab extent still wrong.
Remove the layer from Qgis. Now add it back with the 'Add Vector Layer' menu entry - select the shapefile of the layer we just added with the editing tools. Props... Metadata... and the extent is correct...
Change History (5)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Component: | Build/Install → Digitising |
---|
comment:3 by , 17 years ago
Milestone: | → Version 0.9 |
---|
Hunted this down a bit. This only seems to happen if you add the points in the positive quadrant, ie NorthEast of (0,0). As soon as you add a point in the negative region the extent is correct.
The initial qgis view extent is (-1,-1) to (1,1), so if you start a fresh qgis try creating a new points layer in the top right, you should see the extent() fail to update.