1

I have a map of Wales with various layers on it in QGIS 2.18.20. I want to select just a small rectangle of the country, with the layer details which apply to that area, and then export it.

I've tried the multiple selection tool but it doesn't seem to be possible to save the selected area.

  • I'm new to this, but why do people keep on editing my question without offering any solutions? – user127283 Aug 25 '18 at 21:48
  • Usually when someone edits a question, they're trying to make it easier to understand. They may not have an answer but by editing the question they hope to make it easier for someone else to answer. Also, Stack Exchange automatically puts each new user's first question into a review queue. Hence why your question was immediately edited by multiple reviewers. – csk Aug 26 '18 at 22:28
1

I tried it worked. Still, I will jot down the steps:

  1. In the layers menu section on the left-hand side of your QGIS window, highlight the layer that you want to perform a section on to make it active.
  2. Select the “Select Features by area or click” icon located on the upper icon menu strip and then select the method by the polygon.
  3. The highlighted geography will turn a bright yellow color.
  4. When you have selected the geographic features that you want to export to a new GIS data file, right-click on the layer in the legend window and select “save as.”
  5. The window that pops up provides several options to choose. First, under format select the file format you want to export the geographic data as. Next, in the save as section click on the browse button to select the file directory to save the data to in the window that pops up. This is also where you will type in the file name that you want the GIS data to be saved as. Finally, in the encoding section, make sure the “save only selected features” option is checked. You can optionally set other parameters in this section if desired. If you want to load the new layer into your legends window, make sure the box for “add saved file to map” is checked (typically this is already on by default).
  6. Click on OK and your new file will be saved to the designated directory and added to your open QGIS file.

EDIT:

processing.runalg('qgis:saveselectedfeatures', input_layer, output_layer)

try that in the console.

or you could save all separately then go to vector then data management tools and then merge all.

  • 1
    Thanks very much for that, but I think that's the way to save just the selected part of one layer - the problem is when I select all layers in the area I want there is no way to save them all together (or so it seems). – user127283 Aug 26 '18 at 11:59
  • @DaminiJain Please edit your answer with any additional content rather than putting as comments – Midavalo Aug 26 '18 at 18:08

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.