1

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?

asked Mar 31, 2014 at 6:43
2
  • 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? Commented 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. Commented Apr 1, 2014 at 14:07

1 Answer 1

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.

answered Mar 31, 2014 at 6:55
3
  • 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? Commented Mar 31, 2014 at 7:05
  • Check changelog.linfiniti.com/qgis/version/21 and digital-geography.com/qgis-2-2-and-its-new-features Commented 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? Commented Mar 31, 2014 at 8:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.