Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphical identify and select feature do not work on Postgis-sql layer #29778

Closed
qgib opened this issue Apr 30, 2019 · 4 comments
Closed

graphical identify and select feature do not work on Postgis-sql layer #29778

qgib opened this issue Apr 30, 2019 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@qgib
Copy link
Contributor

qgib commented Apr 30, 2019

Author Name: Sebastian Brocks (@beerockxs)
Original Redmine Issue: 21963
Affected QGIS version: 3.6.2
Redmine category:data_provider/postgis


I have a SQL-defined postgis layer defined by this statement:

((((SELECT row_number() over () AS uid,* FROM (SELECT generate_series(0, laenge_asb,100) AS station, st_astext(
ST_LineInterpolatePoint(
geometrie,
generate_series(0, laenge_asb,100):: double precision /(laenge_asb)
)
) FROM "erhaltung"."abschnitt" ) AS subq_1 ) ) ) )

abschnitt is a table in my postgis database with a LineStringZM geometry of SRID 4326 stored in the geometrie column that has an integer laenge_asb column

When I try to identify or select features in it by using the identify or select tool, the PostGIS log tab contains this error and no feature is identified or selected:

2019-04-30T14:09:40 WARNING Fetching from cursor qgis_144 failed
Database error: ERROR: Operation on mixed SRID geometries

2019-04-30T14:09:40 WARNING Query: CLOSE qgis_144 returned 7 [ERROR: current transaction is aborted, commands ignored until end of transaction block
]
2019-04-30T14:09:40 WARNING 1 cursor states lost.
SQL: CLOSE qgis_144
Result: 7 (ERROR: current transaction is aborted, commands ignored until end of transaction block
)

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2019

Author Name: Sebastian Brocks (@beerockxs)


This looks like the issue in issue #14397

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2019

Author Name: Jürgen Fischer (@jef-n)


Why are you using @st_astext@?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2019

Author Name: Sebastian Brocks (@beerockxs)


No particular reason, I'm a relative newbie with regard to postgis and QGIS. Changing to st_aswekt makes identify and select work correctly.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2019

Author Name: Jürgen Fischer (@jef-n)


Sebastian Brocks wrote:

No particular reason, I'm a relative newbie with regard to postgis and QGIS. Changing to st_aswekt makes identify and select work correctly.

you shouldn't need either @st_astext@ or @st_ewkt@ - the geometry @ST_LineInterpolatePoint@ produces should work as it, but st_astext will essentially just remove the SRID and in turn cause the error.


  • resolution was changed from to invalid
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Apr 30, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant