Bug report #7889

Feature type or srid for ... could not be determined or was not requested.

Added by Sandro Santilli over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16762

Description

I can't load PostGIS columns of type "geometry" because QGIS mandates to specify a SRID, and if I fake one it complains about "could not be determined or was not requested". A column of type "geometry" has a SRID of 0. This is being a problem with 83445af

Associated revisions

Revision 925d3179
Added by Jürgen Fischer over 6 years ago

postgres provider fixes:
- allow selection of rows with srid 0 (fixes #7889)
- fix geometry type assignment of geometry less tables
- filter out geometry columns with srids < 0 in browser

Revision 10a91b7f
Added by Jürgen Fischer over 6 years ago

postgres provider: use INT_MIN for unknown srid (fixes #7889)

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Open to Feedback

Sandro is this a regression since 1.8 or previous master revisions?

#2 Updated by Sandro Santilli over 6 years ago

I'm not building very often (scared by instability), but it's likely not older than one month, as a regression.

PS: I can only see Feedback and Closed as ticket statuses

#3 Updated by Giovanni Manghi over 6 years ago

  • Priority changed from Normal to Severe/Regression
  • Target version set to Version 2.0.0

Sandro Santilli wrote:

I'm not building very often (scared by instability), but it's likely not older than one month, as a regression.

but still a regression, right? if not please lower the priority.

PS: I can only see Feedback and Closed as ticket statuses

Let me see if I can do something in redmine administration.

#4 Updated by Sandro Santilli over 6 years ago

Still happening. Seems to only happen with tables with geometries having a SRID=0 (ie: unkown srid).
Is this a documented new requirement ?

#5 Updated by Sandro Santilli over 6 years ago

And yes, it is a regression. I used to be able to use geometries with NO srid just fine. I didn't even have to manually enter one (but this is a separate topic, maybe)

#6 Updated by Giovanni Manghi over 6 years ago

Sandro Santilli wrote:

And yes, it is a regression. I used to be able to use geometries with NO srid just fine. I didn't even have to manually enter one (but this is a separate topic, maybe)

fixed by f990886?

#7 Updated by Sandro Santilli over 6 years ago

"almost". The error message isn't shown anymore now, BUT I just cannot select the table with SRID=0.
Here's a screenshot: http://strk.keybit.net/tmp/cannot_select_geom.png
Clicking on the line the cursor is on (identified has containing Point with SRID 0) does not highlight it, so you can't click on "Add"

#8 Updated by Giovanni Manghi over 6 years ago

Sandro Santilli wrote:

"almost". The error message isn't shown anymore now, BUT I just cannot select the table with SRID=0.
Here's a screenshot: http://strk.keybit.net/tmp/cannot_select_geom.png
Clicking on the line the cursor is on (identified has containing Point with SRID 0) does not highlight it, so you can't click on "Add"

better add this comment also in the commit page

#9 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Feedback to Closed

#10 Updated by Sandro Santilli over 6 years ago

Thanks a lot, fix confirmed !

#11 Updated by Sandro Santilli over 6 years ago

  • Status changed from Closed to Reopened

Hey Jef, I tested with postgis 1.5 and it still fails there. SRID=-1 is the unknown in there. If -1 has special meaning in qgis (does it?) it'd be better to convert it to 0 when it comes from the database

#12 Updated by Sandro Santilli over 6 years ago

THe recommended way is to convert any SRID < 0 coming from the database to 0. This si what PostGIS 2.0 does when data gets in the db (either from old dumps or old applications)

#13 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Reopened to Closed

#14 Updated by Sandro Santilli over 6 years ago

Works for me with both 1.5 and 2.0 -- thanks again !

Also available in: Atom PDF