Opened 14 years ago

Closed 14 years ago

#2703 closed bug (wontfix)

Incorrect rendering for vector line segments that span -180 line of longitude version 1.4.0

Reported by: abigbee Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.5.0
Component: Vectors Version: 1.4.0
Keywords: vector rendering Cc:
Must Fix for Release: Yes Platform: Windows
Platform Version: Windows revision 12728 Awaiting user input: no

Description

Polygons in vector layers that have line segments with endpoints that span the -180 line of longitude are incorrectly rendered. For example, a line with endpoints of 1 degree and -179 degree will not result in a 2 degree line, but rather be rendered as a line of of 180 degrees in length and spans. I.e. instead of a short line segment in the Pacific, the line runs across North America and the Atlantic.

I have attached a small test case for a many-side polygon esri shape file that I programmatically generated to illustrate this bug. Upon rendering in the GUI, the left side of the western polygon should incorrectly be extruded all the way across North America and the Atlantic Ocean. The correct rendering would display a circle-like polygon centered on the Alaskan Aleutian Islands.

Attachments (3)

bug_sample.png (227.1 KB ) - added by abigbee 14 years ago.
Screen snapshot
bug_sample.shp (2.3 KB ) - added by abigbee 14 years ago.
Shapefile
bug_sample.shx (116 bytes ) - added by abigbee 14 years ago.
Index file for shapefile

Download all attachments as: .zip

Change History (4)

by abigbee, 14 years ago

Attachment: bug_sample.png added

Screen snapshot

by abigbee, 14 years ago

Attachment: bug_sample.shp added

Shapefile

by abigbee, 14 years ago

Attachment: bug_sample.shx added

Index file for shapefile

comment:1 by lutra, 14 years ago

Resolution: wontfix
Status: newclosed

Have a look to the "5.2.6" paragraph of the QGIS 1.4 manual: "Vector layers crossing 180◦ longitude".

This is a common problem in many GIS software and there is no easy solution. The one proposed is to use Postgis and the "ST_Shift_Longitude" function.

Note: See TracTickets for help on using tickets.