Opened 14 years ago

Closed 13 years ago

#2349 closed bug (fixed)

Data not displayed with on the fly projection

Reported by: ccrook Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Projection Support Version: Trunk
Keywords: projection display Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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

Attachments (1)

bugdata.zip (160.4 KB ) - added by ccrook 14 years ago.
test data and images

Download all attachments as: .zip

Change History (8)

by ccrook, 14 years ago

Attachment: bugdata.zip added

test data and images

comment:1 by lutra, 14 years ago

Platform: WindowsAll

confirmed also under linux with qgis trunk

comment:2 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:3 by volter, 13 years ago

Confirmed for 1.6

comment:4 by rduivenvoorde, 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

comment:5 by neteler, 13 years ago

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

in reply to:  4 comment:6 by ccrook, 13 years ago

Replying to 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!

comment:7 by jef, 13 years ago

Resolution: fixed
Status: newclosed

duplicate of #2426

Note: See TracTickets for help on using tickets.