Opened 17 years ago
Closed 15 years ago
#597 closed defect (fixed)
lat/lon maps should wrap around 180 longitude
Reported by: | Owned by: | nobody | |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.2.0 |
Component: | Projection Support | Version: | Trunk |
Keywords: | Cc: | pcav | |
Must Fix for Release: | No | Platform: | Debian |
Platform Version: | Awaiting user input: | no |
Description
Hi,
lat/lon maps which cross 180 longitude don't wrap.
This should at least happen when only one of -180,+180 is in view and nothing needs to be duplicated.
thanks,
Hamish
Attachments (1)
Change History (8)
by , 17 years ago
Attachment: | ll_nz_0.7.4.png added |
---|
comment:1 by , 17 years ago
In that screenshot, the Chatham Islands on the far left should be within the grid (~176W). The grid runs from 160 to 185 (=175W).
Hamish
comment:2 by , 17 years ago
test data: shapefile of New Zealand and offshore islands; extracted from the NOAA GSHHS dataset. (520k)
Hamish
follow-up: 5 comment:3 by , 17 years ago
Hamish,
The 180 degree line is a problem for most gis packages, qgis included.
A work-around that I use a lot is to transform the longitude data to 0->360. If your data is in postgis, recent versions include a shift_longitude (or something like that) that can be used to move the discontinuity to somewhere else. I also think that the proj4 library now supports a shift longitude feature that allows one to define a custom projection that does the shift too.
Another option that I use sometimes is to get qgis to convert the lat/long data to a projected coordinate system that doesn't have a discontinuity in the wrong place (e.g. NZGD2000 for your example dataset).
Gavin
comment:4 by , 17 years ago
Milestone: | → Version 0.8.2 Release |
---|
comment:5 by , 15 years ago
Awaiting user input: | unset |
---|---|
Cc: | added |
Milestone: | Version 1.0.3 → Version 1.2.0 |
Version: | 0.8 → HEAD |
Replying to g_j_m:
A work-around that I use a lot is to transform the longitude data to 0->360. If your data is in postgis, recent versions include a shift_longitude (or something like that) that can be used to move the discontinuity to somewhere else.
Hi, I'm testing this workaround and is fine for points, but I'm struggling with other geometries. Can you please post a working example for polygons? Thanks.
comment:6 by , 15 years ago
Forget it, it worked also for polygons.
As for other cases, if there is no easy solution for problems such this one, and the there is a workaround, I suggest to wrote a note for the documentation/manual.
I can do that, agree?
comment:7 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
We added a PostGIS subsubsection to the QGIS manual for 1.2 release. Thanks for testting and to Giovanni for the manual patch.
Otto
screenshot of New Zealand and offshore islands not wrapping at 180 lon QGIS 0.7.4 Debian package