9

I am a surveyor and use QGIS for maintaining soil test records on civil projects and am constantly provided with test lot area or number of lots required. These are more often than not irregular in shape and am wondering.

Is there a plugin/solution to cut a layer that contains irregular polygons into equal areas or number of lots with a specified area, with the result being the most number of lots based on the area provided?

5

The most straight-forward way:

  • Open QGIS and download the mmqgis extension via the plugin downloader
  • Load in your shapes and set their projection as project CRS (rightclick)
  • Go to mmqgis - create - create grid layer
  • Define a grid with enough spacing for your polygons. Besides rectangles you could also define hexagons and stuff
  • Now do a simple clip with the function in the vector menu to get equally spaced parts of your polygons. ( clip your generated grid with your polygons ). This will resolve in something like thisenter image description here
  • Now you could join the attributes of your old shape and the new one to keep the attribute table. You could also conduct a Union instead of a Clip to keep the attributes, but this may require some post-processing of your shape depending on the surface structure.
  • 1
    ahh, i just noticed that this solution doesn't resolve in equally spaced areas because of the clipping. Sry. Maybe it could be the basis of a new script, if you only take full rectangle in the polygons core. – Curlew Dec 12 '12 at 8:22
2

there are some ways splitting shapefiles with opensource tools. but i have never tried to split them equal parts when input files are an irregular polygon. still you want to try you can try following ways.

  1. shp2tile - it can split equal parts.

  2. you can read this question How to split a vector in equal smaller parts in QGIS or similar?

  3. you can achive it using ogr2ogr with some sql query and for loop.

     ogr2ogr newshape_1.shp input.shp -sql "SELECT * FROM MyShape WHERE size = 100"
    

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.