Bug report #2349

Data not displayed with on the fly projection

Added by Chris Crook almost 15 years ago. Updated over 13 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Projection Support
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 #:12409

Description

When displaying vector data in a shape file using on the fly projection some data is not being displayed. I suspect that this is due to incorrectly determining a bounding box for the data in the source data coordinate system when the data is being selected for display.

To replicate:
Open a QGIS session. Attach the two attached shape files (testpoints, coastll) - grid of points and coastline. Change the project properties to on the fly projection and the projection to EPSG:2193 (New Zealand Transverse Mercator). Zoom to the extents of extents of the coastll layer. Note the position of the southernmost points of the testpoint layer in relation to the coastline. Pan the view upwards. Additional rows of testpoints are displayed at the southern edge of the grid which had been incorrectly clipped in the previous view. (see attached images prepan.png and postpan.png)

QGIS version - 1.4.0-Trunk, code revision 12569

bugdata.zip - test data and images (160 KB) Chris Crook, 2010-01-07 01:14 PM

History

#1 Updated by Giovanni Manghi almost 15 years ago

confirmed also under linux with qgis trunk

#2 Updated by Volker Fröhlich about 14 years ago

Confirmed for 1.6

#3 Updated by Richard Duivenvoorde over 13 years ago

Investigating this it appears only to show up if the dateline (180/-180) is in the mapcanvas view.

As soon als you pan the 180/-180 line out of the mapcanvas points are shown normally.

Probably a dateline problem?

See also #3508 and #2426

By the way, found info for openlayers which is maybe related: http://trac.osgeo.org/openlayers/ticket/487

#4 Updated by Markus Neteler over 13 years ago

Perhaps an issue of the global wrap around not handled correctly? See my comment in #3508

#5 Updated by Chris Crook over 13 years ago

Replying to [comment:4 rduivenvoorde]:

As soon als you pan the 180/-180 line out of the mapcanvas points are shown normally.

Probably a dateline problem?

I don't think this is a dateline problem. Could test (but haven't yet) by creating a data set elsewhere that is spanning the central meridian of a TM projection (which I do think is the issue)

My original observation (I suspect that this is due to incorrectly determining a bounding box for the data in the source data coordinate system when the data is being selected for display) is probably a bit cryptic

What I think is the issue is that the bounding box for the view window is defined in terms of the canvas coordinate system. I think this may be converted to the layer coordinate system by converting the coordinates of the extreme points of the bounding box. However when the view extents are transformed to the layer coordinate system it is no longer a rectangle aligned with the coordinate axes. So the transformed coordinates of the corners of the extents do not correspond to the corners of the bounding box of the transformed view extents. What this means is that some points get incorrectly filtered out of the view based on the incorrectly transformed bounding box.

Resolving this is a non-trivial problem!

#6 Updated by Jürgen Fischer over 13 years ago

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

duplicate of #2426

Also available in: Atom PDF