Bug report #11375

QGIS 2.4 Postgis 2.1 geography types issue

Added by Marco Giana about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19666

Description

QGIS 2.4 and Check with Dev build as well.
Database PostgreSQL 9.3 (x64) with PostGIS 2.1 on Windows 8.1
Data point line polygon with spatial type geography SRID 4326.

In a new QGIS with project projection SRID 4326
Create PostGIS connection.
Add point and line data, try to zoom to layer, it does not do it.
Add TAB file from which the data originally came from, zoom to that layer, it zooms to it and the point and line data displays correctly.

Add a polygon dataset, but get the following error when ttys to display, even when the point and line data draws ok.
Polygon dataset is in the same geography extent,

ERROR in QGIS PostGIS log windows.

Query: DECLARE qgis_3 BINARY CURSOR FOR SELECT st_asbinary("shape",'NDR'),"ogc_fid" FROM "Transport"."tr_air_infra_area_polygon" WHERE "shape" && st_makeenvelope(144.41472271431808849,-36.22874299721337366,144.78042127211659817,-36.12443614981397388,4326) AND st_srid("shape")=4326 AND upper(geometrytype("shape")) IN ('POLYGON','MULTIPOLYGON','POLYGONM','MULTIPOLYGONM','POLYHEDRALSURFACE','TIN') returned 7 [ERROR:  function st_srid(geography) does not exist
LINE 1: ...78042127211659817,-36.12443614981397388,4326) AND st_srid("s...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
]

Tried the command in PostGIS command window, same error is returned.

Associated revisions

Revision dfafa5dd
Added by Jürgen Fischer about 10 years ago

fix geography detection (fixes #11375)

History

#1 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF