How can I save a vector layer to memory (or is there a reason QGIS doesn't allow this)? The...

What information about me do stores get via my credit card?

Difference between "generating set" and free product?

How do I add random spotting to the same face in cycles?

Is there a writing software that you can sort scenes like slides in PowerPoint?

How to delete random line from file using Unix command?

What is special about square numbers here?

Can undead you have reanimated wait inside a portable hole?

Does Parliament hold absolute power in the UK?

Make it rain characters

Arduino Pro Micro - switch off LEDs

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

Why did all the guest students take carriages to the Yule Ball?

Finding the path in a graph from A to B then back to A with a minimum of shared edges

Is this wall load bearing? Blueprints and photos attached

Can a novice safely splice in wire to lengthen 5V charging cable?

Working through the single responsibility principle (SRP) in Python when calls are expensive

Am I ethically obligated to go into work on an off day if the reason is sudden?

How to stretch delimiters to envolve matrices inside of a kbordermatrix?

How do you keep chess fun when your opponent constantly beats you?

how can a perfect fourth interval be considered either consonant or dissonant?

system() function string length limit

Are my PIs rude or am I just being too sensitive?

When did F become S in typeography, and why?

does high air pressure throw off wheel balance?



How can I save a vector layer to memory (or is there a reason QGIS doesn't allow this)?



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How can I save a column from the attribute table of a vector layer to a variable?How to avoid the CRS Dialog when creating a vector layer memory?How to save data from QGIS 1.8 to PostGIS without shapefile intermediate?Memory Vector Layer Corrupted?Use raster memory layer from QGIS processing resultQGIS - some edit feature options disabled in vector layerCreating new empty memory layer with fields scheme from other layer in QGIS?QGIS Spatialite tabular updates are very slowQgis feature count increases at save layer editsHow to preserve geometry when saving vector files to a SpatiaLite db (QGIS)





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















It's impressive how many different vector file formats QGIS (using ver 3.6.0) allows me to save a layer as:



QGIS save vector layer as...



But as far as I can tell, QGIS doesn't allow me to save a vector layer to memory. In my normal workflow in manipulating vector layers, I find myself having to save several intermediate vector layers to file, clogging up my file system or databsase with something like "vector_layer", "vector_layer1", "vector_layer2", "vector_layer2a", etc. It is often trivial to perform the updates/edits to the layer, and because I really don't care about these intermediate files, I'd rather be able to just save them in memory within the QGIS environment. Saving to memory would allow me to simply remove the layers from the project when I finish my workflow instead of having to delete from my Postgres database or my desktop.



When performing a geoprocessing task, there is the option to save to memory, but why can't I have the option to export a layer to memory on its own?










share|improve this question























  • I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

    – ThingumaBob
    yesterday













  • You can request a feature: issues.qgis.org.

    – csk
    yesterday


















2















It's impressive how many different vector file formats QGIS (using ver 3.6.0) allows me to save a layer as:



QGIS save vector layer as...



But as far as I can tell, QGIS doesn't allow me to save a vector layer to memory. In my normal workflow in manipulating vector layers, I find myself having to save several intermediate vector layers to file, clogging up my file system or databsase with something like "vector_layer", "vector_layer1", "vector_layer2", "vector_layer2a", etc. It is often trivial to perform the updates/edits to the layer, and because I really don't care about these intermediate files, I'd rather be able to just save them in memory within the QGIS environment. Saving to memory would allow me to simply remove the layers from the project when I finish my workflow instead of having to delete from my Postgres database or my desktop.



When performing a geoprocessing task, there is the option to save to memory, but why can't I have the option to export a layer to memory on its own?










share|improve this question























  • I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

    – ThingumaBob
    yesterday













  • You can request a feature: issues.qgis.org.

    – csk
    yesterday














2












2








2








It's impressive how many different vector file formats QGIS (using ver 3.6.0) allows me to save a layer as:



QGIS save vector layer as...



But as far as I can tell, QGIS doesn't allow me to save a vector layer to memory. In my normal workflow in manipulating vector layers, I find myself having to save several intermediate vector layers to file, clogging up my file system or databsase with something like "vector_layer", "vector_layer1", "vector_layer2", "vector_layer2a", etc. It is often trivial to perform the updates/edits to the layer, and because I really don't care about these intermediate files, I'd rather be able to just save them in memory within the QGIS environment. Saving to memory would allow me to simply remove the layers from the project when I finish my workflow instead of having to delete from my Postgres database or my desktop.



When performing a geoprocessing task, there is the option to save to memory, but why can't I have the option to export a layer to memory on its own?










share|improve this question














It's impressive how many different vector file formats QGIS (using ver 3.6.0) allows me to save a layer as:



QGIS save vector layer as...



But as far as I can tell, QGIS doesn't allow me to save a vector layer to memory. In my normal workflow in manipulating vector layers, I find myself having to save several intermediate vector layers to file, clogging up my file system or databsase with something like "vector_layer", "vector_layer1", "vector_layer2", "vector_layer2a", etc. It is often trivial to perform the updates/edits to the layer, and because I really don't care about these intermediate files, I'd rather be able to just save them in memory within the QGIS environment. Saving to memory would allow me to simply remove the layers from the project when I finish my workflow instead of having to delete from my Postgres database or my desktop.



When performing a geoprocessing task, there is the option to save to memory, but why can't I have the option to export a layer to memory on its own?







qgis vector qgis-3 save memory-layer






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









Tyler NTyler N

6318




6318













  • I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

    – ThingumaBob
    yesterday













  • You can request a feature: issues.qgis.org.

    – csk
    yesterday



















  • I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

    – ThingumaBob
    yesterday













  • You can request a feature: issues.qgis.org.

    – csk
    yesterday

















I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

– ThingumaBob
yesterday







I don't get why you are not using those temporary/virtual (memory) layers produced by e.g. the geoprocessing tools; they are, effectively, 'saved to memory'? they are pretty much exactly what you refer to: in-memory (or stored in the QGIS temp directory, kept there until deleted after saving the project), reusable in other tools in the chain and easily disposed of (cluttering only your layer panel, but that can be grouped accordingly)...or am I not getting your question? 'save to memory' is somewhat of a paradox...

– ThingumaBob
yesterday















You can request a feature: issues.qgis.org.

– csk
yesterday





You can request a feature: issues.qgis.org.

– csk
yesterday










2 Answers
2






active

oldest

votes


















5














Try outputting a specific format to memory using the special "/vsimem" virtual filesystem.



For example:



enter image description here



enter image description here






share|improve this answer































    1














    As a workaround, you can copy a layer to memory by running a processing tool in a way that generates an identical layer, and output the tool to [Create temporary layer].



    For example, use the default $geometry expression in the Geometry by expression tool:



    enter image description here



    Other options include:




    • for polygon layers, Buffer tool with buffer distance of 0

    • Translate tool with all offset distances 0

    • Reproject Layer tool with Target CRS the same as the layer's current CRS


    etc.






    share|improve this answer
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "79"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f318555%2fhow-can-i-save-a-vector-layer-to-memory-or-is-there-a-reason-qgis-doesnt-allow%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5














      Try outputting a specific format to memory using the special "/vsimem" virtual filesystem.



      For example:



      enter image description here



      enter image description here






      share|improve this answer




























        5














        Try outputting a specific format to memory using the special "/vsimem" virtual filesystem.



        For example:



        enter image description here



        enter image description here






        share|improve this answer


























          5












          5








          5







          Try outputting a specific format to memory using the special "/vsimem" virtual filesystem.



          For example:



          enter image description here



          enter image description here






          share|improve this answer













          Try outputting a specific format to memory using the special "/vsimem" virtual filesystem.



          For example:



          enter image description here



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          user2856user2856

          31k258106




          31k258106

























              1














              As a workaround, you can copy a layer to memory by running a processing tool in a way that generates an identical layer, and output the tool to [Create temporary layer].



              For example, use the default $geometry expression in the Geometry by expression tool:



              enter image description here



              Other options include:




              • for polygon layers, Buffer tool with buffer distance of 0

              • Translate tool with all offset distances 0

              • Reproject Layer tool with Target CRS the same as the layer's current CRS


              etc.






              share|improve this answer




























                1














                As a workaround, you can copy a layer to memory by running a processing tool in a way that generates an identical layer, and output the tool to [Create temporary layer].



                For example, use the default $geometry expression in the Geometry by expression tool:



                enter image description here



                Other options include:




                • for polygon layers, Buffer tool with buffer distance of 0

                • Translate tool with all offset distances 0

                • Reproject Layer tool with Target CRS the same as the layer's current CRS


                etc.






                share|improve this answer


























                  1












                  1








                  1







                  As a workaround, you can copy a layer to memory by running a processing tool in a way that generates an identical layer, and output the tool to [Create temporary layer].



                  For example, use the default $geometry expression in the Geometry by expression tool:



                  enter image description here



                  Other options include:




                  • for polygon layers, Buffer tool with buffer distance of 0

                  • Translate tool with all offset distances 0

                  • Reproject Layer tool with Target CRS the same as the layer's current CRS


                  etc.






                  share|improve this answer













                  As a workaround, you can copy a layer to memory by running a processing tool in a way that generates an identical layer, and output the tool to [Create temporary layer].



                  For example, use the default $geometry expression in the Geometry by expression tool:



                  enter image description here



                  Other options include:




                  • for polygon layers, Buffer tool with buffer distance of 0

                  • Translate tool with all offset distances 0

                  • Reproject Layer tool with Target CRS the same as the layer's current CRS


                  etc.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered yesterday









                  cskcsk

                  9,7781035




                  9,7781035






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f318555%2fhow-can-i-save-a-vector-layer-to-memory-or-is-there-a-reason-qgis-doesnt-allow%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                      Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                      looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...