0

Here's the issue. I have 500,000 lat-long data points and I want to figure out what census block they are in. I have a shapefile with said census blocks. I also have downloaded QGIS.

But, what I can't figure out is how to use the intersection tool to create a new file with my lat-long points and the corresponding census block in them. I want to put it in an Excel format, so I can use pivot tables on it.

1 Answer 1

3

What you need is Menu Vector / Datamanagement Tools / Join attributes by location. Set the points as input and the polygon as overlay layer. As Geometric predicate, use within. Choose fields to add, for Join type use Take attributes of the first matching feature only (one-to-one). If you want, define a prefix.

Screenshot: output will by a copy of the point-layer with added attribute name (or whatever you chose) of the polygon it lies within: enter image description here

4
  • Thank you! Do my points need to be a specific file type? Right now, the lat-long are in .csv. Commented Sep 16, 2021 at 20:23
  • You must load the csv file as point layer. There are some answer about this, see e.g.: gis.stackexchange.com/q/403989/88814 or gis.stackexchange.com/questions/397331/…
    – Babel
    Commented Sep 16, 2021 at 20:50
  • Okay. I've created the joined layer file, how do I extract the data into a .csv format? Commented Sep 16, 2021 at 21:27
  • Just export: Right click layer / Export / Save features as...
    – Babel
    Commented Sep 16, 2021 at 21:54

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.