In QGIS Wien, I am performing a spatial query with two layers (points and buffer areas) and receive the following error when creating a new layer with intersecting features: The query from "LayerName" using "FID" in field not possible.

Spatial query settings: - where the feature: intersects - and use the result to: create new selection

In the same file, I have performed the same spatial query with other layers (points and buffer areas) without running into this problem.

How should I go about fixing the error?

  • Have you a unique field in your layers? And what kind of layer are they? shape, postgres ecc..
    – Sergio
    Jul 8, 2015 at 11:46
  • Good questions. Yes, unique field (each column has a unique header). The layer is a shape file of hospital locations in the US (Data: geocommons.com/overlays/106078).
    – John12
    Jul 8, 2015 at 12:04
  • There is a similar issue in the comments here (with solution): gis.stackexchange.com/questions/67133/…
    – MaryBeth
    Jul 8, 2015 at 12:43
  • I don't know why it happens but it's improbable that it is a bug. What i can suggest is to verify topology of the layer (polygons most of all) or import the 2 layers in grass for a topology correction and then extract them as shape and do again the spatial query.
    – Sergio
    Jul 8, 2015 at 13:02

1 Answer 1

  1. Apply Spatial Query
  2. If error message appears go to step 3
  3. Close Spatial Query
  4. Right click on original layer and "save as"
  5. Check the "Save only selected features" box

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.