QGIS virtual layer functionality does not seem to support memory layers Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Spatial join for closest features and using a sum merge rule in QGISCan Virtual Fields be used for a rendering style?Is it possible to use memory layers in QGIS processing algorithms?QGIS python originalName() does not return actual original layer nameQGIS virtual layer path never saved as relativeLoad non-spatial table in QGIS by querying an Oracle databaseAdd layer to existing geopackage not working in QGIS?Using WFS layers in Virtual Layer crashing/too slow QGISPopulating blank columns with polygon informationVirtual layer from query with special characters in field name using PyQGISSpatial Query for a Virtual Layer
Is there a kind of relay that only consumes power when switching?
Did any compiler fully use 80-bit floating point?
Trademark violation for app?
What was the first language to use conditional keywords?
Strange behavior of Object.defineProperty() in JavaScript
How does the math work when buying airline miles?
Why are vacuum tubes still used in amateur radios?
Why limits give us the exact value of the slope of the tangent line?
What order were files/directories outputted in dir?
When a candle burns, why does the top of wick glow if bottom of flame is hottest?
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
What initially awakened the Balrog?
Selecting user stories during sprint planning
How to draw/optimize this graph with tikz
Is there hard evidence that the grant peer review system performs significantly better than random?
What do you call the main part of a joke?
Putting class ranking in CV, but against dept guidelines
What's the meaning of "fortified infraction restraint"?
How to play a character with a disability or mental disorder without being offensive?
I want to complete my figure
How fail-safe is nr as stop bytes?
Crossing US/Canada Border for less than 24 hours
Is CEO the "profession" with the most psychopaths?
Is it fair for a professor to grade us on the possession of past papers?
QGIS virtual layer functionality does not seem to support memory layers
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Spatial join for closest features and using a sum merge rule in QGISCan Virtual Fields be used for a rendering style?Is it possible to use memory layers in QGIS processing algorithms?QGIS python originalName() does not return actual original layer nameQGIS virtual layer path never saved as relativeLoad non-spatial table in QGIS by querying an Oracle databaseAdd layer to existing geopackage not working in QGIS?Using WFS layers in Virtual Layer crashing/too slow QGISPopulating blank columns with polygon informationVirtual layer from query with special characters in field name using PyQGISSpatial Query for a Virtual Layer
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a memory layer loaded in the QGIS virtual layer in the data source manager. I am trying to run a very simple query:
select * from layer
Here is a snapshot:
While this works for the physical layer, it does not work for the memory layer. They output virtual layer is blank, and I know that my memory layer has attribute data.
Is this simply a bug? I want to keep this a memory layer to reduce the number of steps I need to do to arrive at my final result. Should I resort to another tool or is there a workaround?
EDIT
Also found this quote in this link:
Creating a virtual layer with the layer_ref key allows to directly access already loaded QGIS layers (including memory layers).
qgis virtual-layer
|
show 2 more comments
I have a memory layer loaded in the QGIS virtual layer in the data source manager. I am trying to run a very simple query:
select * from layer
Here is a snapshot:
While this works for the physical layer, it does not work for the memory layer. They output virtual layer is blank, and I know that my memory layer has attribute data.
Is this simply a bug? I want to keep this a memory layer to reduce the number of steps I need to do to arrive at my final result. Should I resort to another tool or is there a workaround?
EDIT
Also found this quote in this link:
Creating a virtual layer with the layer_ref key allows to directly access already loaded QGIS layers (including memory layers).
qgis virtual-layer
1
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
1
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
1
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a selectcount(*) from memory_layer
?
– snaileater
2 hours ago
1
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
1
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago
|
show 2 more comments
I have a memory layer loaded in the QGIS virtual layer in the data source manager. I am trying to run a very simple query:
select * from layer
Here is a snapshot:
While this works for the physical layer, it does not work for the memory layer. They output virtual layer is blank, and I know that my memory layer has attribute data.
Is this simply a bug? I want to keep this a memory layer to reduce the number of steps I need to do to arrive at my final result. Should I resort to another tool or is there a workaround?
EDIT
Also found this quote in this link:
Creating a virtual layer with the layer_ref key allows to directly access already loaded QGIS layers (including memory layers).
qgis virtual-layer
I have a memory layer loaded in the QGIS virtual layer in the data source manager. I am trying to run a very simple query:
select * from layer
Here is a snapshot:
While this works for the physical layer, it does not work for the memory layer. They output virtual layer is blank, and I know that my memory layer has attribute data.
Is this simply a bug? I want to keep this a memory layer to reduce the number of steps I need to do to arrive at my final result. Should I resort to another tool or is there a workaround?
EDIT
Also found this quote in this link:
Creating a virtual layer with the layer_ref key allows to directly access already loaded QGIS layers (including memory layers).
qgis virtual-layer
qgis virtual-layer
edited 2 hours ago
user32882
asked 3 hours ago
user32882user32882
1,14711127
1,14711127
1
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
1
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
1
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a selectcount(*) from memory_layer
?
– snaileater
2 hours ago
1
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
1
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago
|
show 2 more comments
1
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
1
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
1
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a selectcount(*) from memory_layer
?
– snaileater
2 hours ago
1
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
1
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago
1
1
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
1
1
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
1
1
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a select
count(*) from memory_layer
?– snaileater
2 hours ago
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a select
count(*) from memory_layer
?– snaileater
2 hours ago
1
1
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
1
1
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago
|
show 2 more comments
2 Answers
2
active
oldest
votes
The upper section, embeded layers
, allows listing (and using) layers that are not loaded in QGIS table of content.
Using an in-memory layer that is not loaded in QGIS is to be tested. I believe the layer is cleared from memory as soon as it is removed from the table of content.
If you do have the in-memory layer loaded in the table of content, you can simply remove it from the embeded layers
section, and the query will work. I just reproduced your use case and workaround in 3.4.5
add a comment |
You can find all your layers in the DB-manager. There (in my opinion) it is easier to access and query them. And you can load results as a new layer.
Go to DB-manager > Virtual Layers > QGIS layers
Select one of the layers and make your query. Note that the geometry is written as
geometry
and notgeom
.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319324%2fqgis-virtual-layer-functionality-does-not-seem-to-support-memory-layers%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
The upper section, embeded layers
, allows listing (and using) layers that are not loaded in QGIS table of content.
Using an in-memory layer that is not loaded in QGIS is to be tested. I believe the layer is cleared from memory as soon as it is removed from the table of content.
If you do have the in-memory layer loaded in the table of content, you can simply remove it from the embeded layers
section, and the query will work. I just reproduced your use case and workaround in 3.4.5
add a comment |
The upper section, embeded layers
, allows listing (and using) layers that are not loaded in QGIS table of content.
Using an in-memory layer that is not loaded in QGIS is to be tested. I believe the layer is cleared from memory as soon as it is removed from the table of content.
If you do have the in-memory layer loaded in the table of content, you can simply remove it from the embeded layers
section, and the query will work. I just reproduced your use case and workaround in 3.4.5
add a comment |
The upper section, embeded layers
, allows listing (and using) layers that are not loaded in QGIS table of content.
Using an in-memory layer that is not loaded in QGIS is to be tested. I believe the layer is cleared from memory as soon as it is removed from the table of content.
If you do have the in-memory layer loaded in the table of content, you can simply remove it from the embeded layers
section, and the query will work. I just reproduced your use case and workaround in 3.4.5
The upper section, embeded layers
, allows listing (and using) layers that are not loaded in QGIS table of content.
Using an in-memory layer that is not loaded in QGIS is to be tested. I believe the layer is cleared from memory as soon as it is removed from the table of content.
If you do have the in-memory layer loaded in the table of content, you can simply remove it from the embeded layers
section, and the query will work. I just reproduced your use case and workaround in 3.4.5
answered 59 mins ago
JGHJGH
13.7k21239
13.7k21239
add a comment |
add a comment |
You can find all your layers in the DB-manager. There (in my opinion) it is easier to access and query them. And you can load results as a new layer.
Go to DB-manager > Virtual Layers > QGIS layers
Select one of the layers and make your query. Note that the geometry is written as
geometry
and notgeom
.
add a comment |
You can find all your layers in the DB-manager. There (in my opinion) it is easier to access and query them. And you can load results as a new layer.
Go to DB-manager > Virtual Layers > QGIS layers
Select one of the layers and make your query. Note that the geometry is written as
geometry
and notgeom
.
add a comment |
You can find all your layers in the DB-manager. There (in my opinion) it is easier to access and query them. And you can load results as a new layer.
Go to DB-manager > Virtual Layers > QGIS layers
Select one of the layers and make your query. Note that the geometry is written as
geometry
and notgeom
.
You can find all your layers in the DB-manager. There (in my opinion) it is easier to access and query them. And you can load results as a new layer.
Go to DB-manager > Virtual Layers > QGIS layers
Select one of the layers and make your query. Note that the geometry is written as
geometry
and notgeom
.
edited 49 mins ago
answered 1 hour ago
PieterBPieterB
3,1451128
3,1451128
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319324%2fqgis-virtual-layer-functionality-does-not-seem-to-support-memory-layers%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Just tested right now : i had no problem of this kind (Q3.44) ... Are you sure of your data structure ?
– snaileater
2 hours ago
1
what do you mean by data structure? I am just calling all columns in the table I loaded.... Using QGIS3.2.2 by the way
– user32882
2 hours ago
1
When u open its attribute table in the layer manager you see all the features (those u would like to get when querying it) ? Do u just get an empty answer or any error message ? Did u try a select
count(*) from memory_layer
?– snaileater
2 hours ago
1
The resulting virtual layer is empty (no attributes, no fields). The original memory layer has plenty of attributes... I'm updating QGIS now to see if it has been fixed
– user32882
2 hours ago
1
Nope... doesn't work with QGIS 3.4.6... Are you sure you tested a memory layer?
– user32882
2 hours ago