0

I have a map of a country with the location stores within the country (a store identifier and the coordinates of the store). I want to:

  1. Create a grid over the map (say, 2 km by 2 km).
  2. Create an index to identify all stores that are located in the same cell of the grid.
  3. Export the resulting data (store identifier, coordinates, and cell identifier).

How do I do this in QGIS 2.18 on Ubuntu 16.04?

  • 1
    yes, use vector grid, spatial interactions->intersects and save as – Ian Turton Jul 7 '17 at 14:48
  • Thanks. I think I'm half the way to understanding how this works. However, when using vector grid, how do you define the x and y spacing to be, say, 2km-by-2km? The original data is just the coordinates of stores. Thanks. – flucoe Jul 7 '17 at 16:13
  • make sure your project projection is in meters – Ian Turton Jul 7 '17 at 16:14
  • How? I have saved the data using different CRS and enabling 'on the fly' CRS transformation, but it seems I keep choosing wrong CRSs. Specifically, when I loaded the data (a csv file with coordinates), I chose WGS 84. Then, on the 'Layers Panel', right click on the layer->Save As-> CRS, and I chose the UTM zone that corresponds to this area. What should I do next? If I load the saved file, the CRS is the chosen one, but I still don't know how to make sure that the projection is in meters, and how this translates to x and y spacing. Thanks. – flucoe Jul 7 '17 at 17:07
  • @flucoe If you were able to save the layer by choosing a projected CRS, you have done one half of the job. The units of measurement that will be used by the tool are those belonging to the CRS of the project (and not to the CRS of the layer). If you are not familiar with CRSs, I suggest loading only the layer of interest in the Layers Panel, then verifying that its CRS is a projected CRS (just see in the bottom right part of the main QGIS window that the EPSG for the CRS matches the CRS desired) and finally set the proper values for both x and y spacing (if you are using meters, set 2000). – mgri Jul 7 '17 at 18:46

Your Answer

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

Browse other questions tagged or ask your own question.