Bug report #9266

QGIS gets stuck during on the fly reprojection

Added by Thomas Baumann almost 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System:openSUSE Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17880

Description

Hi,

I'm using qgis-master together with postgis 2.1.1. Usually I use the packages for openSUSE provided by Applicaten::Geo. The last version installed was from 20131104. This version is working fine.
Newer versions starting from 20131219 fail to load my project files:

postgis holds openstreetmap data in EPSG:900913 and pointdata in EPSG:31468. Project crs is 31468 On the fly reprojection is activated. For testing qgis was started from scratch (without additional plugins, personal settings removed)

With QGIS master after 20131104 (first version tested 20131219) I get a diolog box asking me for the reprojection parameters for the osm layers

"select datum transform for layer planet_osm_line"

According to the location of my project I chose EPSG:1777

After a while I get a popup with the following error message

forward transform of (-3.141593, -1.570796)
PROJ.4: +proj=merc +a=6318137 +b 6378137 +lat_ts=0.0
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
+nadgrids=@null +wktext +no_defs +to +proj=tmerc
+lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0
+ellps=bessel
+towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +unit=m
+no_defs
Error: latitude or longitude exceeds limits

Closing this window is possible, but qgis is stuck and does not display anything.
I checked with today's git version but the error persists.

I will be happy to provide further assistance in tracking down this error. However, as the error occurs with a postgis database it might be difficult to provide a testcase.

Thanks,
Thomas

qgis-20131104-pglog.log Magnifier (94 KB) Thomas Baumann, 2013-12-30 12:07 PM

qgis-20131230-pglog.log Magnifier (117 KB) Thomas Baumann, 2013-12-30 12:07 PM

natural.dbf (176 KB) Karl Brix Zinglersen, 2014-02-11 06:10 AM

natural.prj (144 Bytes) Karl Brix Zinglersen, 2014-02-11 06:10 AM

natural.shp (1.15 MB) Karl Brix Zinglersen, 2014-02-11 06:10 AM

natural.shx (18.6 KB) Karl Brix Zinglersen, 2014-02-11 06:10 AM

History

#1 Updated by Giovanni Manghi almost 11 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Status changed from Open to Feedback
  • Category set to Projection Support

Does this happens also with shapefiles? Can you attach a sample project/data?

#2 Updated by Thomas Baumann almost 11 years ago

Shapefiles are ok, as far as I know, although the dialog for the selection of the datum transformation does not turn up ion previous versions and maybe could be a little bit more informative.

Problems turn up if a postgis layer is selected. I went into postgres and I'm attaching the logs from the start of Qgis until the map is displayed (version as of 131104 qgis-20131104-pglog.log) or until I killed the process because I got tired (version as of today qgis-20131230-pglog.log)

Today's QGIS is correctly using st_estimatedextent instead of st_estimated_extent (running PostgreSQL 9.2.6 and Postgis 2.1.1).
The main difference is that the binary cursor is declared without st_makeenvelope

Version from 20131104:

LOG:  duration: 0.058 ms  statement: BEGIN READ ONLY
LOG:  duration: 33.405 ms  statement: DECLARE qgisf7_0 BINARY CURSOR FOR SELECT st_asbinary("way",'NDR'),ctid,"natural"::text,"leisure"::text,"waterway"::text,"building"::text,"landuse"::text,"amenity"::text,"name"::text FROM "public"."planet_osm_polygon" WHERE "way" && st_makeenvelope(1401487.70900841988623142,6073203.15179777983576059,1410299.6787660785485059,6080293.44296039920300245,900913)
LOG:  duration: 289.607 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 0.130 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 0.100 ms  statement: CLOSE qgisf7_0

Version from 20131230:

LOG:  duration: 0.105 ms  statement: BEGIN READ ONLY
LOG:  duration: 0.636 ms  statement: DECLARE qgisf7_0 BINARY CURSOR FOR SELECT st_asbinary("way",'NDR'),ctid,"natural"::text,"leisure"::text,"waterway"::text,"building"::text,"landuse"::text,"amenity"::text,"name"::text FROM "public"."planet_osm_polygon" 
LOG:  duration: 45.529 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 9.822 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 12.792 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 8.278 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 12.499 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
LOG:  duration: 10.806 ms  statement: FETCH FORWARD 2000 FROM qgisf7_0
....

I guess it will never stop unless the end of the database is reached.

Hope this helps.

Thomas

#3 Updated by Jürgen Fischer almost 11 years ago

  • Status changed from Feedback to Open

#4 Updated by Karl Brix Zinglersen almost 11 years ago

Comment concerning use of shape files:

I experience the same problem using shapefiles relatively close to the North Pole.
The problem does not occur using QGIS 1.9.0-Master and 2.0.1-Dufour

My task:
  • Display shapefiles in epsg:4326 on topographic map in general, national UTM zone epsg:32624 - but far from the meridian covering utm zone 19 and 20.
  • Load shapefiles in epsg:4326, and coastlines as well
  • Enable projection on the fly set to epsg:32624.

forward transform of (0.573786, 7.533056) PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=utm +zone=24 +datum=WGS84 +units=m +no_defs. Error: latitude or longitude exceeded limits.

ogrinfo: (on files to be transformed)
Extent: (-69.221690, 68.576893) - (-53.422470, 77.712725)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_84",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]

Using qgis version 2.1.0-Master, compiled against 1.10.1, proj.4 version 480.

I've attached downloads from OSM vector files where same problem occur.

Karl

#5 Updated by Thomas Baumann over 10 years ago

Ok from my side with QGIS 2.2, thanks.

#6 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Also available in: Atom PDF