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

QgsOracleFeatureIterator: returns all features if layer has no index #21082

Closed
qgib opened this issue Jun 19, 2015 · 6 comments
Closed

QgsOracleFeatureIterator: returns all features if layer has no index #21082

qgib opened this issue Jun 19, 2015 · 6 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 Jun 19, 2015

Author Name: Frank Dekervel (@kervel)
Original Redmine Issue: 13005
Affected QGIS version: 2.8.2
Redmine category:data_provider/oracle
Assignee: Jürgen Fischer


Hello,

i'm using QGis to show a view with a computed geometry column (and hence, i don't have a spatial index).
When i try to use the identify tool on this view, QGIS crashes (it tries to select all features in the layer).

This is because of a bug in QgsOracleFeatureIterator (i think):

  • the identify tool uses FilterRect
  • in the FilterRect handling, there is a big if:
if ( !mSource->mGeometryColumn.isNull() && mSource->mHasSpatialIndex )

  • if hasSpatialIndex is false, it won't enter the if and add no WHERE clause to the query at all, hence all features are selected.

i think the desired behaviour is that

i don't fully understand how this might be related to solved bug #19649

Frank

@qgib
Copy link
Contributor Author

qgib commented Jun 19, 2015

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


Fixed in changeset "dfc2cf0bbf7516886d6cbf7cb3211bbc023df19b".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 19, 2015

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


@sdo_filter@ requires a spatial index. @sdo_relate@ is only available with the spatial extension (ie. not in oracle locator).

So in QGIS @sdo_filter@ is used to detect if there is a spatial index (if everything else fails) and to filter in a feature request with @FilterRect@ - but only if there is a spatial index. And if the feature request also has the @ExactIntersect@ flag set and the spatial extension it available it is combined with @sdo_relate@.

So if there is no spatial index or no spatial extension all features have to be loaded and have to be individually checked against the @FilterRect@. But tht was only done when there was no spatial extension regardless of the existence of a spatial index. dfc2cf0 should fix that.

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2015

Author Name: Frank Dekervel (@kervel)


i tried nightly of today (61d81f0), and it doesn't seem to be solved: qgis still selects all the features when i try to identify one.

i can't find why it doesn't work (the commit looks correct)

i still see that zooming and panning the map goes reasonably quick, even selecting nodes using the selection tool works fine (strange ?).

@qgib
Copy link
Contributor Author

qgib commented Jun 25, 2015

Author Name: Frank Dekervel (@kervel)


hello,

i think i found the cause why it isn't working yet. inside the "if" you changed in dfc2cf0, there is another check in "line 148":#dfc2cf0bbf7516886d6cbf7cb3211bbc023df19b#diff-3930f82a72360b839dd9bc0a39e4cd97L148 for hasSpatial that needs to be changed too

frank


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Jun 25, 2015

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


Fixed in changeset "318137ae5649bb270613287804beb8e0fbab591f".


  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2015

Author Name: Frank Dekervel (@kervel)


working fine in latest nightly.

thanks for the fix !

Frank

@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
@qgib qgib closed this as completed 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