Bug report #2703
Incorrect rendering for vector line segments that span -180 line of longitude version 1.4.0
|Affected QGIS version:||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||Copied to github as #:||12763|
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.
#1 Updated by Giovanni Manghi over 11 years ago
- Resolution set to wontfix
- Status changed from Open to Closed
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.