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.

Vince
  • 20,017
  • 15
  • 45
  • 64

1 Answers1

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

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