1

In QGIS 2.0.1, is there a way to automatically slice up one shapefile and export it as multiple files using polygons defined in another shapefile?

I have a detailed shapefile that categorizes the land ownership of the entire state of Arizona. (It's called "az_surf_mgmt" on this page.) As a whole, it far exceeds the size and complexity restrictions of KML support in Google Maps. So I want to take that file and chop it into individual counties, or perhaps game management units, as defined by another shapefile obtained elsewhere.

I found an almost identical question, but the accepted answer does not address how this might be done automatically. If the answer requires that I learn Python and PyQGIS, so be it.

nmtoken
  • 13,355
  • 5
  • 38
  • 87
Kevin Krumwiede
  • 293
  • 2
  • 11

2 Answers2

2

QGIS does have a split function but it splits a shapefile into subsidiaries by attribute not geometry. However, you can still use this in a very simple process. Ensure your counties (or game units) data has a unique id field distinct from your other data. Intersect your shapefile with your counties and then use Vector->Data Management Tools->Split Vector Layer.

MappaGnosis
  • 33,857
  • 2
  • 66
  • 129
0

Hint: I use 2.14.5.LTR (german gui).

This sound like a two-step analysis for me. First you should do a Join attributes by location (search in the processing toolbox). In your example this would join the county attribute to each feature of your az_surf_mgmt layer. Then with the attributes merged to this layer, you can split it by attribute using the split vector layer tool. For convenience, you might put these together with the graphical modeler.

Join attributes by location:

enter image description here

Split vector layer:

enter image description here

Jochen Schwarze
  • 14,605
  • 7
  • 49
  • 117