[QGIS-trac] Re: [Quantum GIS] #1079: on the fly projections do not
work
Quantum GIS
qgis at qgis.org
Sun May 25 09:09:32 EDT 2008
#1079: on the fly projections do not work
--------------------------------------------------------------+-------------
Reporter: pcav | Owner: mhugent
Type: defect | Status: new
Priority: critical: causes crash or data corruption | Milestone: Version 0.9.2
Component: Projection Support | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: All
Must_fix: Yes | Status_info: 0
--------------------------------------------------------------+-------------
Comment (by hamish):
From the above linked nabble archive thread:
> This is Frank Warmerdam's answer :
> >
> > The problem is that if EPSG offers more than one transformation
> > to WGS84 for a datum, the automated translation gives up and
> > offers none of them preferring for the user to make the
> > decision themselves.
This bug has just been noticed on the grass-users list:
http://thread.gmane.org/gmane.comp.gis.grass.user/23928/focus=23948
I notice with my pet projection (NZ Map Grid epsg:27200) that the datum
transform is missing. (see screenshot attached to this bug; those are two
GRASS vector layers loaded with the GRASS plugin and taken from both WGS84
LL and NZMG locations)
I am working with QGIS 0.8.1 for Debian/Etch from backports.org package
(latest build available so far). Proj 4.6.0 and GDAL 1.4.4.0 from
backports.org too.
I notice that +datum=nzgd49 is missing from the srs.db version of the NZMG
projection versus what is in the EPSG file. The above note from Frank
explains that(?): there are typically 3 datum transform options used for
NZMG- the 3 term, the 7 term, and a NTv2 grid file (grid file distributed
with GRASS and PROJ.4).
I tried downloading the latest srs.db from SVN/trunk and replacing the one
in /usr/share/qgis/resources/. No change.
I next opened up the new srs.db in sqlitebrowser and edited the entry* and
added +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 which is the
standard 7-term transform used for +datum=nzgd49. No change. After that I
also threw +datum=nzgd49 into the string with no change. The new terms
shows up in the dialog if I go to the layer's "P"roperties projection
info, but in the terminal I see:
{{{
Debug: /tmp/buildd/qgis-0.8.1/src/gui/qgsproject.cpp:1065 4 properties
read
Debug: current properties:
Debug: name: properties
Debug: key: <SpatialRefSys> subkey: <SpatialRefSys>
Debug: name: SpatialRefSys
Debug: key: <ProjectSRSProj4String> value: +proj=nzmg
+lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +units=m
+no_defs
Debug: key: <ProjectionsEnabled> value: 1
Debug: key: <ProjectSRSID> value: 1555
Debug: key: <Gui> subkey: <Gui>
...
}}}
ie the binary seems to be pulling the SRS data from somewhere else as
well, and that somewhere else is not updated. And what is shown from
srs.db is just cosmetic? (at least at runtime)
[*] sqlitebrowser edit: Browse Data tab; Table: tbl_srs; Go to: 1555;
double click on parameters; Apply
[**] bonus: Firefox sqlite DB management GUI plugin:
https://addons.mozilla.org/en-US/firefox/addon/5817
It doesn't solve the general problem, but for NZMG I'd be happy with
hardcoding the 7-term transform above until the general problem is solved.
It isn't as good as using the grid file, but is a lot better than the
current 100m+ shift. I can upload a new srs.db binary to someone with
commit rights if it helps. (but is there more places to edit it?)
Plus if this gets fixed I can complain about ArcGIS 9.3's on the fly
reprojection ignoring the datum transform again. I feel guilty about doing
that while QGIS gets it wrong too. ;)
Hamish
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1079#comment:4>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list