https://issues.qgis.org/https://issues.qgis.org/favicon.ico2014-02-05T22:09:46ZQGIS Issue TrackingQGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=481632014-02-05T22:09:46ZKay F. Jahnke
<ul><li><strong>File</strong> <a href="/attachments/download/6739/ctrn-koordinatenproblem1.jpg">ctrn-koordinatenproblem1.jpg</a> added</li></ul><p>I also have a problem with the on-the-fly reprojection, using QGIS 2.0.1 on a Kubuntu 12.04 system. Find attached a screenshot of a QGIS session with the same shapefile data loaded twice. One layer (red stars) is in the same coordinate system as the project (EPSG:32632 - WGS 84 / UTM zone 32N), the other one (green dots) is in EPSG:3003, created from the original shapefile by running ogr2ogr on it with a coordinate system transform:</p>
<p>ogr2ogr -a_srs EPSG:3003 -t_srs EPSG:3003 CTRN_s051080p_point_3003.shp CTRN_s051080p_point.shp</p>
<p>There is a systematic error; the on-the-fly reprojection should place the red stars and green dots at the same location.</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=482032014-02-07T01:11:48ZKay F. Jahnke
<ul></ul><p>I found the error: The definition of one of my CRSs was incomplete. The Proj4 string QGIS provided for EPSG:3003 was</p>
<p>+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs</p>
<p>when I browsed in postgis...</p>
<p>select proj4text from spatial_ref_sys where auth_srid = 3003 ;</p>
<p>... I found another definition for EPSG:3003:</p>
<p>+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs</p>
<p>using a custom CRS with this specification instead of the QGIS-provided spec for EPSG:3003 solved my problem. What was missing was the towgs part in the definition.</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=482292014-02-07T04:37:23ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>invalid</i></li></ul><p>without those parameters is normal that you get a shift.</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=482612014-02-07T06:52:58ZThomas Baumanntbaumann@tum.de
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>Thank you for the feedback and sorry to reopen this bug.</p>
<p>It might well be that there are some parameters missing for the on-the-fly reprojection. However, this does not explain why</p>
<p>a) a file will work correctly if used with qgis-master as of November 2013 and not with current versions, which is a real show stopper.</p>
<p>b) the street names are plotted correctly and the streets are not.</p>
<p>Maybe this is not related to postgis at all, but it seems that someone should look into the way those parameters are handled. As Kay said, he had to add the missing parameters manually, because they were missing in the proj4 string provided by QGIS.</p>
<p>Thanks again.</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=485592014-02-13T08:36:14ZJürgen Fischerjef@norbit.de
<ul></ul><p>Kay F. Jahnke wrote:</p>
<blockquote>
<p>I found the error: The definition of one of my CRSs was incomplete. The Proj4 string QGIS provided for EPSG:3003 was</p>
<p>+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs</p>
</blockquote>
<p>I suppose this comes from you GDAL install. The current <code>resources/srs.db</code> in master has</p>
<pre>
sqlite> select parameters from tbl_srs where auth_id='3003';
+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs
</pre>
<p>But the <code>srs.db</code> get synced with GDAL by running <code>crssync</code> on package install. So I suppose you're output comes from an older GDAL version.<br />GDAL 1.10 for instance also has:</p>
<pre>
gdalsrsinfo epsg:3003
PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs '
...
</pre>
<p>Which version of GDAL are you running?</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=485602014-02-13T08:36:25ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Feedback</i></li></ul> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=489482014-02-21T00:42:14Zleolami -leolami@foo.bar
<ul><li><strong>File</strong> <a href="/attachments/download/6839/lizmap.png">lizmap.png</a> added</li><li><strong>OS version</strong> changed from <i>openSUSE 13.1</i> to <i>openSUSE 13.1, Ubuntu 12.04 LTS</i></li><li><strong>Affected QGIS version</strong> changed from <i>master</i> to <i>2.0.1</i></li></ul><p>Hi all,</p>
<p>I have the same problem with the same srs (3003).<br />In my QGis project I set a on-the-fly reprojection to 3857 and all is ok<br />In Lizampa webgis my 3003 layers are offset than OSM of 100 mt about.</p>
<p>I'm using:<br />Ubuntu Server 12.04 LTS<br />Lizmap 2.9.0<br />qgis-mapserver: 2.0.1-2+precise1<br />gdal-bin: 1.10.0-1~precise1<br />proj4: 4.8.0-3~precise5</p>
<p>gdalsrsinfo epsg:3003<br />PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs '</p>
<p>There is also a strange thing:<br />By Lizmap plugin I have setted a search on my 3003 street layer, with geometry visualization option.</p>
<p>The highlight result geometry is correctly positioned on OSM, like you can see on the attacched picture....<br />The red arrow shows the offset from my 3003 layer and OSM, the green arrow show the search result of the same street.</p>
<p>Thank of all<br />Leonardo</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=490042014-02-23T02:51:22ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><blockquote>
<p>Which version of GDAL are you running?</p>
</blockquote>
<p>at the time the ticket was filed qgis master in the nightly repo was buiding against gdal 1.7, probably the source of this issue.</p>
<p>closing for lack of feedback.</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=490052014-02-23T02:53:57ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/6849/teste.png">teste.png</a> added</li></ul><p>leolami - wrote:</p>
<blockquote>
<p>Hi all,</p>
<p>I have the same problem with the same srs (3003).<br />In my QGis project I set a on-the-fly reprojection to 3857 and all is ok<br />In Lizampa webgis my 3003 layers are offset than OSM of 100 mt about.</p>
<p>I'm using:<br />Ubuntu Server 12.04 LTS<br />Lizmap 2.9.0<br />qgis-mapserver: 2.0.1-2+precise1<br />gdal-bin: 1.10.0-1~precise1<br />proj4: 4.8.0-3~precise5</p>
<p>gdalsrsinfo epsg:3003<br />PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs '</p>
<p>There is also a strange thing:<br />By Lizmap plugin I have setted a search on my 3003 street layer, with geometry visualization option.</p>
<p>The highlight result geometry is correctly positioned on OSM, like you can see on the attacched picture....<br />The red arrow shows the offset from my 3003 layer and OSM, the green arrow show the search result of the same street.</p>
</blockquote>
<p>seems ok here, same OS, same version, latest LizMap, OSM data downloaded and saves into PostGIS with 3003 CRS</p> QGIS Application - Bug report #9350: reprojected postgresql layers are plotted with offset and very slowhttps://issues.qgis.org/issues/9350?journal_id=490812014-02-24T09:42:19ZThomas Baumanntbaumann@tum.de
<ul></ul><p>Ok with QGIS 2.2 and gdal was never below 1.8, currently 1.10.<br />Also speed of postgis operations is back to normal with the released version 2.2. Any kind of debug code in qgis-master?</p>
<p>Thanks.</p>