Bug report #651

Zoom to layer does not work if layer has only one point

Added by maris-gis-gmail-com - about 17 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
Affected QGIS version:2.2.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:10710

Description

In new QGIS work session I added new vector layer (shapefile) with single point and QGIS showed me nothing. I clicked "Zoom to layer" and still nothing, "Zoom full", "Zoom to selection" and still nothing. Then I added other vector layer with more data, clicked "Zoom to layer" on second layer and then both layers where displayed correctly. Still "Zoom to layer" was not working correctly for layer with single data point.

QGIS 0.8.0
Qt 4.2.2
GDAL/OGR 1.3.2

ogrinfo ariports.shp ariports
INFO: Open of @ariports.shp'
using driver @ESRI Shapefile' successful.

Layer name: ariports
Geometry: Point
Feature Count: 1
Extent: (23.975832, 56.922447) - (23.975832, 56.922447)
Layer SRS WKT:
GEOGCS["GCS_North_American_1983",
    DATUM["North_American_Datum_1983",
        SPHEROID[[GRS_1980]],
    PRIMEM[[Greenwich]],
    UNIT[[Degree]]
id: Integer (10.0)
f_code: String (5.0)
iko: String (4.0)
nam: String (18.0)
use: Integer (10.0)
zv3: Integer (10.0)
soc: String (3.0)
tile_id: Integer (5.0)
end_id: Integer (10.0)
OGRFeature(ariports):0
  id (Integer) = 1
  f_code (String) = GB005
  iko (String) = Null
  nam (String) = RIGA INTERNATIONAL
  use (Integer) = 22
  zv3 (Integer) = 10
  soc (String) = LVA
  tile_id (Integer) = 1
  end_id (Integer) = 1
  POINT (23.975831985473633 56.922447204589844)

Airport.tar.gz - Shapefile for testing (514 Bytes) maris-gis-gmail-com -, 2007-03-12 02:36 PM

Associated revisions

Revision bca35539
Added by Martin Dobias almost 10 years ago

Fix #651 (zoom to layer with one point does not work)

History

#1 Updated by Gavin Macaulay - about 17 years ago

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

Fixed in (head) and (0.8 branch).

#2 Updated by Anonymous over 14 years ago

Milestone Version 0.8.2 deleted

#3 Updated by Filipe Dias about 10 years ago

  • Pull Request or Patch supplied set to No
  • Resolution deleted (fixed)
  • Operating System deleted (Gentoo)
  • Priority changed from Low to Severe/Regression
  • Assignee deleted (nobody -)
  • Status changed from Closed to Reopened
  • Status info deleted (0)
  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to 2.2.0

Zoom to layer no longer works with shapefiles with only one point. Tested on QGIS 2.2.0 and QGIS Master.

#4 Updated by Martin Dobias almost 10 years ago

  • Status changed from Reopened to Closed

#5 Updated by Martin Dobias almost 10 years ago

By the way, please do not reopen old bug reports - in most of the cases the actual problem is not relevant to the original bug any more.

#6 Updated by Martin Dobias almost 10 years ago

  • Target version set to Version 2.4

Also available in: Atom PDF