I have a point a line and a polygon layer. They have the same attribute table. Can I do one query that refers to all the attribute tables? So I wouldn't have to do every query three times. Thanks.
I'm working ith qgis, v. 2.0.1.
Edit: I joined the layers but how am I doing a query that covers all the attributes? For example I'd like to ask: Which of the attributes have the name "tree"? As I have some trees along a river, I digitized them as a line, but as I have also single trees, I also have "tree"-attributes as points. How can I do just one query for this? Any suggestions?
-
Can you be more precise about what you would like to do with the result of your query (i.e. what is the end product?). And I guess instead of an attribute with the name tree you are looking for an attribute with a defined name (e.g. type) and the value tree. Last but not least: Is a python script an option?Matthias Kuhn– Matthias Kuhn2014年04月01日 11:31:43 +00:00Commented Apr 1, 2014 at 11:31
-
I just want to know in general how I can do one query (doesn't matter what exactly I ask) for two layers with different geometry (point and line) but with the same attribute table. I don't have a specific project I want to do, it's a general question for future projects. Unfortunately python script is not a option.qgs– qgs2014年04月01日 14:07:13 +00:00Commented Apr 1, 2014 at 14:07
1 Answer 1
One way would be to use a relational database where you build the queries, then use those queries from QGIS. If your stuck with shapefile you can join them virtually with the Join tab of the layer properties. If your using QGIS 2.2 you can view the relation as a parent - child relationship in the attribute window.
-
Thanks for your answer. I'm working with the shapefile format, so I'm gonna try to join them. Did you work with QGis version 2.2? Can you say something about it, like what are the main changes/improvements?qgs– qgs2014年03月31日 07:05:42 +00:00Commented Mar 31, 2014 at 7:05
-
Check changelog.linfiniti.com/qgis/version/21 and digital-geography.com/qgis-2-2-and-its-new-featuresJakob– Jakob2014年03月31日 07:09:57 +00:00Commented Mar 31, 2014 at 7:09
-
I joined the layers but how am I doing a query that covers all the attributes? For example I'd like to ask: Which of the attributes have the name "tree"? As I have some trees along a river, I digitized them as a line, but as I have also single trees, I also have "tree"-attributes as points. How can I do just one query for this?qgs– qgs2014年03月31日 08:22:38 +00:00Commented Mar 31, 2014 at 8:22