3

I have two files:

  1. A csv file that has lat longs listed for points.
  2. A shapefile that contains England NHS CCG boundaries (which usually uses the British National Grid).

When I 'add a delimited layer', if I opt to geocode the lat/long data to BNG, it doesn't like it. But if I change the NHS CCG shapefile to a CRS of WGS84, then it looks curved.

I just want to do a query that tells me what CCG boundary each of these points reside in (so either a point in polygon query or a join attributes by table query).

  • 1
    Welcome to GIS:SE! Is the Project CRS set to the same CRS as your 2 layers? – Joseph Dec 4 '14 at 12:27
2

In Settings -> Options, CRStab, select Prompt for CRS for new layers.

Then you can choose WGS84 when loading the delimited text file.

The other file should remain in BNG. Don't use Set CRS for Layer to change it. This will NOT reproject your coordinates.

Instead, use Save As... on the delimited text layer, choose a different filename and BNG as CRS.

The query will not work with delimited text layers, and both layers must be saved to disk with the same CRS.

1

Thanks Joseph and AndreJ for responding.

Just in case anyone reads this and is interested, I found another work around. I loaded the delimited layer (which had the lat longs), saved it with a CRS of British National Grid. Then reopened this layer and created a query where I created 2 new fields, one with the x coordinate and the other the y coordinate (in the expression field use: $x)

Then with both of my layers now being BNG, I was able to the spatial query

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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