1

I'm working in QGIS right now to create a grid of points within ~36 irregularly shaped polygons. The spacing on the of the points within in the polygons needs to be 3.8/4km.

I attempted using Vector -> Research Tools -> Vector Grid to create an evenly spaced point grid within the polygons but even on the larger polygons that are 30-40 km^2 the tool only creates one point in the very top left corner of the bounding box. Once I create these grid points I'll be exporting them out to KML or XML for use by a 3rd party program that doesn't support shp. The grid will create a "tiling" effect for spot images over an area for our third party software.

I've looked at several of the stack exchange discussions here and none seem to get it quite where I need it.

I was considering creating a 4km fishnet grid over the entire extent (semi-global) and then clipping it to the polygons, then creating centroids for those remaining polygons to produce my grid.

I looked at:

Creating grid constrained within polygon in QGIS?

Creating evenly distributed points within an irregular boundary

Creating regularly spaced, defined # of points within polygon in QGIS

And those have somewhat led me to using the fishnet/centroid solution. I'm wondering if there is a more practical, scriptable way to do this. I'm new to use python in general but am making myself learn it for obvious reasons!

  • What's the coordinate reference system CRS of your polygons? Sounds like they might be stored using WGS84 degrees. Thus, specifying a grid size of 4000 would equal 4000 degrees not 4 km. In that case, it wouldn't be surprising that only one point is created. – underdark Sep 27 '17 at 19:13
  • Ya know what - I think you're absolutely correct. Apologies - I'm rusty in GIS - took a few years off to explore another career (mmm...beer). It's definitely in WGS84 - just realized that. Oy. Assuming i should be in a localized projection? – G Space Sep 28 '17 at 12:27

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.